Every CVE Search/ Get API key

CVE-2023-42811

AEADs/aes-gcm: Plaintext exposed in decrypt_in_place_detached even on tag verification failure

4.7 MediumFix available

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.

Attack profile

How easy it is to exploit

Attack vector
Local
Complexity
High
Privileges needed
High
User interaction
None

What an attacker can affect

Confidentiality
Low
Integrity
High
Availability
None

Exploit likelihood

0.23%Up 0.2 points since Sep 23, 2023
90%50%10%1%

What each source reports

CVE List Score used 4.7

AEADs/aes-gcm: Plaintext exposed in decrypt_in_place_detached even on tag verification failure

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.

Record
CVE-2023-42811
CVSS 3.1
4.7 MediumCVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:L/I:H/A:N
Weakness
CWE-347
Updated
2026-11-02
EUVDEUVD-2023-2411 4.7

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.

Record
EUVD-2023-2411
CVSS 3.1
4.7 MediumCVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:L/I:H/A:N
Updated
2026-11-02
GitHub AdvisoriesGHSA-423w-p2w9-r7vq 4.7

AEADs/aes-gcm: Plaintext exposed in decrypt_in_place_detached even on tag verification failure

Summary

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.

Impact

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.

Details

As seen in the implementation of decrypt_in_place_detached for AES GCM, if the tag verification fails, an error is returned. Because the decryption of the ciphertext is done in place, the plaintext contents are now exposed via buffer.

This should ideally not be the case - as noted in page 17 of NIST's publication Recommendation for Block Cipher Modes of Operation: Galois/Counter Mode (GCM) and GMAC: In Step 8, the result of Step 7 is compared with the authentication tag that was received as an input: if they are identical, then the plaintext is returned; otherwise,FAIL is returned.

This is seems correctly addressed in the AES GCM SIV implementation, where the decrypted buffer is encrypted again before the error is returned - this fix is straightforward to implement in AES GCM. To ensure that these types of cases are covered during testing, it would be valuable to add test cases like 23, 24 etc from project wycheproof to ensure that when a bad tag is used, there is an error on decryption and that the plaintext value is not exposed.

PoC

To reproduce this issue, I'm using test case 23 from project wycheproof.

    let key = GenericArray::from_slice(&hex!("000102030405060708090a0b0c0d0e0f"));
    let nonce = GenericArray::from_slice(&hex!("505152535455565758595a5b"));
    let tag = GenericArray::from_slice(&hex!("d9847dbc326a06e988c77ad3863e6083")); // bad tag
    let mut ct = hex!("eb156d081ed6b6b55f4612f021d87b39");
    let msg = hex!("202122232425262728292a2b2c2d2e2f");
    let aad = hex!("");
    let cipher = Aes128Gcm::new(&key);
    let _plaintext = cipher.decrypt_in_place_detached(&nonce, &aad, &mut ct, &tag);
    assert_eq!(ct, msg);
Record
GHSA-423w-p2w9-r7vq
CVSS 3.1
4.7 MediumCVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:L/I:H/A:N
Weakness
CWE-347
Updated
2026-11-02
NVD 4.7

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.

Record
CVE-2023-42811
CVSS 3.1
4.7 MediumCVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:L/I:H/A:N
CVSS 3.1
5.5 MediumCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
Weakness
CWE-347
Updated
2026-11-02
OSV 4.7

AEADs/aes-gcm: Plaintext exposed in decrypt_in_place_detached even on tag verification failure

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.

Record
CVE-2023-42811
CVSS 3.1
4.7 MediumCVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:L/I:H/A:N
Weakness
CWE-347
Updated
2026-11-02
OSVGHSA-423w-p2w9-r7vq 4.7

AEADs/aes-gcm: Plaintext exposed in decrypt_in_place_detached even on tag verification failure

Summary

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.

Impact

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.

Details

As seen in the implementation of decrypt_in_place_detached for AES GCM, if the tag verification fails, an error is returned. Because the decryption of the ciphertext is done in place, the plaintext contents are now exposed via buffer.

This should ideally not be the case - as noted in page 17 of NIST's publication Recommendation for Block Cipher Modes of Operation: Galois/Counter Mode (GCM) and GMAC: In Step 8, the result of Step 7 is compared with the authentication tag that was received as an input: if they are identical, then the plaintext is returned; otherwise,FAIL is returned.

This is seems correctly addressed in the AES GCM SIV implementation, where the decrypted buffer is encrypted again before the error is returned - this fix is straightforward to implement in AES GCM. To ensure that these types of cases are covered during testing, it would be valuable to add test cases like 23, 24 etc from project wycheproof to ensure that when a bad tag is used, there is an error on decryption and that the plaintext value is not exposed.

PoC

To reproduce this issue, I'm using test case 23 from project wycheproof.

    let key = GenericArray::from_slice(&hex!("000102030405060708090a0b0c0d0e0f"));
    let nonce = GenericArray::from_slice(&hex!("505152535455565758595a5b"));
    let tag = GenericArray::from_slice(&hex!("d9847dbc326a06e988c77ad3863e6083")); // bad tag
    let mut ct = hex!("eb156d081ed6b6b55f4612f021d87b39");
    let msg = hex!("202122232425262728292a2b2c2d2e2f");
    let aad = hex!("");
    let cipher = Aes128Gcm::new(&key);
    let _plaintext = cipher.decrypt_in_place_detached(&nonce, &aad, &mut ct, &tag);
    assert_eq!(ct, msg);
