CVE-2021-40528: gnupg libgcrypt
Vulnerability summary
CVE-2021-40528 is a medium (CVSS 5.9) vulnerability in gnupg libgcrypt. EPSS estimates a 1.42% chance of exploitation in the next 30 days, higher than 72.4% of scored vulnerabilities. 1 public exploit is recorded.
Advisory lineage
Upstream 0 · Downstream 2 · Related 2Timeline
- 06-09-2021PublishedVulnerability first disclosed.
- 09-06-2025Last modifiedVulnerability information updated.
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.
CVSS metrics
7 scores · 6 sources · 2 versions- OSV · AlpineEcosystem advisory · calculated5.9MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
- OSV · Red hatEcosystem advisory · calculated5.9MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
- OSV · UbuntuEcosystem advisory · calculated5.9MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
- OSV · DebianEcosystem advisory · calculated5.9MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
- NVDNIST5.9MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
EPSS trend
Probability
1.42%
Chance of exploitation in the next 30 days
Percentile
72%
Versus all other CVEs
30-day change
0.00 pp
From 1.42% on 18-09-2026
Known exploited
Compare KEV catalogsNot in any of the 3 tracked catalogs.
Public exploits
1 foundExploit Reference (ibm.github.io)
Maturity: unknown
Weaknesses
CWE · root causeAffected systems
Redhat5 products
- libgcrypt< 0:1.8.5-7.el8_6
- libgcrypt-debuginfo< 0:1.8.5-7.el8_6
- libgcrypt-debugsource< 0:1.8.5-7.el8_6
- libgcrypt-devel< 0:1.8.5-7.el8_6
- libgcrypt-devel-debuginfo< 0:1.8.5-7.el8_6
Alpine1 product
- libgcrypt< 1.8.8-r1
Debian1 product
- libgcrypt20< 1.8.7-6 | < 1.7.6-2+deb9u4
Gnupg1 product
- libgcrypt< 1.9.4
Mageia1 product
- libgcrypt< 1.8.7-1.2.mga8
Opensuse1 product
- libgcrypt&distro=openSUSE Tumbleweed< 1.10.1-1.1
Ubuntu1 product
- libgcrypt20< 1.6.5-2ubuntu0.6+esm1 | < 1.8.1-4ubuntu1.3 | < 1.8.1-4ubuntu1.fips.3 | All versions (No fix recorded) | < 1.8.5-5ubuntu1.1 | < 1.8.5-5ubuntu1.fips.1.1 | < 1.8.7-5ubuntu2
7 vendors · 11 products
References
21 links- ibm.github.io/system-security-research-updates/2021/07/20/insecurity-elgamal-pt1ARTICLEREPORTThird Party Advisory
- ibm.github.io/system-security-research-updates/2021/09/06/insecurity-elgamal-pt2ARTICLEREPORTExploitThird Party Advisory