# CVE-2021-40528: The ElGamal implementation in Libgcrypt before 1.9.4 allows plaintext recovery because, during interaction between two cryptographic librar…

- Severity: Medium 5.9 (CVSS:3.1, scored by CISA-ADP) `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.42%, higher than 73% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2021-09-06T00:00:00.000Z
- Modified: 2026-06-17T04:07:05.660Z
- Weaknesses: CWE-327
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: mitre

## 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.

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- gnupg libgcrypt: before 1.9.4

## Every score

- CISA-ADP: 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`
- NVD: 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`
- NVD: CVSS:2.0 2.6 Low `AV:N/AC:H/Au:N/C:P/I:N/A:N`

## References

- <https://ibm.github.io/system-security-research-updates/2021/09/06/insecurity-elgamal-pt2> (exploit, third-party-advisory)
- <https://eprint.iacr.org/2021/923> (technical-description, third-party-advisory)
- <https://ibm.github.io/system-security-research-updates/2021/07/20/insecurity-elgamal-pt1> (third-party-advisory)
- <https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgcrypt.git%3Ba=commit%3Bh=3462280f2e23e16adf3ed5176e0f2413d8861320>
- <https://security.gentoo.org/glsa/202210-13> (third-party-advisory, vendor-advisory)

## Sources

- CVE List: [CVE-2021-40528](https://www.cve.org/CVERecord?id=CVE-2021-40528), CVE Terms of Use, modified 2025-06-09
- NVD: [CVE-2021-40528](https://nvd.nist.gov/vuln/detail/CVE-2021-40528), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-40528 · Whole record: https://cve.day/CVE-2021-40528.json · Rebuilt by cve.day 2026-11-25T22:58:03.660Z
