Every CVE Search/ Get API key

CVE-2021-40528

The ElGamal implementation in Libgcrypt before 1.9.4 allows plaintext recovery because, during...

5.9 MediumFix available

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.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
High
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
High
Integrity
None
Availability
None

Exploit likelihood

1.42%Up 0.6 points since Sep 7, 2021
90%50%10%1%

What each source reports

NVD Score used 5.9

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.

Record
CVE-2021-40528
CVSS 3.1
5.9 MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
CVSS 2.0
2.6 LowAV:N/AC:H/Au:N/C:P/I:N/A:N
Weakness
CWE-327
Updated
2026-11-02
CVE List 5.9

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.

Record
CVE-2021-40528
CVSS 3.1
5.9 MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
Weakness
CWE-327
Updated
2026-11-02
EUVDEUVD-2021-27703 5.9

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.

Record
EUVD-2021-27703
CVSS 3.1
5.9 MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
Updated
2026-11-02
GitHub AdvisoriesGHSA-8m2v-68m9-q2c7 5.9

The ElGamal implementation in Libgcrypt before 1.9.4 allows plaintext recovery because, during...

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.

Record
GHSA-8m2v-68m9-q2c7
CVSS 3.1
5.9 MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
Weakness
CWE-327
Updated
2026-11-02
OSVALPINE-CVE-2021-40528 5.9

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.

Record
ALPINE-CVE-2021-40528
CVSS 3.1
5.9 MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
Updated
2026-11-02
OSVBELL-CVE-2021-40528 5.9

CVE-2021-40528 does not affect BellSoft software

Record
BELL-CVE-2021-40528
CVSS 3.1
5.9 MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
Updated
2026-11-02
Show 14 moreShow less
OSV 5.9

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.

Record
CVE-2021-40528
CVSS 3.1
5.9 MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
Updated
2026-11-02
OSVDEBIAN-CVE-2021-40528 5.9

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.

Record
DEBIAN-CVE-2021-40528
CVSS 3.1
5.9 MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
Updated
2026-11-02
OSVJLSEC-2026-124 5.9

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.

Record
JLSEC-2026-124
CVSS 3.1
5.9 MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
CVSS 2.0
2.6 LowAV:N/AC:H/Au:N/C:P/I:N/A:N
Updated
2026-11-02
OSVOESA-2021-1362 5.9

libgcrypt security update

Libgcrypt is a general purpose cryptographic library originally based on code from GnuPG.

Security Fix(es):

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.(CVE-2021-40528)

Record
OESA-2021-1362
CVSS 3.1
5.9 MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
Updated
2026-11-02
OSVRHSA-2022:5311 5.9

Red Hat Security Advisory: libgcrypt security update

Record
RHSA-2022:5311
CVSS 3.1
5.9 MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
Updated
2026-11-02
OSVRLSA-2022:5311 5.9

Moderate: libgcrypt security update

The libgcrypt library provides general-purpose implementations of various cryptographic algorithms.

Security Fix(es):

  • libgcrypt: ElGamal implementation allows plaintext recovery (CVE-2021-40528)

For more details about the security issue(s), including the impact, a CVSS score, acknowledgments, and other related information, refer to the CVE page(s) listed in the References section.

Record
RLSA-2022:5311
CVSS 3.1
5.9 MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
Updated
2026-11-02
OSVUBUNTU-CVE-2021-40528 5.9

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.

Record
UBUNTU-CVE-2021-40528
CVSS 3.1
5.9 MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
Updated
2026-11-02
OSVALSA-2022:5311 No score

Moderate: libgcrypt security update

The libgcrypt library provides general-purpose implementations of various cryptographic algorithms. Security Fix(es):

  • libgcrypt: ElGamal implementation allows plaintext recovery (CVE-2021-40528) For more details about the security issue(s), including the impact, a CVSS score, acknowledgments, and other related information, refer to the CVE page(s) listed in the References section.
Record
ALSA-2022:5311
Updated
2026-11-02
OSVCLSA-2023-1698945053 No score

libgcrypt: Fix of 4 CVEs

  • CVE-2013-4576: Normalize the MPIs to prevent possible side-channel attacks
  • CVE-2014-3591: Use ciphertext blinding for Elgamal to prevent possible side-channel attacks
  • CVE-2021-33560: Use of smaller K for ephemeral key in ElGamal prevent generation of weak keys
  • CVE-2021-40528: Add exponent blinding as well to mitigate side-channel attack on mpi_powm
  • tests: Add a benchmark for Elgamal
