# 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.

- **Severity:** Medium 4.7 (`CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:L/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** An administrator
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 22 Sep 2023
- **Updated:** 18 Jun 2025
- **Also known as:** GHSA-423w-p2w9-r7vq, RUSTSEC-2023-0096, SUSE-SU-2023:4060-1, openSUSE-SU-2024:13315-1

## 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 (Improper Verification of Cryptographic Signature)

## Which versions are affected by CVE-2023-42811?

3 open source packages ship an affected version, including aes-gcm. It affects 2 products.


| Package | Ecosystem | 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 |
| `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: 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.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2023-42811 and fix it if it is affected.

What it is: 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.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-42811 exists.

Affected packages and fixed versions:
- aes-gcm (crates.io): affected from 0.10.0; fixed in 0.10.3
- aes-gcm (crates.io): affected from 0.10.0; fixed in 0.10.3
- aes-gcm (crates.io): affected from 0.10.0; fixed in 0.10.3

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2023-42811/ (Markdown: https://insights.sbomify.com/CVE-2023-42811/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2023-42811
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2023-42811
- OSV: https://osv.dev/vulnerability/CVE-2023-42811

---
From sbomify Insights: https://insights.sbomify.com/CVE-2023-42811/
Summaries are generated and may contain mistakes; the official description above is the record.
