CVE-2021-40530
The ElGamal implementation in Crypto++ through 8.5 allows plaintext recovery because, during...
The ElGamal implementation in Crypto++ through 8.5 allows plaintext recovery because, during interaction between two cryptographic libraries, a certain dangerous combination of the prime defined by the receiver's public key, the generator defined by the receiver's public key, and the sender's ephemeral exponents can lead to a cross-configuration attack against OpenPGP.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- High
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- None
- Availability
- None
Exploit likelihood
What each source reports
NVD Score used
5.9
The ElGamal implementation in Crypto++ through 8.5 allows plaintext recovery because, during interaction between two cryptographic libraries, a certain dangerous combination of the prime defined by the receiver's public key, the generator defined by the receiver's public key, and the sender's ephemeral exponents can lead to a cross-configuration attack against OpenPGP.
- Record
CVE-2021-40530- CVSS 3.1
- 5.9 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N - CVSS 2.0
- 2.6 Low
AV:N/AC:H/Au:N/C:P/I:N/A:N - Weakness
- CWE-327
- Updated
- 2026-11-02
CVE List No score
The ElGamal implementation in Crypto++ through 8.5 allows plaintext recovery because, during interaction between two cryptographic libraries, a certain dangerous combination of the prime defined by the receiver's public key, the generator defined by the receiver's public key, and the sender's ephemeral exponents can lead to a cross-configuration attack against OpenPGP.
- Record
CVE-2021-40530- Updated
- 2026-11-02
EUVDEUVD-2021-27705 No score
The ElGamal implementation in Crypto++ through 8.5 allows plaintext recovery because, during interaction between two cryptographic libraries, a certain dangerous combination of the prime defined by the receiver's public key, the generator defined by the receiver's public key, and the sender's ephemeral exponents can lead to a cross-configuration attack against OpenPGP.
- Record
EUVD-2021-27705- Updated
- 2026-11-03
GitHub AdvisoriesGHSA-p3r9-6fhw-hgv8 No score
The ElGamal implementation in Crypto++ through 8.5 allows plaintext recovery because, during...
The ElGamal implementation in Crypto++ through 8.5 allows plaintext recovery because, during interaction between two cryptographic libraries, a certain dangerous combination of the prime defined by the receiver's public key, the generator defined by the receiver's public key, and the sender's ephemeral exponents can lead to a cross-configuration attack against OpenPGP.
- Record
GHSA-p3r9-6fhw-hgv8- Weakness
- CWE-327
- Updated
- 2026-11-02
OSV
5.9
The ElGamal implementation in Crypto++ through 8.5 allows plaintext recovery because, during interaction between two cryptographic libraries, a certain dangerous combination of the prime defined by the receiver's public key, the generator defined by the receiver's public key, and the sender's ephemeral exponents can lead to a cross-configuration attack against OpenPGP.
- Record
CVE-2021-40530- CVSS 3.1
- 5.9 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N - Updated
- 2026-11-02
OSVDEBIAN-CVE-2021-40530
5.9
The ElGamal implementation in Crypto++ through 8.5 allows plaintext recovery because, during interaction between two cryptographic libraries, a certain dangerous combination of the prime defined by the receiver's public key, the generator defined by the receiver's public key, and the sender's ephemeral exponents can lead to a cross-configuration attack against OpenPGP.
- Record
DEBIAN-CVE-2021-40530- CVSS 3.1
- 5.9 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N - Updated
- 2026-11-02
OSVUBUNTU-CVE-2021-40530
5.9
The ElGamal implementation in Crypto++ through 8.5 allows plaintext recovery because, during interaction between two cryptographic libraries, a certain dangerous combination of the prime defined by the receiver's public key, the generator defined by the receiver's public key, and the sender's ephemeral exponents can lead to a cross-configuration attack against OpenPGP.
- Record
UBUNTU-CVE-2021-40530- CVSS 3.1
- 5.9 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N - Updated
- 2026-11-02
OSVMGASA-2021-0468 No score
Updated libcryptopp packages fix security vulnerability
The ElGamal implementation in Crypto++ through 8.5 allows plaintext recovery because, during interaction between two cryptographic libraries, a certain dangerous combination of the prime defined by the receiver's public key, the generator defined by the receiver's public key, and the sender's ephemeral exponents can lead to a cross-configuration attack against OpenPGP. (CVE-2021-40530)
- Record
MGASA-2021-0468- Updated
- 2026-11-02
OSVopenSUSE-SU-2024:10933-1 No score
libcryptopp-devel-8.6.0-1.1 on GA media
These are all security issues fixed in the libcryptopp-devel-8.6.0-1.1 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2024:10933-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
libcrypto++Debian:12 |
before 8.6.0-1 | 8.6.0-1 |
libcrypto++Debian:13 |
before 8.6.0-1 | 8.6.0-1 |
libcrypto++Debian:14 |
before 8.6.0-1 | 8.6.0-1 |
libcryptoppMageia:8 |
before 8.2.0-2.1.mga8 | 8.2.0-2.1.mga8 |
libcrypto++Ubuntu:Pro:14.04:LTS |
All versions, plus listed versions 5.6.1-65.6.1-6+deb8u1build0.14.04.15.6.1-6+deb8u3build0.14.04.15.6.1-6+deb8u3ubuntu0.1~esm1 |
None known |
libcrypto++Ubuntu:Pro:16.04:LTS |
All versions, plus listed versions 5.6.1-85.6.1-95.6.1-9ubuntu0.15.6.1-9ubuntu0.1+esm1 |
None known |
libcrypto++Ubuntu:18.04:LTS |
All versions, plus listed versions 5.6.4-8 |
None known |
libcrypto++Ubuntu:20.04:LTS |
All versions, plus listed versions 5.6.4-95.6.4-9build1 |
None known |
libcrypto++Ubuntu:22.04:LTS |
All versions, plus listed versions 8.4.0-18.6.0-2ubuntu1 |
None known |
libcrypto++Ubuntu:24.04:LTS |
All versions, plus listed versions 8.8.0-18.9.0-18.9.0-1.18.9.0-1.1build1 |
None known |
Show 4 moreShow less
| Package | Affected | Fixed |
|---|---|---|
libcrypto++Ubuntu:25.10 |
All versions, plus listed versions 8.9.0-1.1build18.9.0-2 |
None known |
libcrypto++Ubuntu:26.10 |
All versions, plus listed versions 8.9.0-2build18.9.0-3 |
None known |
libcrypto++Ubuntu:26.04:LTS |
All versions, plus listed versions 8.9.0-28.9.0-2build1 |
None known |
libcryptoppopenSUSE:Tumbleweed From an advisory covering 2 CVEs |
before 8.6.0-1.1 | 8.6.0-1.1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | ||
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2021-40530 is a medium vulnerability (CVSS 5.9) in Cryptopp Crypto\+\+, published September 6, 2021. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 1.16%, the 67th percentile. Fixed in libcrypto++ 8.6.0-1.
References
eprint.iacr.org/2021/923
ibm.github.io/system-security-research-updates/2021/07/20/insecurity-elgamal-pt1
ibm.github.io/system-security-research-updates/2021/09/06/insecurity-elgamal-pt2
lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/HGVBZ2TTRKCTYAZTRHTF6OBD4W37F5MT
lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/57OJA2K5AHX5HAU2QBDRWLGIIUX7GASC
lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/VJYOZGWI7TD27SEXILSM6VUTPPEICDL7
Show 14 moreShow less
nvd.nist.gov/vuln/detail/CVE-2021-40530
lists.fedoraproject.org/archives/list/[email protected]/message/57OJA2K5AHX5HAU2QBDRWLGIIUX7GASC
lists.fedoraproject.org/archives/list/[email protected]/message/HGVBZ2TTRKCTYAZTRHTF6OBD4W37F5MT
lists.fedoraproject.org/archives/list/[email protected]/message/VJYOZGWI7TD27SEXILSM6VUTPPEICDL7
github.com/advisories/GHSA-p3r9-6fhw-hgv8
security-tracker.debian.org/tracker/CVE-2021-40530
advisories.mageia.org/MGASA-2021-0468.html
bugs.mageia.org/show_bug.cgi?id=29529
lists.fedoraproject.org/archives/list/[email protected]/thread/HGVBZ2TTRKCTYAZTRHTF6OBD4W37F5MT
ubuntu.com/security/CVE-2021-40530
github.com/weidai11/cryptopp/issues/1059
cve.org/CVERecord?id=CVE-2021-40530
suse.com/security/cve/CVE-2019-14318
suse.com/security/cve/CVE-2021-40530