{"id":"UBUNTU-CVE-2021-40530","details":"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.","modified":"2026-05-20T16:05:08.863627091Z","published":"2021-09-06T19:15:00Z","upstream":["CVE-2021-40530"],"references":[{"type":"REPORT","url":"https://ubuntu.com/security/CVE-2021-40530"},{"type":"REPORT","url":"https://eprint.iacr.org/2021/923"},{"type":"REPORT","url":"https://github.com/weidai11/cryptopp/issues/1059"},{"type":"REPORT","url":"https://ibm.github.io/system-security-research-updates/2021/07/20/insecurity-elgamal-pt1"},{"type":"REPORT","url":"https://ibm.github.io/system-security-research-updates/2021/09/06/insecurity-elgamal-pt2"},{"type":"REPORT","url":"https://www.cve.org/CVERecord?id=CVE-2021-40530"}],"affected":[{"package":{"name":"libcrypto++","ecosystem":"Ubuntu:Pro:14.04:LTS","purl":"pkg:deb/ubuntu/libcrypto%2B%2B?arch=source&distro=esm-infra-legacy%2Ftrusty"},"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"],"ecosystem_specific":{"binaries":[{"binary_version":"5.6.1-6+deb8u3ubuntu0.1~esm1","binary_name":"libcrypto++-utils"},{"binary_version":"5.6.1-6+deb8u3ubuntu0.1~esm1","binary_name":"libcrypto++9"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-40530.json"}},{"package":{"name":"libcrypto++","ecosystem":"Ubuntu:Pro:16.04:LTS","purl":"pkg:deb/ubuntu/libcrypto%2B%2B?arch=source&distro=esm-apps%2Fxenial"},"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"],"ecosystem_specific":{"binaries":[{"binary_version":"5.6.1-9ubuntu0.1+esm1","binary_name":"libcrypto++-utils"},{"binary_name":"libcrypto++9v5","binary_version":"5.6.1-9ubuntu0.1+esm1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-40530.json"}},{"package":{"name":"libcrypto++","ecosystem":"Ubuntu:18.04:LTS","purl":"pkg:deb/ubuntu/libcrypto%2B%2B?arch=source&distro=bionic"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["5.6.4-8"],"ecosystem_specific":{"binaries":[{"binary_version":"5.6.4-8","binary_name":"libcrypto++-utils"},{"binary_name":"libcrypto++6","binary_version":"5.6.4-8"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-40530.json"}},{"package":{"name":"libcrypto++","ecosystem":"Ubuntu:20.04:LTS","purl":"pkg:deb/ubuntu/libcrypto%2B%2B?arch=source&distro=focal"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["5.6.4-9","5.6.4-9build1"],"ecosystem_specific":{"binaries":[{"binary_version":"5.6.4-9build1","binary_name":"libcrypto++-utils"},{"binary_name":"libcrypto++6","binary_version":"5.6.4-9build1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-40530.json"}},{"package":{"name":"libcrypto++","ecosystem":"Ubuntu:22.04:LTS","purl":"pkg:deb/ubuntu/libcrypto%2B%2B?arch=source&distro=jammy"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["8.4.0-1","8.6.0-2ubuntu1"],"ecosystem_specific":{"binaries":[{"binary_version":"8.6.0-2ubuntu1","binary_name":"libcrypto++-utils"},{"binary_name":"libcrypto++8","binary_version":"8.6.0-2ubuntu1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-40530.json"}},{"package":{"name":"libcrypto++","ecosystem":"Ubuntu:24.04:LTS","purl":"pkg:deb/ubuntu/libcrypto%2B%2B?arch=source&distro=noble"},"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"],"ecosystem_specific":{"binaries":[{"binary_name":"libcrypto++-utils","binary_version":"8.9.0-1.1build1"},{"binary_name":"libcrypto++8t64","binary_version":"8.9.0-1.1build1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-40530.json"}},{"package":{"name":"libcrypto++","ecosystem":"Ubuntu:25.10","purl":"pkg:deb/ubuntu/libcrypto%2B%2B?arch=source&distro=questing"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["8.9.0-1.1build1","8.9.0-2"],"ecosystem_specific":{"binaries":[{"binary_version":"8.9.0-2","binary_name":"libcrypto++-utils"},{"binary_version":"8.9.0-2","binary_name":"libcrypto++8t64"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-40530.json"}},{"package":{"name":"libcrypto++","ecosystem":"Ubuntu:26.04:LTS","purl":"pkg:deb/ubuntu/libcrypto%2B%2B?arch=source&distro=resolute"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["8.9.0-2","8.9.0-2build1"],"ecosystem_specific":{"binaries":[{"binary_name":"libcrypto++-utils","binary_version":"8.9.0-2build1"},{"binary_name":"libcrypto++8t64","binary_version":"8.9.0-2build1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-40530.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N"},{"type":"Ubuntu","score":"medium"}]}