Record
CLSA-2023-1698945053
Updated
2026-11-02
OSVCLSA-2026-1782731604 No score

libgcrypt: Fix of CVE-2021-33560

  • CVE-2013-4576: Normalize the MPIs to prevent possible side-channel attacks
  • CVE-2014-3591: Use ciphertext blinding for Elgamal to prevent possible side-channel attacks
  • CVE-2021-33560: Use of smaller K for ephemeral key in ElGamal prevent generation of weak keys
  • CVE-2021-40528: Add exponent blinding as well to mitigate side-channel attack on mpi_powm
  • tests: Add a benchmark for Elgamal
Record
CLSA-2026-1782731604
Updated
2026-11-02
OSVMGASA-2021-0446 No score

Updated libgcrypt packages fix security vulnerability

The updated packages fix a security vulnerability:

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 (CVE-2021-40528).

Record
MGASA-2021-0446
Updated
2026-11-02
OSVopenSUSE-SU-2024:12540-1 No score

libgcrypt-devel-1.10.1-1.1 on GA media

These are all security issues fixed in the libgcrypt-devel-1.10.1-1.1 package on the GA media of openSUSE Tumbleweed.

Record
openSUSE-SU-2024:12540-1
Updated
2026-11-02
OSVUSN-5080-1 No score

libgcrypt20 vulnerabilities

It was discovered that Libgcrypt incorrectly handled ElGamal encryption. An attacker could possibly use this issue to recover sensitive information.

Record
USN-5080-1
Updated
2026-11-02
OSVUSN-5080-2 No score

libgcrypt20 vulnerabilities

USN-5080-1 fixed several vulnerabilities in Libgcrypt. This update provides the corresponding update for Ubuntu 16.04 ESM.

Original advisory details:

It was discovered that Libgcrypt incorrectly handled ElGamal encryption. An attacker could possibly use this issue to recover sensitive information.

Record
USN-5080-2
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
libgcrypt
Alpine:v3.11
before 1.8.8-r1
1.8.8-r1
libgcrypt
Alpine:v3.12
before 1.8.8-r1
1.8.8-r1
libgcrypt
Alpine:v3.13
before 1.8.8-r1
1.8.8-r1
libgcrypt
AlmaLinux:8
before 1.8.5-7.el8_6
1.8.5-7.el8_6
libgcrypt-devel
AlmaLinux:8
before 1.8.5-7.el8_6
1.8.5-7.el8_6
libgcrypt
TuxCare:CentOS:7
From an advisory covering 4 CVEs
before 1.5.3-14.el7.tuxcare.els1
1.5.3-14.el7.tuxcare.els1
libgcrypt-devel
TuxCare:CentOS:7
From an advisory covering 4 CVEs
before 1.5.3-14.el7.tuxcare.els1
1.5.3-14.el7.tuxcare.els1
libgcrypt
TuxCare:OracleLinux:7
From an advisory covering 4 CVEs
before 1.5.3-14.el7.tuxcare.els1
1.5.3-14.el7.tuxcare.els1
libgcrypt-devel
TuxCare:OracleLinux:7
From an advisory covering 4 CVEs
before 1.5.3-14.el7.tuxcare.els1
1.5.3-14.el7.tuxcare.els1
libgcrypt20
Debian:12
before 1.8.7-6
1.8.7-6
Show 25 moreShow less
Affected packages
PackageAffectedFixed
libgcrypt20
Debian:13
before 1.8.7-6
1.8.7-6
libgcrypt20
Debian:14
before 1.8.7-6
1.8.7-6
libgcrypt20
Debian:9
before 1.7.6-2+deb9u4, plus listed versions
1.7.6-21.7.6-2+deb9u11.7.6-2+deb9u21.7.6-2+deb9u3
1.7.6-2+deb9u4
Libgcrypt_jll
Julia
before 1.11.0+0
1.11.0+0
libgcrypt
Mageia:8
before 1.8.7-1.2.mga8
1.8.7-1.2.mga8
libgcrypt
openEuler:20.03-LTS-SP1
before 1.8.6-4.oe1
1.8.6-4.oe1
libgcrypt
openEuler:20.03-LTS-SP2
before 1.8.6-4.oe1
1.8.6-4.oe1
libgcrypt
Red Hat:enterprise_linux:8::baseos
before 0:1.8.5-7.el8_6
0:1.8.5-7.el8_6
libgcrypt-debuginfo
Red Hat:enterprise_linux:8::baseos
before 0:1.8.5-7.el8_6
0:1.8.5-7.el8_6
libgcrypt-debugsource
Red Hat:enterprise_linux:8::baseos
before 0:1.8.5-7.el8_6
0:1.8.5-7.el8_6
libgcrypt-devel
Red Hat:enterprise_linux:8::baseos
before 0:1.8.5-7.el8_6
0:1.8.5-7.el8_6
libgcrypt-devel-debuginfo
Red Hat:enterprise_linux:8::baseos
before 0:1.8.5-7.el8_6
0:1.8.5-7.el8_6
libgcrypt
Rocky Linux:8
before 0:1.8.5-7.el8_6
0:1.8.5-7.el8_6
libgcrypt20
Ubuntu:Pro:16.04:LTS
before 1.6.5-2ubuntu0.6+esm1, plus listed versions
1.6.3-2ubuntu11.6.4-31.6.4-41.6.4-51.6.5-2
Show 5 moreShow less
1.6.5-2ubuntu0.21.6.5-2ubuntu0.31.6.5-2ubuntu0.41.6.5-2ubuntu0.51.6.5-2ubuntu0.6
1.6.5-2ubuntu0.6+esm1
libgcrypt20
Ubuntu:18.04:LTS
before 1.8.1-4ubuntu1.3, plus listed versions
1.7.8-2ubuntu11.7.9-11.8.1-41.8.1-4ubuntu11.8.1-4ubuntu1.11.8.1-4ubuntu1.2
1.8.1-4ubuntu1.3
libgcrypt20
Ubuntu:Pro:FIPS-updates:18.04:LTS
before 1.8.1-4ubuntu1.fips.3, plus listed versions
1.8.1-4ubuntu1.fips.2.41.8.1-4ubuntu1.fips.2.5
1.8.1-4ubuntu1.fips.3
libgcrypt20
Ubuntu:Pro:FIPS:18.04:LTS
All versions, plus listed versions
1.8.1-4ubuntu1.fips.2.41.8.1-4ubuntu1.fips.2.5
None known
libgcrypt20
Ubuntu:20.04:LTS
before 1.8.5-5ubuntu1.1, plus listed versions
1.8.4-5ubuntu21.8.5-3ubuntu11.8.5-5ubuntu1
1.8.5-5ubuntu1.1
libgcrypt20
Ubuntu:Pro:FIPS-updates:20.04:LTS
before 1.8.5-5ubuntu1.fips.1.1
1.8.5-5ubuntu1.fips.1.1
libgcrypt20
Ubuntu:Pro:FIPS:20.04:LTS
before 1.8.5-5ubuntu1.fips.1.1
1.8.5-5ubuntu1.fips.1.1
libgcrypt20
Ubuntu:22.04:LTS
before 1.8.7-5ubuntu2
1.8.7-5ubuntu2
libgcrypt20
Ubuntu:18.04:LTS
From an advisory covering 2 CVEs
before 1.8.1-4ubuntu1.3, plus listed versions
1.7.8-2ubuntu11.7.9-11.8.1-41.8.1-4ubuntu11.8.1-4ubuntu1.11.8.1-4ubuntu1.2
1.8.1-4ubuntu1.3
libgcrypt20
Ubuntu:20.04:LTS
From an advisory covering 2 CVEs
before 1.8.5-5ubuntu1.1, plus listed versions
1.8.4-5ubuntu21.8.5-3ubuntu11.8.5-5ubuntu1
1.8.5-5ubuntu1.1
libgcrypt20
Ubuntu:Pro:16.04:LTS
From an advisory covering 2 CVEs
before 1.6.5-2ubuntu0.6+esm1, plus listed versions
1.6.3-2ubuntu11.6.4-31.6.4-41.6.4-51.6.5-2
Show 5 moreShow less
1.6.5-2ubuntu0.21.6.5-2ubuntu0.31.6.5-2ubuntu0.41.6.5-2ubuntu0.51.6.5-2ubuntu0.6
1.6.5-2ubuntu0.6+esm1
libgcrypt
openSUSE:Tumbleweed
before 1.10.1-1.1
1.10.1-1.1

History

History
RecordedChangedSources
affected, facts
first indexedCVE List, EUVD, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2021-40528 is a medium vulnerability (CVSS 5.9) in Gnupg Libgcrypt, published June 25, 2021. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 1.42%, the 73rd percentile. Fixed in libgcrypt 1.8.8-r1.

References

Show 26 moreShow less
MoveEnter Open