The ElGamal implementation in Libgcrypt before 1.9.4 allows plaintext recovery because…
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- High
- Impact type
- Information disclosure
- Confidentiality · integrity · availability
- High · None · None
- Fix status
- Partial Red Hat: 1 fixed, 2 without a fix
Attack profile from CVSS 3.1 · CISA ADP. Fix status from CNA and Red Hat. Impact type from CWE-327.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | — | all versions | — | No fix listed | CNA |
- — Vendor— Affected all versions Fixed in — No fix listed CNA
Remediation
Red Hat 1 advisory
- RHSA-2022:5311 Released 2022-06-30 · Red Hat rating Moderatelibgcrypt security update
- Red Hat Enterprise Linux BaseOS (v. 8) libgcrypt-1.8.5-7.el8_6, libgcrypt-devel-1.8.5-7.el8_6
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat Enterprise Linux 6 | Affected | No fix planned: Out of support scope |
| Red Hat Enterprise Linux 7 | Affected | No fix planned: Out of support scope |
| Red Hat Enterprise Linux BaseOS (v. 8) | Fixed | RHSA-2022:5311 |
Not affected: 1 product
- Red Hat Enterprise Linux 9
Timeline
- 2026-10-02 Threatist record created from CVE-2021-40528
- 2026-10-03 Alias added: GHSA-8m2v-68m9-q2c7
References
Advisory 3
More GnuPG Libgcrypt vulnerabilities
- TI-2021-12953 Libgcrypt before 1.8.8 and 1.9.x before 1.9.3 mishandles ElGamal encryption because it… CVSS 3.1HIGH 7.5
- TI-2017-00354 Information disclosure in libgcrypt CVSS 3.0HIGH 7.5
- TI-2017-05168 Information disclosure in GnuPG libgcrypt CVSS 3.0MEDIUM 6.8
- TI-2021-02343 _gcry_md_block_write in cipher/hash-common.c in Libgcrypt version 1.9.0 has a heap-based… CVSS 3.1HIGH 7.8
- TI-2018-04986 cipher/elgamal.c in Libgcrypt through 1.8.2, when used to encrypt messages directly… CVSS 3.0HIGH 7.5
- TI-2019-09661 In Libgcrypt 1.8.4, the C implementation of AES is vulnerable to a flush-and-reload… CVSS 3.1MEDIUM 5.9
Sources
- CVE-2021-40528 · CVE Program
- CVE-2021-40528 · NVD
- FIRST EPSS
- GHSA-8m2v-68m9-q2c7 · GitHub Advisory Database · CC BY 4.0
- CVE-2021-40528 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences