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.
{
"license": "CC-BY-4.0",
"sources": [
{
"affected": {
"cryptopp:crypto\\+\\+": [
"<= 8.5"
]
},
"database_specific": {
"status": "Modified"
},
"html_url": "https://nvd.nist.gov/vuln/detail/CVE-2021-40530",
"id": "CVE-2021-40530",
"imported": "2026-12-03T14:14:32.687Z",
"modified": "2026-06-17T04:07:05.967Z",
"published": "2021-09-06T19:15:07.673Z",
"url": "https://services.nvd.nist.gov/rest/json/cves/2.0?cveId=CVE-2021-40530"
}
]
}