CVE-2021-40528
CVE-2021-40528 is a medium-severity vulnerability in Gnupg Libgcrypt 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% (70th percentile)
- Actively exploited: Not listed in CISA KEV
- Weakness: CWE-327
- Affected product: Gnupg Libgcrypt
- Published:
- Last modified:
Description
The ElGamal implementation in Libgcrypt before 1.9.4 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-40528?
- The ElGamal implementation in Libgcrypt before 1.9.4 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-40528?
- CVE-2021-40528 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-40528 being actively exploited?
- It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 1% (70th percentile), an estimate of the probability of exploitation in the next 30 days.
- What products are affected by CVE-2021-40528?
- CVE-2021-40528 affects Gnupg Libgcrypt. See the affected-products list for the exact vulnerable versions.
- How do I fix CVE-2021-40528?
- Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround.
- When was CVE-2021-40528 published?
- CVE-2021-40528 was published on 2021-09-06 and last updated on 2026-06-17.
References
- https://eprint.iacr.org/2021/923
- https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgcrypt.git%3Ba=commit%3Bh=3462280f2e23e16adf3ed5176e0f2413d8861320
- 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://security.gentoo.org/glsa/202210-13
Affected products (1)
- cpe:2.3:a:gnupg:libgcrypt:*:*:*:*:*:*:*:*
More vulnerabilities in Gnupg Libgcrypt
- CVE-2021-3345 — High (CVSS 7.8): _gcry_md_block_write in cipher/hash-common.c in Libgcrypt version 1.9.0 has a heap-based buffer overflow when the…
- CVE-2021-33560 — High (CVSS 7.5): Libgcrypt before 1.8.8 and 1.9.x before 1.9.3 mishandles ElGamal encryption because it lacks exponent blinding to…
- CVE-2018-6829 — High (CVSS 7.5): cipher/elgamal.c in Libgcrypt through 1.8.2, when used to encrypt messages directly, improperly encodes plaintexts,…
- CVE-2017-0379 — High (CVSS 7.5): Libgcrypt before 1.8.1 does not properly consider Curve25519 side-channel attacks, which makes it easier for attackers…
- CVE-2026-41989 — Medium (CVSS 6.7): Libgcrypt before 1.12.2 sometimes allows a heap-based buffer overflow and denial of service via crafted ECDH ciphertext…
- CVE-2017-7526 — Medium (CVSS 6.1): libgcrypt before version 1.7.8 is vulnerable to a cache side-channel attack resulting into a complete break of RSA-1024…
All CVEs affecting Gnupg Libgcrypt →
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 →