Every CVESearch/Get API key

GHSA-vv3j-mww7-7h5p

GitHub Security Lab (GHSL) Vulnerability Report, cosign: GHSL-2026-236 The GitHub Security Lab team has identified a…

Explain with AI
ChatGPTClaudeGoogle AI
Scores
Unknown
No source reports a CVSS or EPSS score yet.
Exploitation
Unknown
No source reports exploitation yet.
Listed fix
None listed
No source lists a fixed version in its version data.Check the description and references.

Overview

GitHub Security Lab (GHSL) Vulnerability Report, cosign: GHSL-2026-236

The GitHub Security Lab team has identified a potential security vulnerability in cosign.

We are committed to working with you to help resolve this issue. In this report you will find everything you need to effectively coordinate a resolution of this issue with the GHSL team.

If at any point you have concerns or questions about this process, please do not hesitate to reach out to us at securitylab@github.com (please include GHSL-2026-236 as a reference). See also this blog post written by GitHub's Advisory Curation team which explains what CVEs and advisories are, why they are important to track vulnerabilities and keep downstream users informed, the CVE assigning process, and how they are used to keep open source software secure.

If you are NOT the correct point of contact for this report, please let us know!

Summary

In pkg/cosign/verify.go, VerifyRFC3161Timestamp selects the bytes compared against the TSA MessageImprint based on the attacker-controlled dev.cosignproject.cosign/signature annotation, while attestation verification (verifyOCIAttestation) only verifies the DSSE envelope from Payload(). The RFC3161 timestamp is therefore not bound to the verified attestation, allowing reuse of a leaked, expired ephemeral Fulcio key to produce attestations that verify in TSA-only mode.

Project

cosign

Tested Version

0238975

Details

RFC3161 timestamp is not bound to the verified DSSE envelope on the attestation path (GHSL-2026-236)

