{"id":"CVE-2021-40530","aliases":["DEBIAN-CVE-2021-40530","EUVD-2021-27705","GHSA-p3r9-6fhw-hgv8","MGASA-2021-0468","UBUNTU-CVE-2021-40530","openSUSE-SU-2024:10933-1"],"status":"published","title":"The ElGamal implementation in Crypto++ through 8.5 allows plaintext recovery because, during...","description":"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.","severity":{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"medium","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-09","score":0.01157,"percentile":0.67297,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-327"],"published":"2021-09-06T18:44:47Z","modified":"2026-10-24T10:30:59Z","fixes":[{"ecosystem":"Debian:12","package":"libcrypto++","fixed_in":["8.6.0-1"],"sources":["osv"]},{"ecosystem":"Debian:13","package":"libcrypto++","fixed_in":["8.6.0-1"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"libcrypto++","fixed_in":["8.6.0-1"],"sources":["osv"]},{"ecosystem":"Mageia:8","package":"libcryptopp","fixed_in":["8.2.0-2.1.mga8"],"sources":["osv"]}],"affected":[{"source":"osv","ecosystem":"Debian:12","package":"libcrypto++","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"8.6.0-1"}]}]},{"source":"osv","ecosystem":"Debian:13","package":"libcrypto++","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"8.6.0-1"}]}]},{"source":"osv","ecosystem":"Debian:14","package":"libcrypto++","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"8.6.0-1"}]}]},{"source":"osv","ecosystem":"Mageia:8","package":"libcryptopp","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"8.2.0-2.1.mga8"}]}]},{"source":"osv","ecosystem":"Ubuntu:Pro:14.04:LTS","package":"libcrypto++","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["5.6.1-6","5.6.1-6+deb8u1build0.14.04.1","5.6.1-6+deb8u3build0.14.04.1","5.6.1-6+deb8u3ubuntu0.1~esm1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:16.04:LTS","package":"libcrypto++","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["5.6.1-8","5.6.1-9","5.6.1-9ubuntu0.1","5.6.1-9ubuntu0.1+esm1"]},{"source":"osv","ecosystem":"Ubuntu:18.04:LTS","package":"libcrypto++","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["5.6.4-8"]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"libcrypto++","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["5.6.4-9","5.6.4-9build1"]},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"libcrypto++","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["8.4.0-1","8.6.0-2ubuntu1"]},{"source":"osv","ecosystem":"Ubuntu:24.04:LTS","package":"libcrypto++","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["8.8.0-1","8.9.0-1","8.9.0-1.1","8.9.0-1.1build1"]},{"source":"osv","ecosystem":"Ubuntu:25.10","package":"libcrypto++","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["8.9.0-1.1build1","8.9.0-2"]},{"source":"osv","ecosystem":"Ubuntu:26.10","package":"libcrypto++","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["8.9.0-2build1","8.9.0-3"]},{"source":"osv","ecosystem":"Ubuntu:26.04:LTS","package":"libcrypto++","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["8.9.0-2","8.9.0-2build1"]},{"source":"osv","ecosystem":"openSUSE:Tumbleweed","package":"libcryptopp","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"8.6.0-1.1"}]}],"bundled":2}],"products":[{"vendor":"cryptopp","product":"crypto\\+\\+"},{"vendor":"fedoraproject","product":"fedora"}],"references":[{"url":"https://eprint.iacr.org/2021/923","tags":["x_refsource_MISC","x_transferred","Technical Description","Third Party Advisory","advisory","report"]},{"url":"https://ibm.github.io/system-security-research-updates/2021/07/20/insecurity-elgamal-pt1","tags":["x_refsource_MISC","x_transferred","Third Party Advisory","advisory","report"]},{"url":"https://ibm.github.io/system-security-research-updates/2021/09/06/insecurity-elgamal-pt2","tags":["x_refsource_MISC","x_transferred","Exploit","Third Party Advisory","evidence","report"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/HGVBZ2TTRKCTYAZTRHTF6OBD4W37F5MT/","tags":["vendor-advisory","x_refsource_FEDORA","x_transferred","web"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/57OJA2K5AHX5HAU2QBDRWLGIIUX7GASC/","tags":["vendor-advisory","x_refsource_FEDORA","x_transferred","web"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/VJYOZGWI7TD27SEXILSM6VUTPPEICDL7/","tags":["vendor-advisory","x_refsource_FEDORA","x_transferred","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-40530"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/57OJA2K5AHX5HAU2QBDRWLGIIUX7GASC/"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/HGVBZ2TTRKCTYAZTRHTF6OBD4W37F5MT/"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/VJYOZGWI7TD27SEXILSM6VUTPPEICDL7/"},{"url":"https://github.com/advisories/GHSA-p3r9-6fhw-hgv8"},{"url":"https://security-tracker.debian.org/tracker/CVE-2021-40530","tags":["advisory"]},{"url":"https://advisories.mageia.org/MGASA-2021-0468.html","tags":["advisory"]},{"url":"https://bugs.mageia.org/show_bug.cgi?id=29529","tags":["report"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/thread/HGVBZ2TTRKCTYAZTRHTF6OBD4W37F5MT/","tags":["web"]},{"url":"https://ubuntu.com/security/CVE-2021-40530","tags":["report"]},{"url":"https://github.com/weidai11/cryptopp/issues/1059","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2021-40530","tags":["report"]},{"url":"","tags":["advisory"]},{"url":"https://www.suse.com/security/cve/CVE-2019-14318","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2021-40530","tags":["web"]}],"sources":{"cve":[{"id":"CVE-2021-40530","description":"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.","status":"published","published":"2021-09-06T18:44:47Z","modified":"2024-08-04T02:44:10.922Z","updated_at":"2026-11-02T14:33:01.495293Z"}],"euvd":[{"id":"EUVD-2021-27705","description":"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.","status":"published","published":"2021-09-06T18:44:47Z","modified":"2024-08-04T02:44:10Z","updated_at":"2026-11-03T03:24:20.264881Z"}],"ghsa":[{"id":"GHSA-p3r9-6fhw-hgv8","title":"The ElGamal implementation in Crypto++ through 8.5 allows plaintext recovery because, during...","description":"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.","status":"published","published":"2022-05-24T19:13:02Z","modified":"2023-01-30T05:01:51Z","cwes":["CWE-327"],"updated_at":"2026-11-02T14:46:30.304291Z"}],"nvd":[{"id":"CVE-2021-40530","description":"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.","status":"published","published":"2021-09-06T19:15:07.673Z","modified":"2026-06-17T04:07:05.967Z","cvss":[{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"medium","assessor":"primary"},{"version":"2.0","score":2.6,"vector":"AV:N/AC:H/Au:N/C:P/I:N/A:N","level":"low","assessor":"primary"}],"cwes":["CWE-327"],"updated_at":"2026-11-02T14:06:58.05696Z"}],"osv":[{"id":"CVE-2021-40530","description":"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.","status":"published","published":"2021-09-06T19:15:07.673Z","modified":"2026-10-24T10:30:59.017974879Z","cvss":[{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"medium"}],"updated_at":"2026-11-02T15:44:21.249056Z"},{"id":"DEBIAN-CVE-2021-40530","description":"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.","status":"published","published":"2021-09-06T19:15:07.673Z","modified":"2026-10-23T18:03:32.99911785Z","cvss":[{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"medium"}],"updated_at":"2026-11-02T15:45:35.521549Z"},{"id":"UBUNTU-CVE-2021-40530","description":"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.","status":"published","published":"2021-09-06T19:15:00Z","modified":"2026-10-17T12:56:20.854227819Z","cvss":[{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"medium"}],"updated_at":"2026-11-02T15:54:29.220315Z"},{"id":"MGASA-2021-0468","title":"Updated libcryptopp packages fix security vulnerability","description":"The ElGamal implementation in Crypto++ through 8.5 allows plaintext recovery\nbecause, during interaction between two cryptographic libraries, a certain\ndangerous combination of the prime defined by the receiver's public key, the\ngenerator defined by the receiver's public key, and the sender's ephemeral\nexponents can lead to a cross-configuration attack against OpenPGP.\n(CVE-2021-40530)\n","status":"published","published":"2021-10-06T19:41:56Z","modified":"2026-04-16T04:42:33.670486216Z","updated_at":"2026-11-02T15:49:41.849028Z"},{"id":"openSUSE-SU-2024:10933-1","title":"libcryptopp-devel-8.6.0-1.1 on GA media","description":"These are all security issues fixed in the libcryptopp-devel-8.6.0-1.1 package on the GA media of openSUSE Tumbleweed.","status":"published","published":"2024-06-15T00:00:00Z","modified":"2026-02-04T02:30:52.643956Z","updated_at":"2026-11-02T16:58:34.894275Z"}]}}
