# CVE-2021-40528: libgcrypt20: The ElGamal implementation in Libgcrypt before 1.9.4 allows plaintextrecovery because, during interaction between two...

CVE-2021-40528 is fixed in 4 products on 1 platform, first by libgcrypt20 1.8.1-4ubuntu1.3, released September 6, 2021. It is not reported as exploited. Patch Radar priority: Routine.

- Web page: https://patchblox.com/security/cve/CVE-2021-40528
- Priority: Routine
- CVSS: 5.9 (Medium)
- EPSS: 0.0142
- CISA KEV: not listed
- Exploited (vendor report): no
- Publicly disclosed: no
- Published: Sep 6, 2021

## Description

The ElGamal implementation in Libgcrypt before 1.9.4 allows plaintextrecovery because, during interaction between two cryptographic libraries, acertain dangerous combination of the prime defined by the receiver's publickey, the generator defined by the receiver's public key, and the sender'sephemeral exponents can lead to a cross-configuration attack againstOpenPGP.

## Where it's fixed

| Platform | Product | Fixed in | Fix | Released |
|---|---|---|---|---|
| Linux | libgcrypt RHEL 8 | 0:1.8.5-7.el8_6 | [RHSA-2022:5311](https://patchblox.com/security/data/fix/linux/rhsa-2022-5311.md) | Jun 30, 2022 |
| Linux | libgcrypt almalinux 8 | 1.8.5-7.el8_6 | [ALSA-2022:5311](https://patchblox.com/security/data/fix/linux/alsa-2022-5311.md) | Jun 30, 2022 |
| Linux | libgcrypt ol 8 | 0:1.8.5-7.el8_6 | [ELSA-2022-5311](https://patchblox.com/security/data/fix/linux/elsa-2022-5311.md) | Jul 1, 2022 |
| Linux | libgcrypt rocky 8 | 0:1.8.5-7.el8_6 | [RLSA-2022:5311](https://patchblox.com/security/data/fix/linux/rlsa-2022-5311.md) | Jun 28, 2022 |
| Linux | libgcrypt-bin Ubuntu 25.04 (plucky) | 1.8.7-5ubuntu2 | [libgcrypt-bin 1.8.7-5ubuntu2](https://patchblox.com/security/data/fix/linux/ubuntu-plucky-libgcrypt-bin-1.8.7-5ubuntu2.md) | Jan 16, 2026 |
| Linux | libgcrypt-devel RHEL 8 | 0:1.8.5-7.el8_6 | [RHSA-2022:5311](https://patchblox.com/security/data/fix/linux/rhsa-2022-5311.md) | Jun 30, 2022 |
| Linux | libgcrypt-devel almalinux 8 | 1.8.5-7.el8_6 | [ALSA-2022:5311](https://patchblox.com/security/data/fix/linux/alsa-2022-5311.md) | Jun 30, 2022 |
| Linux | libgcrypt-devel ol 8 | 0:1.8.5-7.el8_6 | [ELSA-2022-5311](https://patchblox.com/security/data/fix/linux/elsa-2022-5311.md) | Jul 1, 2022 |
| Linux | libgcrypt20 Ubuntu 18.04.6 LTS (bionic) | 1.8.1-4ubuntu1.3 | [libgcrypt20 1.8.1-4ubuntu1.3](https://patchblox.com/security/data/fix/linux/ubuntu-bionic-libgcrypt20-1.8.1-4ubuntu1.3.md) | Sep 6, 2021 |
| Linux | libgcrypt20 Ubuntu 20.04 LTS (focal) | 1.8.5-5ubuntu1.1 | [libgcrypt20 1.8.5-5ubuntu1.1](https://patchblox.com/security/data/fix/linux/ubuntu-focal-libgcrypt20-1.8.5-5ubuntu1.1.md) | Sep 6, 2021 |
| Linux | libgcrypt20 Ubuntu 22.04.1 LTS (jammy) | 1.8.7-5ubuntu2 | [libgcrypt20 1.8.7-5ubuntu2](https://patchblox.com/security/data/fix/linux/ubuntu-jammy-libgcrypt20-1.8.7-5ubuntu2.md) | Sep 6, 2021 |
| Linux | libgcrypt20 Ubuntu 24.10 (oracular) | 1.8.7-5ubuntu2 | [libgcrypt20 1.8.7-5ubuntu2](https://patchblox.com/security/data/fix/linux/ubuntu-oracular-libgcrypt20-1.8.7-5ubuntu2.md) | Jan 16, 2026 |
| Linux | libgcrypt20 Ubuntu 25.04 (plucky) | 1.8.7-5ubuntu2 | [libgcrypt20 1.8.7-5ubuntu2](https://patchblox.com/security/data/fix/linux/ubuntu-plucky-libgcrypt20-1.8.7-5ubuntu2.md) | Jan 16, 2026 |

---

Data as of 2026-11-08T13:06:02Z UTC. Source: Patchblox Patch Radar (https://patchblox.com/security/patch-radar). Patchblox finds out-of-date software on Windows, macOS and Linux and updates it through release rings: https://patchblox.com/demo

Free to use with attribution: show "Data: Patchblox Patch Radar" with a link to https://patchblox.com/security/patch-radar. Terms, including what needs a written agreement: https://patchblox.com/security/patch-radar/use-the-data

Product names, logos and trademarks shown on Patch Radar belong to their respective owners. They are used only to identify the software each security fix applies to and to help readers find their platform. Their use does not imply any affiliation with, or endorsement by, those owners, and Patchblox is not affiliated with any of them.
