CVE-2021-40528 json
The ElGamal implementation in Libgcrypt before 1.9.4 allows plaintext recovery because, during interaction between two cryptographic librar…
published 2021-09-06 5 y ago modified 2026-07-18 3 mo ago also EUVD-2021-27703 , JLSEC-2026-124
- cvss
- 5.9
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.4%
- EPSS 1.4% chance of exploitation in 30 days, percentile 73%
- public exploits
- 0
- none known
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.
Patch / fix
- julia Libgcrypt_jll 1.11.0+0
- gnupg libgcrypt 1.9.4
- libgcrypt20 Debian 14, Debian 13, Debian 12 1.8.7-6
debian advisories DEBIAN-CVE-2021-40528
- libgcrypt20 Ubuntu 18.04 LTS 1.8.1-4ubuntu1.3
- libgcrypt20 Ubuntu 20.04 LTS 1.8.5-5ubuntu1.1
- libgcrypt20 Ubuntu 22.04 LTS 1.8.7-5ubuntu2
- libgcrypt20 Ubuntu Pro 16.04 LTS 1.6.5-2ubuntu0.6+esm1
- libgcrypt20 Ubuntu Pro FIPS-updates 18.04 LTS 1.8.1-4ubuntu1.fips.3
- libgcrypt20 Ubuntu Pro FIPS-updates 20.04 LTS, Ubuntu Pro FIPS 20.04 LTS 1.8.5-5ubuntu1.fips.1.1
ubuntu advisories UBUNTU-CVE-2021-40528
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- libgcrypt RHEL 8 1.8.5-7.el8_6
red hat advisories RHSA-2022:5311
- libgcrypt openSUSE Tumbleweed 1.10.1-1.1
opensuse advisories openSUSE-SU-2024:12540-1
- libgcrypt AlmaLinux 8 1.8.5-7.el8_6
almalinux advisories ALSA-2022:5311
- libgcrypt Rocky Linux 8 1.8.5-7.el8_6
rocky linux advisories RLSA-2022:5311
- libgcrypt Alpine 3.13, Alpine 3.12, Alpine 3.11 1.8.8-r1
alpine advisories ALPINE-CVE-2021-40528
Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2021-40528 updated cvss 5.9
libgcrypt: ElGamal implementation allows plaintext recovery
-
Red Hat Enterprise Linux 6 libgcrypt Red Hat Enterprise Linux 7 libgcryptaffected: no fix planned “Out of support scope”
-
Red Hat Enterprise Linux BaseOS (v. 8) libgcrypt 1.8.5-7.el8_6fixed: vendor fix RHSA-2022:5311
-
Red Hat Enterprise Linux 9 libgcryptnot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- partial
- Assessed
- 17 mo ago
Exploit prediction
1.42% chance of exploitation in the next 30 days, higher than 73% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- ibm.github.io https://ibm.github.io/system-security-research-updates/2021/09/06/insecurity-elgamal-pt2 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CISA ADP | 3.1 | 5.9 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N |
| NVD | 3.1 | 5.9 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N |
| CNA | 3.1 | 5.9 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N |
| NVD | 2.0 | 2.6 | AV:N/AC:H/Au:N/C:P/I:N/A:N |
| OSV | 3.1 | 5.9 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| julia | Libgcrypt_jll | <1.11.0+0 |
1.11.0+0 |
Classification
- Weakness
-
- CWE-327 Use of a Broken or Risky Cryptographic Algorithm
References
-
ibm.github.io
/system-security-research-updates/2021/09/06/insecurity-elgamal-pt2
exploit, third-party-advisory, web
-
security.gentoo.org
/glsa/202210-13
vendor-advisory, third-party-advisory, web
-
eprint.iacr.org
/2021/923
technical-description, third-party-advisory, web
-
ibm.github.io
/system-security-research-updates/2021/07/20/insecurity-elgamal-pt1
third-party-advisory, web
-
git.gnupg.org
/cgi-bin/gitweb.cgi?p=libgcrypt.git%3Ba=commit%3Bh=3462280f2e23e16adf3ed5176e0f2413d8861320
web
Sources
- CVE List CVE-2021-40528
- NVD CVE-2021-40528
- OSV JLSEC-2026-124
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.