go.uuid has Predictable UUID Identifiers
Published 7 Feb 2023 · Updated 13 Mar 2026
Is your project on an affected github.com/satori/go.uuid?
Look after several Go apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie
Affected package
- Affected
- >=1.2.1-0.20180103161547-0ef6afb2f6cd <1.2.1-0.20180404165556-75cca531ea76
- Fixed in
- 1.2.1-0.20180404165556-75cca531ea76
go get github.com/satori/go.uuid@v1.2.1-0.20180404165556-75cca531ea76Details
CVE Description for go.uuid
A flaw was found in github.com/satori/go.uuid in versions from commit 0ef6afb2f6cdd6cdaeee3885a95099c63f18fc8c to d91630c8510268e75203009fe7daf2b8e1d60c45. Due to insecure randomness in the g.rand.Read function the generated UUIDs are predictable for an attacker.
Update on 19 September 2024 -- This vulnerability never existed in sif
The official NIST CVE-2021-3538 record says:
> A flaw was found in github.com/satori/go.uuid in versions from commit 0ef6afb2f6cdd6cdaeee3885a95099c63f18fc8c to d91630c8510268e75203009fe7daf2b8e1d60c45.
That commit and that fix were never in a tagged release of satori/go.uuid, and prior to this announcement sif had used the last tag, 1.2.0. The NIST record says version 1.2.0 was vulnerable, but that's not true. So sif was never vulnerable to this. Also, beginning with version 2.0.0, sif does not use satori/go.uuid anymore.
This update was made in response to issue #243 which has more details.
The original, incorrect sif vulnerability description is below.
-------------
Impact
The siftool new command produces predictable UUID identifiers due to insecure randomness in the version of the github.com/satori/go.uuid module used as a dependency.
Patches
A patch is available in version >= v1.2.2 of the module. Users are encouraged to upgrade.
Fixed by https://github.com/hpcng/sif/pull/90
Workarounds
Users passing CreateInfo struct should ensure the ID field is generated using a version of github.com/satori/go.uuid that is not vulnerable to this issue. Unfortunately, the latest tagged release is vulnerable to this issue. One way to obtain a non-vulnerable version is:
go get -u github.com/satori/go.uuid@v1.2.1-0.20180404165556-75cca531ea76
References
https://github.com/satori/go.uuid/issues/73
For more information
If you have any questions or comments about this advisory:
Open an issue in https://github.com/hpcng/sif/issues
Is GHSA-33m6-q9v5-62r7 in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected github.com/satori/go.uuid, and gives you the command that fixes it.
References
- Linkgithub.com/apptainer/sif/security/advisories/GHSA-33m6-q9v5-62r7
- Linkgithub.com/hpcng/sif/security/advisories/GHSA-33m6-q9v5-62r7
- Advisorynvd.nist.gov/vuln/detail/CVE-2021-3538
- Linkgithub.com/satori/go.uuid/issues/73
- Linkgithub.com/satori/go.uuid/pull/75
- Linkgithub.com/satori/go.uuid/commit/75cca531ea763666bc46e531da3b4c3b95f64557
- Linkbugzilla.redhat.com/show_bug.cgi?id=1954376
- Packagegithub.com/satori/go.uuid
- Linkpkg.go.dev/vuln/GO-2022-0244
- Linksnyk.io/vuln/SNYK-GOLANG-GITHUBCOMSATORIGOUUID-72488
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.