Impact
This vulnerability only affects users of the AWS attestor.
User's of the AWS attestor could have unknowingly received a forged identity document. While this may seem unlikely, AWS recently issued a security bulletin about IMDS (Instance Metadata Service) impersonation.1
There are multiple locations where the verification of the identity document will mistakenly report a successful verification.
Workarounds
The contents of the AWS attestation contain the identity document, signature, and public key that was used to verify the document. These attestations and their could be identity documents could be manually verified with the openssl
command line as documented in the below reference from AWS.2
However, the certificate containing the public key was hard-coded into the attestor.
|
// https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/verify-signature.html |
|
// The following AWS public certificate is for all AWS Regions, except Hong Kong, Bahrain, China, and GovCloud. |
|
awsCACertPEM = `-----BEGIN CERTIFICATE----- |
|
MIIDIjCCAougAwIBAgIJAKnL4UEDMN/FMA0GCSqGSIb3DQEBBQUAMGoxCzAJBgNV |
|
BAYTAlVTMRMwEQYDVQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdTZWF0dGxlMRgw |
|
FgYDVQQKEw9BbWF6b24uY29tIEluYy4xGjAYBgNVBAMTEWVjMi5hbWF6b25hd3Mu |
|
Y29tMB4XDTE0MDYwNTE0MjgwMloXDTI0MDYwNTE0MjgwMlowajELMAkGA1UEBhMC |
|
VVMxEzARBgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1NlYXR0bGUxGDAWBgNV |
|
BAoTD0FtYXpvbi5jb20gSW5jLjEaMBgGA1UEAxMRZWMyLmFtYXpvbmF3cy5jb20w |
|
gZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAIe9GN//SRK2knbjySG0ho3yqQM3 |
|
e2TDhWO8D2e8+XZqck754gFSo99AbT2RmXClambI7xsYHZFapbELC4H91ycihvrD |
|
jbST1ZjkLQgga0NE1q43eS68ZeTDccScXQSNivSlzJZS8HJZjgqzBlXjZftjtdJL |
|
XeE4hwvo0sD4f3j9AgMBAAGjgc8wgcwwHQYDVR0OBBYEFCXWzAgVyrbwnFncFFIs |
|
77VBdlE4MIGcBgNVHSMEgZQwgZGAFCXWzAgVyrbwnFncFFIs77VBdlE4oW6kbDBq |
|
MQswCQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHU2Vh |
|
dHRsZTEYMBYGA1UEChMPQW1hem9uLmNvbSBJbmMuMRowGAYDVQQDExFlYzIuYW1h |
|
em9uYXdzLmNvbYIJAKnL4UEDMN/FMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEF |
|
BQADgYEAFYcz1OgEhQBXIwIdsgCOS8vEtiJYF+j9uO6jz7VOmJqO+pRlAbRlvY8T |
|
C1haGgSI/A1uZUKs/Zfnph0oEI0/hu1IIJ/SKBDtN5lvmZ/IzbOPIJWirlsllQIQ |
|
7zvWbGd9c9+Rm3p04oTvhup99la7kZqevJK0QRdD/6NpCKsqP/0= |
|
-----END CERTIFICATE-----` |
Since the original authoring of the attestor, AWS has moved to region specific public certificates. The currently valid certificates were issued around April of 2024, making the identification of attestations with forged content difficult without additional trusted data proving the AWS region in which the attestation was created.
Patches
This vulnerability is addressed in go-witness
0.9.1 and witness
0.10.1.
References
Impact
This vulnerability only affects users of the AWS attestor.
User's of the AWS attestor could have unknowingly received a forged identity document. While this may seem unlikely, AWS recently issued a security bulletin about IMDS (Instance Metadata Service) impersonation.1
There are multiple locations where the verification of the identity document will mistakenly report a successful verification.
If a signature is not present or is empty
go-witness/attestation/aws-iid/aws-iid.go
Lines 161 to 163 in 0c8bb30
If the RSA verification of the document fails for any reason
go-witness/attestation/aws-iid/aws-iid.go
Lines 192 to 196 in 0c8bb30
Workarounds
The contents of the AWS attestation contain the identity document, signature, and public key that was used to verify the document. These attestations and their could be identity documents could be manually verified with the
openssl
command line as documented in the below reference from AWS.2However, the certificate containing the public key was hard-coded into the attestor.
go-witness/attestation/aws-iid/aws-iid.go
Lines 46 to 66 in 0c8bb30
Since the original authoring of the attestor, AWS has moved to region specific public certificates. The currently valid certificates were issued around April of 2024, making the identification of attestations with forged content difficult without additional trusted data proving the AWS region in which the attestation was created.
Patches
This vulnerability is addressed in
go-witness
0.9.1 andwitness
0.10.1.References
Footnotes
AWS Security Bulletin on IMDS Impersonation ↩
Verification of instance identity documents ↩