Skip to content
Fencer Vulns
medium 5.9

CVE-2021-40530 json

The ElGamal implementation in Crypto++ through 8.5 allows plaintext recovery because, during interaction between two cryptographic librarie…

published 2021-09-06 5 y ago modified 2026-06-17 4 mo ago also EUVD-2021-27705

cvss
5.9
version 3.1, NVD
cisa kev
Not listed
not in CISA's catalog
epss
1.2%
EPSS 1.2% chance of exploitation in 30 days, percentile 67%
public exploits
0
none known

Summary

The ElGamal implementation in Crypto++ through 8.5 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.

Patch / fix

  • libcrypto++ Debian 14, Debian 13, Debian 12 8.6.0-1

debian advisories DEBIAN-CVE-2021-40530

  • libcryptopp openSUSE Tumbleweed 8.6.0-1.1

opensuse advisories openSUSE-SU-2024:10933-1

  • crypto++ Arch Linux 8.6.0-1

arch linux advisories AVG-2363

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2021-40530 updated cvss 7.5

cryptopp: ElGamal implementation allows plaintext recovery

  • Red Hat All currently supported Red Hat products
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

Exploit prediction

1.16% chance of exploitation in the next 30 days, higher than 67% of all scored CVEs (FIRST EPSS, 2026-11-08).

Exploits and checks

  • ibm.github.io https://ibm.github.io/system-security-research-updates/2021/09/06/insecurity-elgamal-pt2 referenced PoC, tagged "exploit" by a source, unverified

CVSS scores

assigned by version score vector
NVD 3.1 5.9 CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
NVD 2.0 2.6 AV:N/AC:H/Au:N/C:P/I:N/A:N

Classification

Weakness
  • CWE-327 Use of a Broken or Risky Cryptographic Algorithm

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.