cve.bz

CVE-2021-40528 gnupg libgcrypt

5.9 mediumExploit referenceEPSS 1.4%

Medium (5.9) in gnupg libgcrypt. EPSS 1.4% estimated probability of exploitation activity in the next 30 days.

On this page
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.

Severity

CVSS 3.1

5.9 medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
EPSS
1.4% (unchanged from 1.4% a week ago; 1.4% 30 days ago) estimated probability of exploitation activity in the next 30 days; 73rd percentile. Scored 2026-11-25. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: partial, assessed 2025-06-09. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-327 Use of a Broken or Risky Cryptographic Algorithm
OWASP Top 10
A04:2025 Cryptographic Failures
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2021-40528 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2021-40528?via=ask-ai-copy and https://cve.bz/cve/CVE-2021-40528?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2021-40528 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
gnupg:libgcryptbefore 1.9.4

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian9libgcrypt201.7.6-2+deb9u4DLA-2691-1
Debian12, 13, 14libgcrypt201.8.7-6DEBIAN-CVE-2021-40528
Ubuntu18.04:LTSlibgcrypt201.8.1-4ubuntu1.3UBUNTU-CVE-2021-40528 USN-5080-1
Ubuntu20.04:LTSlibgcrypt201.8.5-5ubuntu1.1UBUNTU-CVE-2021-40528 USN-5080-1
Ubuntu22.04:LTSlibgcrypt201.8.7-5ubuntu2UBUNTU-CVE-2021-40528
UbuntuPro:16.04:LTSlibgcrypt201.6.5-2ubuntu0.6+esm1UBUNTU-CVE-2021-40528 USN-5080-2
UbuntuPro:FIPS-updates:18.04:LTSlibgcrypt201.8.1-4ubuntu1.fips.3UBUNTU-CVE-2021-40528
UbuntuPro:FIPS-updates:20.04:LTS, Pro:FIPS:20.04:LTSlibgcrypt201.8.5-5ubuntu1.fips.1.1UBUNTU-CVE-2021-40528
UbuntuPro:FIPS:18.04:LTSlibgcrypt20no fix listedUBUNTU-CVE-2021-40528
Red Hatenterprise_linux:8::baseoslibgcrypt, libgcrypt-devel, libgcrypt-debuginfo and 2 more0:1.8.5-7.el8_6RHSA-2022:5311
openSUSETumbleweedlibgcrypt1.10.1-1.1openSUSE-SU-2024:12540-1
AlmaLinux8libgcrypt, libgcrypt-devel1.8.5-7.el8_6ALSA-2022:5311
Rocky Linux8libgcrypt0:1.8.5-7.el8_6RLSA-2022:5311
Alpinev3.11, v3.12, v3.13libgcrypt1.8.8-r1ALPINE-CVE-2021-40528

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; AlmaLinux's OSV database, MIT; Rocky Linux's errata, BSD-3-Clause; the Alpine secdb, CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · openSUSE · Alpine.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

Please note that there was a mixup between this CVE and CVE-2021-33560. At this time, both CVEs should be assumed to refer to the same issue. More information will be provided in the near future. See the first link in External References for more information.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 8libgcrypt-0:1.8.5-7.el8_6Fixed 2022-06-30RHSA-2022:5311
Red Hat Enterprise Linux 6libgcryptOut of support scope
Red Hat Enterprise Linux 7libgcryptOut of support scope
Red Hat Enterprise Linux 9libgcryptNot affected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2021-40528.

Attack patterns (CAPEC)

  • CAPEC-20 Encryption Brute Forcing Likelihood: Low · Severity: Low
  • CAPEC-97 Cryptanalysis Likelihood: Low · Severity: Very High
  • CAPEC-459 Creating a Rogue Certification Authority Certificate Likelihood: Medium · Severity: Very High
  • CAPEC-473 Signature Spoof
  • CAPEC-475 Signature Spoofing by Improper Validation Likelihood: Low · Severity: High
  • CAPEC-608 Cryptanalysis of Cellular Encryption Severity: High
  • CAPEC-614 Rooting SIM Cards Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON