Chainguard SDK: AWS SigV4 token replay in auth/aws.VerifyToken — Chainguard-Audience/Chainguard-Identity binding headers not required in SignedHeaders
The auth/aws package of the chainguard.dev/sdk Go library provides Chainguard's AWS-backed identity federation (an AWS workload proves its identity to Chainguard by signing an AWS STS GetCallerIdentity request). Its verifier, VerifyToken, reads the Chainguard-Audience and Chainguard-Identity binding headers from a presented token but does not require them to be covered by the SigV4 signature. AWS STS validates only the headers listed in SignedHeaders and ignores all others, so an attacker can take a GetCallerIdentity request that a victim signed for a different relying party, inject or rewrite those two headers after signing (without invalidating the signature), and replay it to any service that authenticates callers with VerifyToken. The binding those headers were meant to provide is therefore forgeable — a verifier-side (relying-party) authentication bypass / cross-service token replay.
Recorded fixes — chainguard.dev/sdk: 0.1.107. Check your release branch.
Exploitation not established
| Affected range | Recorded fix |
|---|---|
| Earlier releases before 0.1.107Semantic versions | 0.1.107 |
Version evidence: OSV · GHSA-wq26-3j2m-4hvv
View original version evidence
{
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "0.1.107"
}
],
"type": "SEMVER"
}
],
"versions": []
}