Record
GHSA-423w-p2w9-r7vq
CVSS 3.1
4.7 MediumCVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:L/I:H/A:N
Weakness
CWE-347
Updated
2026-11-02
OSVRUSTSEC-2023-0096 4.7

Plaintext exposed in decrypt_in_place_detached even on tag verification failure

Summary

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.

Impact

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.

Details

As seen in the implementation of decrypt_in_place_detached for AES GCM, if the tag verification fails, an error is returned. Because the decryption of the ciphertext is done in place, the plaintext contents are now exposed via buffer.

This should ideally not be the case - as noted in page 17 of NIST's publication Recommendation for Block Cipher Modes of Operation: Galois/Counter Mode (GCM) and GMAC:

In Step 8, the result of Step 7 is compared with the authentication tag that was received as an input: if they are identical, then the plaintext is returned; otherwise,FAIL is returned.

This is seems correctly addressed in the AES GCM SIV implementation, where the decrypted buffer is encrypted again before the error is returned - this fix is straightforward to implement in AES GCM. To ensure that these types of cases are covered during testing, it would be valuable to add test cases like 23, 24 etc from project wycheproof to ensure that when a bad tag is used, there is an error on decryption and that the plaintext value is not exposed.

PoC

To reproduce this issue, I'm using test case 23 from project wycheproof.

    let key = GenericArray::from_slice(&hex!("000102030405060708090a0b0c0d0e0f"));
    let nonce = GenericArray::from_slice(&hex!("505152535455565758595a5b"));
    let tag = GenericArray::from_slice(&hex!("d9847dbc326a06e988c77ad3863e6083")); // bad tag
    let mut ct = hex!("eb156d081ed6b6b55f4612f021d87b39");
    let msg = hex!("202122232425262728292a2b2c2d2e2f");
    let aad = hex!("");
    let cipher = Aes128Gcm::new(&key);
    let _plaintext = cipher.decrypt_in_place_detached(&nonce, &aad, &mut ct, &tag);
    assert_eq!(ct, msg);
Record
RUSTSEC-2023-0096
CVSS 3.1
4.7 MediumCVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:L/I:H/A:N
Updated
2026-11-02
OSVopenSUSE-SU-2024:13315-1 No score

shadowsocks-rust-1.16.2-1.1 on GA media

These are all security issues fixed in the shadowsocks-rust-1.16.2-1.1 package on the GA media of openSUSE Tumbleweed.

Record
openSUSE-SU-2024:13315-1
Updated
2026-11-02
OSVSUSE-SU-2023:4060-1 No score

Security update for rage-encryption

This update for rage-encryption fixes the following issues:

-CVE-2023-42811: chosen ciphertext attack possible against aes-gcm (bsc#1215657)

  • update vendor.tar.zst to contain aes-gcm >= 0.10.3
  • Update to version 0.9.2+0:

    • CI: Ensure apt repository is up-to-date before installing build deps
    • CI: Build Linux releases using ubuntu-20.04 runner
    • CI: Remove most uses of actions-rs actions
  • Update to version 0.9.2+0:

    • Fix changelog bugs and add missing entry
    • Document PINENTRY_PROGRAM environment variable
    • age: Add Decryptor::new_async_buffered
    • age: impl AsyncBufRead for ArmoredReader
    • Pre-initialize vectors when the capacity is known, or use arrays
    • Use PINENTRY_PROGRAM as environment variable for pinentry
    • Document why impl AsyncWrite for StreamWriter doesn't loop indefinitely
    • cargo update
    • cargo vet prune
    • Migrate to cargo-vet 0.7
    • build(deps): bump svenstaro/upload-release-action from 2.5.0 to 2.6.1
    • Correct spelling in documentation
    • build(deps): bump codecov/codecov-action from 3.1.1 to 3.1.4
    • StreamWriter AsyncWrite: fix usage with futures::io::copy()
    • rage: Use Decryptor::new_buffered
    • age: Add Decryptor::new_buffered
    • age: impl BufRead for ArmoredReader
    • Update Homebrew formula to v0.9.1
    • feat/pinentry: Use env var to define pinentry binary
  • Update to version 0.9.1+0:

    • ssh: Fix parsing of OpenSSH private key format
    • ssh: Support [email protected] ciphers for encrypted keys
    • ssh: Add [email protected] cipher to test cases
    • ssh: Extract common key material derivation logic for encrypted keys
    • ssh: Use associated constants for key and IV sizes
    • ssh: Add test cases for encrypted keys
  • Add shell completions for fish and zsh.

Record
SUSE-SU-2023:4060-1
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
aes-gcm
crates.io
0.10.0 to 0.10.2
0.10.3
aes-gcm
crates.io
0.10.0 up to 0.10.3
0.10.3
rage-encryption
SUSE:Linux Enterprise Module for Basesystem 15 SP5
before 0.9.2+0-150500.3.3.1
0.9.2+0-150500.3.3.1
rage-encryption
openSUSE:Leap 15.5
before 0.9.2+0-150500.3.3.1
0.9.2+0-150500.3.3.1
shadowsocks-rust
openSUSE:Tumbleweed
before 1.16.2-1.1
1.16.2-1.1

History

History
RecordedChangedSources
first indexedCVE List, EUVD, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2023-42811 is a medium vulnerability (CVSS 4.7) in Aes-gcm Project Aes-gcm, published September 22, 2023. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.23%, the 13th percentile. Fixed in aes-gcm 0.10.3.

References

Show 9 moreShow less
MoveEnter Open