Summary
Improper Certificate Validation in Cosign
Signing with a keypair
To reproduce this vulnerability, create a keypair and sign an image. Don't store the signature in Rekor:
$ cosign generate-key-pair
$ cosign sign --key cosign.key IMAGE
If an attacker has access to the signature in OCI, they can manipulate cosign into believing the entry was stored in Rekor even though it wasn't. To accomplish this, the attacker needs to:
- Pull the signature image
- Annotate the signature image with any valid Rekor bundle under the
dev.sigstore.cosign/bundleannotation - Push the signature image back to OCI
Verification then prints out the following:
$ cosign verify [--key] [IMAGE]
Verification for [IMAGE] --
The following checks were performed on each of these signatures:
- The cosign claims were validated
- Existence of the claims in the transparency log was verified offline
- The signatures were verified against the specified public key
- Any certificates were verified against the Fulcio roots.
[…]
The claim that Existence of the claims in the transparency log was verified offline is inaccurate since an entry for this image doesn't exist in the log.
The claim that Any certificates were verified against the Fulcio roots. is technically correct but since there were no certificates that should be explicitly called out.
"Keyless signing" with an OIDC flow
To reproduce this vulnerability, sign the image with a Fulcio identity. Don't store the signature in Rekor:
$ COSIGN_EXPERIMENTAL=1 cosign sign IMAGE
[...]
IMAGE appears to be a private repository, please confirm uploading to the transparency log at "https://rekor.sigstore.dev" [Y/N]: n
Then, create a keypair and sign the image again. Store an entry for the signature in Rekor:
$ cosign generate-key-pair
$ COSIGN_EXPERIMENTAL=1 cosign sign --key cosign.key IMAGE
Enter password for private key: IMAGE appears to be a private repository, please confirm uploading to the transparency log at "https://rekor.sigstore.dev" [Y/N]: y
If an attacker has access to the signature in OCI, they can manipulate cosign into believing the entry was stored in Rekor even though it wasn't. To accomplish this, the attacker needs to:
- Pull the signature image
- Copy the rekor bundle from the second signature into the first signature under the
dev.sigstore.cosign/bundleannotation - Push the signature image back to OCI
Note: For this to work, both signatures must occur during the valid lifespan of the certificate (~20 minutes).
Verification then prints out the following:
$ cosign verify [--key] [IMAGE]
Verification for [IMAGE] --
The following checks were performed on each of these signatures:
- The cosign claims were validated
- Existence of the claims in the transparency log was verified offline
- The signatures were verified against the specified public key
- Any certificates were verified against the Fulcio roots.
[…]
The claim that Existence of the claims in the transparency log was verified offline is inaccurate since an entry for this image doesn't exist in the log.
The claim that Any certificates were verified against the Fulcio roots. is technically correct but since there were no certificates that should be explicitly called out.
Workarounds
The only workaround is upgrading.
For more information
If you have any questions or comments about this advisory:
Thank you
Thank you to @mtrmac for finding and reporting this vulnerability.
Thank you to everyone who worked on fixing this:
- @nsmith5
- @znewman01
- @dlorenc
- @mattmoor
- @priyawadhwa
Impact
Cosign can be manipulated to claim that an entry for a signature exists in the Rekor transparency log even if it doesn't. This requires the attacker to have pull and push permissions for the signature in OCI. This can happen with both standard signing with a keypair and "keyless signing" with Fulcio.
CVE-2022-23649 has a CVSS score of 3.3 (Low). The vector is requires local access, low privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (1.5.2); upgrading removes the vulnerable code path.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
The vulnerability has been patched in v1.5.2 of cosign.
The signature in the signedEntryTimestamp provided by Rekor is now compared to the signature that is being verified. If these don't match, then an error is returned. If a valid bundle is copied to a different signature, verification should fail.
Cosign output now only informs the user that certificates were verified if a certificate was in fact verified.
Frequently Asked Questions
- What is CVE-2022-23649? CVE-2022-23649 is a low-severity security vulnerability in github.com/sigstore/cosign (go), affecting versions < 1.5.2. It is fixed in 1.5.2.
- How severe is CVE-2022-23649? CVE-2022-23649 has a CVSS score of 3.3 (Low). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
- Which versions of github.com/sigstore/cosign are affected by CVE-2022-23649? github.com/sigstore/cosign (go) versions < 1.5.2 is affected.
- Is there a fix for CVE-2022-23649? Yes. CVE-2022-23649 is fixed in 1.5.2. Upgrade to this version or later.
- Is CVE-2022-23649 exploitable, and should I be worried? Whether CVE-2022-23649 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2022-23649 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2022-23649? Upgrade
github.com/sigstore/cosignto 1.5.2 or later.