CVE-2021-40530
CVE-2021-40530 is a medium-severity vulnerability in Cryptopp Crypto++ with a CVSS 3.x base score of 5.9. It is not currently listed as actively exploited by CISA, and its EPSS exploit-prediction score is low. The underlying weakness is classified as CWE-327.
Key facts
- Severity: Medium (CVSS 3.x base score 5.9)
- CVSS v2: 2.6
- EPSS exploit prediction: 1% (63rd percentile)
- Actively exploited: Not listed in CISA KEV
- Weakness: CWE-327
- Affected product: Cryptopp Crypto++
- Published:
- Last modified:
Description
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.
Frequently asked questions
- What is CVE-2021-40530?
- 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.
- How severe is CVE-2021-40530?
- CVE-2021-40530 has a CVSS 3.x base score of 5.9, rated medium severity. It is exploitable over network with high attack complexity, requires no privileges and no user interaction. Impact on confidentiality is high, integrity none, and availability none.
- Is CVE-2021-40530 being actively exploited?
- It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 1% (63rd percentile), an estimate of the probability of exploitation in the next 30 days.
- What products are affected by CVE-2021-40530?
- CVE-2021-40530 primarily affects Cryptopp Crypto++. In total, 4 product configurations (CPEs) are listed as vulnerable; see the affected-products list for the exact versions.
- How do I fix CVE-2021-40530?
- Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround.
- When was CVE-2021-40530 published?
- CVE-2021-40530 was published on 2021-09-06 and last updated on 2026-06-17.
References
- https://eprint.iacr.org/2021/923
- https://ibm.github.io/system-security-research-updates/2021/07/20/insecurity-elgamal-pt1
- https://ibm.github.io/system-security-research-updates/2021/09/06/insecurity-elgamal-pt2
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/57OJA2K5AHX5HAU2QBDRWLGIIUX7GASC/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/HGVBZ2TTRKCTYAZTRHTF6OBD4W37F5MT/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/VJYOZGWI7TD27SEXILSM6VUTPPEICDL7/
Affected products (4)
- cpe:2.3:a:cryptopp:crypto\+\+:*:*:*:*:*:*:*:*
- cpe:2.3:o:fedoraproject:fedora:33:*:*:*:*:*:*:*
- cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:*
- cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:*
More vulnerabilities in Cryptopp Crypto++
- CVE-2023-50981 — High (CVSS 7.5): ModularSquareRoot in Crypto++ (aka cryptopp) through 8.9.0 allows attackers to cause a denial of service (infinite…
- CVE-2023-50980 — High (CVSS 7.5): gf2n.cpp in Crypto++ (aka cryptopp) through 8.9.0 allows attackers to cause a denial of service (application crash) via…
- CVE-2022-48570 — High (CVSS 7.5): Crypto++ through 8.4 contains a timing side channel in ECDSA signature generation. Function…
- CVE-2016-3995 — High (CVSS 7.5): The timing attack protection in Rijndael::Enc::ProcessAndXorBlock and Rijndael::Dec::ProcessAndXorBlock in Crypto++…
- CVE-2016-9939 — High (CVSS 7.5): Crypto++ (aka cryptopp and libcrypto++) 5.6.4 contained a bug in its ASN.1 BER decoding routine. The library will…
- CVE-2016-7544 — High (CVSS 7.5): Crypto++ 5.6.4 incorrectly uses Microsoft's stack-based _malloca and _freea functions. The library will request a block…
All CVEs affecting Cryptopp Crypto++ →
Other CWE-327 (Use of a Broken or Risky Cryptographic Algorithm) vulnerabilities
- CVE-2026-50086 — Critical (CVSS 10.0): The Aqara IAM/SSO gateway (gw-builder.aqara.com) exposes bidirectional AES round-trups against the platform's signing…
- CVE-2026-21718 — Critical (CVSS 10.0): An authentication bypass vulnerability exists in Copeland XWEB Pro version 1.12.1 and prior, enabling any attackers to…
- CVE-2025-54426 — Critical (CVSS 9.9): Polkadot Frontier is an Ethereum and EVM compatibility layer for Polkadot and Substrate. In versions prior to commit…
- CVE-2024-51478 — Critical (CVSS 9.9): YesWiki is a wiki system written in PHP. Prior to 4.4.5, the use of a weak cryptographic algorithm and a hard-coded…
- CVE-2026-28252 — Critical (CVSS 9.8): A Use of a Broken or Risky Cryptographic Algorithm vulnerability in Trane Tracer SC, Tracer SC+, and Tracer Concierge…
- CVE-2025-13476 — Critical (CVSS 9.8): Rakuten Viber Cloak mode in Android v25.7.2.0g and Windows v25.6.0.0–v25.8.1.0 uses a static and predictable TLS…
Browse all CWE-327 (Use of a Broken or Risky Cryptographic Algorithm) vulnerabilities →