Skip to content
OpenAdvisories
Medium · 5.9 CVE-2021-40528 EUVD-2021-27703GHSA-8m2v-68m9-q2c7

The ElGamal implementation in Libgcrypt before 1.9.4 allows plaintext recovery because, during interaction between two cryptographic librar…

Published Sep 6, 2021 · Updated Jun 9, 2025 · 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.

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 libgcrypt20 1.8.7-6 —
Debian 13 libgcrypt20 1.8.7-6 —
Debian 12 libgcrypt20 1.8.7-6 —
Debian 9 libgcrypt20 1.7.6-2+deb9u4 DLA-2691-1
ReleasePackageFixed inAdvisory
Ubuntu 22.04 LTS libgcrypt20 1.8.7-5ubuntu2 —
Ubuntu 20.04 LTS libgcrypt20 1.8.5-5ubuntu1.1 USN-5080-1
Ubuntu 18.04 LTS libgcrypt20 1.8.1-4ubuntu1.3 USN-5080-1
Show 5 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro FIPS 20.04 LTS libgcrypt20 1.8.5-5ubuntu1.fips.1.1 —
Ubuntu Pro FIPS 18.04 LTS libgcrypt20 No fix yet —
Ubuntu Pro FIPS-updates 20.04 LTS libgcrypt20 1.8.5-5ubuntu1.fips.1.1 —
Ubuntu Pro FIPS-updates 18.04 LTS libgcrypt20 1.8.1-4ubuntu1.fips.3 —
Ubuntu Pro 16.04 LTS libgcrypt20 1.6.5-2ubuntu0.6+esm1 USN-5080-2
ReleasePackageFixed inAdvisory
RHEL 8 libgcrypt +1 1.8.5-7.el8_6 RHSA-2022:5311

AlmaLinux

Errata ↗
ReleasePackageFixed inAdvisory
AlmaLinux 8 libgcrypt +1 1.8.5-7.el8_6 ALSA-2022:5311

Rocky Linux

Errata ↗
ReleasePackageFixed inAdvisory
Rocky Linux 8 libgcrypt 1.8.5-7.el8_6 RLSA-2022:5311
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed libgcrypt 1.10.1-1.1 openSUSE-SU-2024:12540-1
ReleasePackageFixed inAdvisory
Alpine v3.13 libgcrypt 1.8.8-r1 —
Alpine v3.12 libgcrypt 1.8.8-r1 —
Alpine v3.11 libgcrypt 1.8.8-r1 —

Oracle Linux

ReleasePackageFixed inAdvisory
Oracle Linux 8 libgcrypt +1 1.8.5-7.el8_6 ELSA-2022-9564, ELSA-2022-5311

Advisories 11

References