CVE-2023-42811 AEADs/aes-gcm: Plaintext exposed in decrypt_in_place_detached even on tag verification failure
The aes-gcm Rust library exposes decrypted plaintext even when authentication tags fail, potentially enabling chosen ciphertext attacks and full plaintext recovery.
- Exploited in the wild
- Not known
- Login needed
- An administrator
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2023-42811?
CVE-2023-42811 is a medium-severity vulnerability in Fedoraproject Fedora, published on 22 Sep 2023. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
aes-gcm is a pure Rust implementation of the AES-GCM. Starting in version 0.10.0 and prior to version 0.10.3, in the AES GCM implementation of decrypt_in_place_detached, the decrypted ciphertext (i.e. the correct plaintext) is exposed even if tag verification fails. If a program using the `aes-gcm` crate's `decrypt_in_place*` APIs accesses the buffer after decryption failure, it will contain a decryption of an unauthenticated input. Depending on the specific nature of the program this may enable Chosen Ciphertext Attacks (CCAs) which can cause a catastrophic breakage of the cipher including full plaintext recovery. Version 0.10.3 contains a fix for this issue.
Weakness: CWE-347
Which versions are affected by CVE-2023-42811?
3 open source packages ship an affected version, including aes-gcm. It affects 2 products.
| Package | Affected | Fixed in |
|---|---|---|
aes-gcm crates.io | From 0.10.0 | 0.10.3 |
aes-gcm crates.io | From 0.10.0 | 0.10.3 |
aes-gcm crates.io | From 0.10.0 | 0.10.3 |
Linux distribution packages (3)
rage-encryption SUSE:Linux Enterprise Module for Basesystem 15 SP5 | All versions | 0.9.2+0-150500.3.3.1 |
rage-encryption openSUSE:Leap 15.5 | All versions | 0.9.2+0-150500.3.3.1 |
shadowsocks-rust openSUSE:Tumbleweed | All versions | 1.16.2-1.1 |
Products include Aes-Gcm Project Aes-Gcm, Fedoraproject Fedora.
How do I fix CVE-2023-42811?
Upgrade aes-gcm to 0.10.3 or later.
Is CVE-2023-42811 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-42811 exists.
Sources
Also known as GHSA-423w-p2w9-r7vq, RUSTSEC-2023-0096, SUSE-SU-2023:4060-1, openSUSE-SU-2024:13315-1.