# Chainguard SDK: AWS SigV4 token replay in auth/aws.VerifyToken — Chainguard-Audience/Chainguard-Identity binding headers not required in SignedHeaders

Chainguard SDK's VerifyToken trusted Chainguard-Audience/Identity headers not covered by SigV4 SignedHeaders, letting attackers replay a victim's signed GetCallerIdentity for any audience/identity.

- Payout: Research
- Severity: high
- Program: Chainguard SDK
- Found by: KrisKennawayDD
- Disclosed: 2026-11-18
- CVE: CVE-2026-71861
- Write-up quality: 7/10
- Original: https://github.com/advisories/GHSA-wq26-3j2m-4hvv
- Library page: https://bugbountylibrary.com/r/ghsa%3AGHSA-wq26-3j2m-4hvv
- Tags: area:oss domain:cloud domain:oss impact:ato impact:internal-access kind:research platform:ghsa sev:high tech:aws tech:go technique:source-review vuln:auth-bypass vuln:signature-replay

**Target:** auth/aws.VerifyToken verifier in chainguard.dev/sdk Go library
**Root cause:** VerifyToken reads Chainguard-Audience and Chainguard-Identity headers but never checks they appear in the SigV4 SignedHeaders list; AWS STS ignores unsigned headers, so they can be injected or rewritten after signing without breaking the signature.
**Steps:**
1. Obtain a fresh GetCallerIdentity request signed by a victim AWS principal for another relying party (Vault, aws-iam-authenticator, logs, proxy).
2. Inject or rewrite `Chainguard-Audience` and `Chainguard-Identity` headers in the request after signing.
3. Present the modified token to a service calling `auth/aws.VerifyToken`.
4. Verifier trusts the forged headers, forwards to AWS STS which validates only SignedHeaders, and returns the victim's ARN for the attacker-chosen audience/identity.
**How found:** Reporter compared the verifier's header handling against SigV4 semantics and the Vault mitigation (X-Vault-AWS-IAM-Server-ID must be in SignedHeaders), noticing VerifyToken trusted headers that were never required to be signed.
**Exploitation:** Attacker needs only a fresh (~15 min window) signed GetCallerIdentity request from the victim principal, no AWS credentials. They rewrite the two binding headers post-signature and replay to any VerifyToken-based relying party, which then issues a Chainguard token for the victim's AWS identity under an attacker-chosen audience.
**Escalation:** Cross-service replay: a proof minted for Vault, aws-iam-authenticator, or a different audience is repurposed to impersonate the victim's AWS identity to any Chainguard verifier.
**Insight:** When a verifier trusts any header from a SigV4-signed request, explicitly assert that header is in SignedHeaders — AWS STS validates only listed headers, so unsigned ones are attacker-controlled. Check every 'signed GetCallerIdentity' verifier for this same gap.