VerifyRFC3161Timestamp (https://github.com/sigstore/cosign/blob/0238975/pkg/cosign/verify.go#L1401-L1458) picks the timestamped bytes from attacker-supplied data:

b64Sig := sig.Base64Signature()        // verify.go:1412-1415 — attacker-controlled annotation
...
if len(b64Sig) == 0 {                  // verify.go:1418-1432
    tsBytes = sig.Payload()
} else {
    tsBytes = base64Decode(b64Sig)
}
// verify.go:1452-1457 (legacy branch)
tsaverification.VerifyTimestampResponse(ts.SignedRFC3161Timestamp, bytes.NewReader(tsBytes), ...)

But verifyOCIAttestation (https://github.com/sigstore/cosign/blob/0238975/pkg/cosign/verify.go#L292-L314) only reads att.Payload(), unmarshals it to a ssldsse.Envelope and runs dssev.Verify(...); it never consults Base64Signature(). Neither does IntotoSubjectClaimVerifier (pkg/cosign/verifiers.go#L58-L94).

verifyInternal (https://github.com/sigstore/cosign/blob/0238975/pkg/cosign/verify.go#L815-L963) stores the TSA time at L821-828 and then uses it at L933-939 in CheckExpiry(cert, chain, *acceptableRFC3161Time).

The annotation is attacker-controlled: pkg/oci/internal/signature/layer.go#L92-L99 returns desc.Annotations["dev.cosignproject.cosign/signature"], and pkg/oci/static/signature.go#L61-L116 (static.Copy) copies it verbatim into the object passed to verifyInternal.

Plain image signatures are not affected, because verifyOCISignature (verify.go:316-330) verifies the same Base64Signature bytes used for tsBytes.

Proof of concept

Preconditions: verifier uses the attestation path (cosign verify-attestation / VerifyImageAttestations) with co.UseSignedTimestamps=true and co.IgnoreTlog=true; attacker has push access to the attestation location and a leaked ephemeral Fulcio key K plus its now-expired leaf cert C matching the verifier's identity policy.

Attack:

  1. Take any trusted-TSA token T_old whose MessageImprint covers known bytes E_old (the original legitimate attestation's serialized DSSE envelope alone, which is what Payload() returns and therefore the only input this code hashes) and whose signed time t0 falls inside C's validity window.
  2. Build a new in-toto Statement whose subject digest is the malicious image digest, wrap it in DSSE envelope E_mal, and sign it with K.
  3. Push a layer to <malicious-digest>.att with payload E_mal, annotation dev.cosignproject.cosign/signature = base64(E_old) (non-empty), dev.sigstore.cosign/certificate = PEM(C), dev.sigstore.cosign/rfc3161timestamp = JSON(T_old).
  4. Run cosign verify-attestation --use-signed-timestamps --ignore-tlog ... against the malicious image: the TSA check verifies T_old against E_old, verifyOCIAttestation verifies E_mal with C.PublicKey, the subject claim matches the malicious digest, and CheckExpiry(C, chain, t0) passes. The attestation is reported as verified.

An equivalent in-module Go test reproduces this with a local Fulcio-like CA, local TSA chain and a mock TSA client issuing a token at t0 = now-2h, with a leaf cert valid only [t0-5m, t0+5m] (expired at verification time):

static.NewSignature(eMal, base64(eOld),
    static.WithCertChain(expiredLeaf, chain),
    static.WithRFC3161Timestamp(tokenOverEOld))
// -> verifyInternal(..., verifyOCIAttestation, co) with
//    UseSignedTimestamps=true, IgnoreTlog=true, Identities=[trusted@example.com]
// ACCEPTS.

The control leg — identical but with an empty Base64Signature (the honest layout) — makes tsBytes = Payload() and is correctly rejected with unable to verify RFC3161 timestamp bundle: hashed messages don't match.

Impact

An attacker who obtains a leaked ephemeral Fulcio key and its expired certificate can forge arbitrary in-toto attestations for arbitrary images that cosign-based verifiers and admission controllers running in TSA-only mode accept as validly signed within the certificate's validity window. This grants unlimited reuse of a leaked ephemeral key past its intended ~10-minute lifetime, defeating the short-lived-certificate security model that the timestamp binding exists to enforce.

Remediation

On the attestation path, derive the bytes fed to the TSA MessageImprint comparison from the entity that is actually cryptographically verified: always use the serialized DSSE envelope returned by sig.Payload() regardless of whether the dev.cosignproject.cosign/signature annotation is set. That is already the input on the honest attestation path, so retaining it keeps existing attestation timestamps verifiable; selecting the raw signature bytes out of the envelope's signatures field instead would change the MessageImprint input and invalidate every attestation timestamped to date, and/or reject attestations that carry a non-empty Base64Signature annotation.

CWEs

  • CWE-345: Insufficient Verification of Data Authenticity
  • CWE-347: Improper Verification of Cryptographic Signature
  • CWE-298: Improper Validation of Certificate Expiration

GitHub Security Advisories

This report was submitted through private vulnerability reporting, so it already exists as a draft repository security advisory on this repository. Accepting it lets you collaborate with the GHSL team in private, add the affected package and version range, request a CVE, and publish once a fix is available.

Credit

This issue was discovered with the GitHub Security Lab Taskflow Agent as part of Project Glasswing, a cross-industry initiative to secure critical open-source software using frontier AI models, and manually verified by @anticomputer (Bas).

Contact

You can contact the GHSL team at securitylab@github.com, please include a reference to GHSL-2026-236 in any communication regarding this issue.

Disclosure Policy

This report is subject to a 90-day disclosure deadline, as described in more detail in our coordinated disclosure policy.

Affected

Packages 8

Affected packages
PackageAffectedFixed
cosign-2-dev
Docker Hardened Images:Alpine:3.23
2.6.2-r0 and later, plus listed versions
2.6.2-r12.6.2-r22.6.2-r32.6.3-r02.6.3-r1
Show 26 more versionsShow less
2.6.3-r102.6.3-r22.6.3-r32.6.3-r42.6.3-r52.6.3-r62.6.3-r72.6.3-r82.6.3-r92.6.4-r02.6.4-r12.6.5-r02.6.5-r12.6.5-r102.6.5-r112.6.5-r122.6.5-r132.6.5-r142.6.5-r22.6.5-r32.6.5-r42.6.5-r52.6.5-r62.6.5-r72.6.5-r82.6.5-r9
None listed
cosign-2-fips-dev
Docker Hardened Images:Alpine:3.23
2.6.2-r0 and later, plus listed versions
2.6.2-r12.6.2-r22.6.2-r32.6.3-r02.6.3-r1
Show 26 more versionsShow less
2.6.3-r102.6.3-r22.6.3-r32.6.3-r42.6.3-r52.6.3-r62.6.3-r72.6.3-r82.6.3-r92.6.4-r02.6.4-r12.6.5-r02.6.5-r12.6.5-r102.6.5-r112.6.5-r122.6.5-r132.6.5-r142.6.5-r22.6.5-r32.6.5-r42.6.5-r52.6.5-r62.6.5-r72.6.5-r82.6.5-r9
None listed
cosign-2-fips
Docker Hardened Images:Alpine:3.23
2.6.2-r0 and later, plus listed versions
2.6.2-r12.6.2-r22.6.2-r32.6.3-r02.6.3-r1
Show 26 more versionsShow less
2.6.3-r102.6.3-r22.6.3-r32.6.3-r42.6.3-r52.6.3-r62.6.3-r72.6.3-r82.6.3-r92.6.4-r02.6.4-r12.6.5-r02.6.5-r12.6.5-r102.6.5-r112.6.5-r122.6.5-r132.6.5-r142.6.5-r22.6.5-r32.6.5-r42.6.5-r52.6.5-r62.6.5-r72.6.5-r82.6.5-r9
None listed
cosign-2
Docker Hardened Images:Alpine:3.23
2.6.2-r0 and later, plus listed versions
2.6.2-r12.6.2-r22.6.2-r32.6.3-r02.6.3-r1
Show 26 more versionsShow less
2.6.3-r102.6.3-r22.6.3-r32.6.3-r42.6.3-r52.6.3-r62.6.3-r72.6.3-r82.6.3-r92.6.4-r02.6.4-r12.6.5-r02.6.5-r12.6.5-r102.6.5-r112.6.5-r122.6.5-r132.6.5-r142.6.5-r22.6.5-r32.6.5-r42.6.5-r52.6.5-r62.6.5-r72.6.5-r82.6.5-r9
None listed
cosign-3-dev
Docker Hardened Images:Alpine:3.23
3.0.4-r0 and later, plus listed versions
3.0.5-r03.0.5-r13.0.5-r23.0.5-r33.0.6-r0
Show 33 more versionsShow less
3.0.6-r13.0.6-r23.0.6-r33.0.6-r43.0.6-r53.0.6-r63.1.1-r03.1.1-r13.1.1-r23.1.2-r03.1.2-r13.1.3-r03.1.3-r13.1.3-r103.1.3-r113.1.3-r123.1.3-r133.1.3-r23.1.3-r33.1.3-r43.1.3-r53.1.3-r63.1.3-r73.1.3-r83.1.3-r93.1.4-r03.1.4-r13.1.4-r23.1.4-r33.1.4-r43.1.4-r53.1.5-r03.1.6-r0
None listed
cosign-3-fips-dev
Docker Hardened Images:Alpine:3.23
3.0.4-r0 and later, plus listed versions
3.0.5-r03.0.5-r13.0.5-r23.0.5-r33.0.6-r0
Show 33 more versionsShow less
3.0.6-r13.0.6-r23.0.6-r33.0.6-r43.0.6-r53.0.6-r63.1.1-r03.1.1-r13.1.1-r23.1.2-r03.1.2-r13.1.3-r03.1.3-r13.1.3-r103.1.3-r113.1.3-r123.1.3-r133.1.3-r23.1.3-r33.1.3-r43.1.3-r53.1.3-r63.1.3-r73.1.3-r83.1.3-r93.1.4-r03.1.4-r13.1.4-r23.1.4-r33.1.4-r43.1.4-r53.1.5-r03.1.6-r0
None listed
cosign-3-fips
Docker Hardened Images:Alpine:3.23
3.0.4-r0 and later, plus listed versions
3.0.5-r03.0.5-r13.0.5-r23.0.5-r33.0.6-r0
Show 33 more versionsShow less
3.0.6-r13.0.6-r23.0.6-r33.0.6-r43.0.6-r53.0.6-r63.1.1-r03.1.1-r13.1.1-r23.1.2-r03.1.2-r13.1.3-r03.1.3-r13.1.3-r103.1.3-r113.1.3-r123.1.3-r133.1.3-r23.1.3-r33.1.3-r43.1.3-r53.1.3-r63.1.3-r73.1.3-r83.1.3-r93.1.4-r03.1.4-r13.1.4-r23.1.4-r33.1.4-r43.1.4-r53.1.5-r03.1.6-r0
None listed
cosign-3
Docker Hardened Images:Alpine:3.23
3.0.4-r0 and later, plus listed versions
3.0.5-r03.0.5-r13.0.5-r23.0.5-r33.0.6-r0
Show 33 more versionsShow less
3.0.6-r13.0.6-r23.0.6-r33.0.6-r43.0.6-r53.0.6-r63.1.1-r03.1.1-r13.1.1-r23.1.2-r03.1.2-r13.1.3-r03.1.3-r13.1.3-r103.1.3-r113.1.3-r123.1.3-r133.1.3-r23.1.3-r33.1.3-r43.1.3-r53.1.3-r63.1.3-r73.1.3-r83.1.3-r93.1.4-r03.1.4-r13.1.4-r23.1.4-r33.1.4-r43.1.4-r53.1.5-r03.1.6-r0
None listed

Sources

OSVDHI-5syw-tb6k-s4sl-daflNo score

# GitHub Security Lab (GHSL) Vulnerability Report, cosign: `GHSL-2026-236`

GitHub Security Lab (GHSL) Vulnerability Report, cosign: GHSL-2026-236

The GitHub Security Lab team has identified a potential security vulnerability in cosign.

We are committed to working with you to help resolve this issue. In this report you will find everything you need to effectively coordinate a resolution of this issue with the GHSL team.

If at any point you have concerns or questions about this process, please do not hesitate to reach out to us at securitylab@github.com (please include GHSL-2026-236 as a reference). See also this blog post written by GitHub's Advisory Curation team which explains what CVEs and advisories are, why they are important to track vulnerabilities and keep downstream users informed, the CVE assigning process, and how they are used to keep open source software secure.

If you are NOT the correct point of contact for this report, please let us know!

Summary

In pkg/cosign/verify.go, VerifyRFC3161Timestamp selects the bytes compared against the TSA MessageImprint based on the attacker-controlled dev.cosignproject.cosign/signature annotation, while attestation verification (verifyOCIAttestation) only verifies the DSSE envelope from Payload(). The RFC3161 timestamp is therefore not bound to the verified attestation, allowing reuse of a leaked, expired ephemeral Fulcio key to produce attestations that verify in TSA-only mode.

Project

cosign

Tested Version

0238975

Details

RFC3161 timestamp is not bound to the verified DSSE envelope on the attestation path (GHSL-2026-236)

VerifyRFC3161Timestamp (https://github.com/sigstore/cosign/blob/0238975/pkg/cosign/verify.go#L1401-L1458) picks the timestamped bytes from attacker-supplied data:

b64Sig := sig.Base64Signature()        // verify.go:1412-1415 — attacker-controlled annotation
...
if len(b64Sig) == 0 {                  // verify.go:1418-1432
    tsBytes = sig.Payload()
} else {
    tsBytes = base64Decode(b64Sig)
}
// verify.go:1452-1457 (legacy branch)
tsaverification.VerifyTimestampResponse(ts.SignedRFC3161Timestamp, bytes.NewReader(tsBytes), ...)

But verifyOCIAttestation (https://github.com/sigstore/cosign/blob/0238975/pkg/cosign/verify.go#L292-L314) only reads att.Payload(), unmarshals it to a ssldsse.Envelope and runs dssev.Verify(...); it never consults Base64Signature(). Neither does IntotoSubjectClaimVerifier (pkg/cosign/verifiers.go#L58-L94).

verifyInternal (https://github.com/sigstore/cosign/blob/0238975/pkg/cosign/verify.go#L815-L963) stores the TSA time at L821-828 and then uses it at L933-939 in CheckExpiry(cert, chain, *acceptableRFC3161Time).

The annotation is attacker-controlled: pkg/oci/internal/signature/layer.go#L92-L99 returns desc.Annotations["dev.cosignproject.cosign/signature"], and pkg/oci/static/signature.go#L61-L116 (static.Copy) copies it verbatim into the object passed to verifyInternal.

Plain image signatures are not affected, because verifyOCISignature (verify.go:316-330) verifies the same Base64Signature bytes used for tsBytes.

Proof of concept

Preconditions: verifier uses the attestation path (cosign verify-attestation / VerifyImageAttestations) with co.UseSignedTimestamps=true and co.IgnoreTlog=true; attacker has push access to the attestation location and a leaked ephemeral Fulcio key K plus its now-expired leaf cert C matching the verifier's identity policy.

Attack:

  1. Take any trusted-TSA token T_old whose MessageImprint covers known bytes E_old (the original legitimate attestation's serialized DSSE envelope alone, which is what Payload() returns and therefore the only input this code hashes) and whose signed time t0 falls inside C's validity window.
  2. Build a new in-toto Statement whose subject digest…
Record
DHI-5syw-tb6k-s4sl-dafl
Updated
2026-12-04

The JSON record also has the rest of 1 source description.

History

Recorded by Every CVE

Changes recorded by Every CVE
DayChangedSources
First indexedOSV

Upstream dates may differ.

References

MoveEnter Open