CVEfocus › CVE database › CVE-2021-40528

CVE-2021-40528

CVSS 5.9 MediumEPSS 1.4% (higher than 73% of CVEs)Published 2021-09-06Updated 2025-06-09Assigner: mitre

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.

CWE-327

What to do

Fixed builds are available from AlmaLinux, Alpine, Debian, Red Hat, Rocky Linux, Ubuntu: see the table below for the fixed version per release.

Ubuntu has not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

14Fixed
2Fix pending
4Will not fix
2Not affected

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 22.04libgcrypt20Fixed1.8.7-5ubuntu2UBUNTU-CVE-2021-40528
Ubuntu 20.04libgcrypt20Fixed1.8.5-5ubuntu1.1UBUNTU-CVE-2021-40528
Ubuntu 18.04libgcrypt20Fixed1.8.1-4ubuntu1.3UBUNTU-CVE-2021-40528
Ubuntu 16.04libgcrypt20Fix pending1.6.5-2ubuntu0.6+esm1 (Ubuntu Pro)UBUNTU-CVE-2021-40528
Ubuntu 14.04libgcrypt20Fix pending
Debian 14libgcrypt20Fixed1.8.7-6DEBIAN-CVE-2021-40528
Debian 13libgcrypt20Fixed1.8.7-6DEBIAN-CVE-2021-40528
Debian 12libgcrypt20Fixed1.8.7-6DEBIAN-CVE-2021-40528
Red Hat Enterprise Linux 9libgcryptNot affected
Red Hat Enterprise Linux 9libgcrypt-develNot affected
Red Hat Enterprise Linux 8libgcryptFixed0:1.8.5-7.el8_6RHSA-2022:5311
Red Hat Enterprise Linux 8libgcrypt-develFixed0:1.8.5-7.el8_6RHSA-2022:5311
Red Hat Enterprise Linux 7libgcryptWill not fix
Out of support scope
Red Hat Enterprise Linux 7libgcrypt-develWill not fix
Out of support scope
Red Hat Enterprise Linux 6libgcryptWill not fix
Out of support scope
Red Hat Enterprise Linux 6libgcrypt-develWill not fix
Out of support scope
AlmaLinux 8libgcryptFixed1.8.5-7.el8_6ALSA-2022:5311
AlmaLinux 8libgcrypt-develFixed1.8.5-7.el8_6ALSA-2022:5311
Rocky Linux 8libgcryptFixed0:1.8.5-7.el8_6RLSA-2022:5311
Alpine Linux 3.13libgcryptFixed1.8.8-r1ALPINE-CVE-2021-40528
Alpine Linux 3.12libgcryptFixed1.8.8-r1ALPINE-CVE-2021-40528
Alpine Linux 3.11libgcryptFixed1.8.8-r1ALPINE-CVE-2021-40528

What the vendor says

As published in the CVE record by mitre, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

Vendor advisories:

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.