{"id":"UBUNTU-CVE-2021-40528","details":"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.","modified":"2026-04-22T14:56:36.843830Z","published":"2021-09-06T19:15:00Z","related":["USN-5080-1","USN-5080-2"],"upstream":["CVE-2021-40528"],"references":[{"type":"REPORT","url":"https://ubuntu.com/security/CVE-2021-40528"},{"type":"REPORT","url":"https://eprint.iacr.org/2021/923"},{"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":"ADVISORY","url":"https://ubuntu.com/security/notices/USN-5080-1"},{"type":"ADVISORY","url":"https://ubuntu.com/security/notices/USN-5080-2"},{"type":"REPORT","url":"https://www.cve.org/CVERecord?id=CVE-2021-40528"}],"affected":[{"package":{"name":"libgcrypt20","ecosystem":"Ubuntu:Pro:16.04:LTS","purl":"pkg:deb/ubuntu/libgcrypt20@1.6.5-2ubuntu0.6+esm1?arch=source&distro=esm-infra/xenial"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.6.5-2ubuntu0.6+esm1"}]}],"versions":["1.6.3-2ubuntu1","1.6.4-3","1.6.4-4","1.6.4-5","1.6.5-2","1.6.5-2ubuntu0.2","1.6.5-2ubuntu0.3","1.6.5-2ubuntu0.4","1.6.5-2ubuntu0.5","1.6.5-2ubuntu0.6"],"ecosystem_specific":{"availability":"Available with Ubuntu Pro (Infra-only): https://ubuntu.com/pro","binaries":[{"binary_name":"libgcrypt20","binary_version":"1.6.5-2ubuntu0.6+esm1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-40528.json"}},{"package":{"name":"libgcrypt20","ecosystem":"Ubuntu:18.04:LTS","purl":"pkg:deb/ubuntu/libgcrypt20@1.8.1-4ubuntu1.3?arch=source&distro=bionic"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.8.1-4ubuntu1.3"}]}],"versions":["1.7.8-2ubuntu1","1.7.9-1","1.8.1-4","1.8.1-4ubuntu1","1.8.1-4ubuntu1.1","1.8.1-4ubuntu1.2"],"ecosystem_specific":{"binaries":[{"binary_name":"libgcrypt20","binary_version":"1.8.1-4ubuntu1.3"}],"availability":"No subscription required"},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-40528.json"}},{"package":{"name":"libgcrypt20","ecosystem":"Ubuntu:Pro:FIPS-updates:18.04:LTS","purl":"pkg:deb/ubuntu/libgcrypt20@1.8.1-4ubuntu1.fips.3?arch=source&distro=fips-updates/bionic"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.8.1-4ubuntu1.fips.3"}]}],"versions":["1.8.1-4ubuntu1.fips.2.4","1.8.1-4ubuntu1.fips.2.5"],"ecosystem_specific":{"availability":"Available with Ubuntu Pro: https://ubuntu.com/pro","binaries":[{"binary_name":"libgcrypt20","binary_version":"1.8.1-4ubuntu1.fips.3"},{"binary_name":"libgcrypt20-hmac","binary_version":"1.8.1-4ubuntu1.fips.3"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-40528.json"}},{"package":{"name":"libgcrypt20","ecosystem":"Ubuntu:Pro:FIPS:18.04:LTS","purl":"pkg:deb/ubuntu/libgcrypt20@1.8.1-4ubuntu1.fips.2.5?arch=source&distro=fips/bionic"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.8.1-4ubuntu1.fips.2.4","1.8.1-4ubuntu1.fips.2.5"],"ecosystem_specific":{"binaries":[{"binary_name":"libgcrypt20","binary_version":"1.8.1-4ubuntu1.fips.2.5"},{"binary_name":"libgcrypt20-hmac","binary_version":"1.8.1-4ubuntu1.fips.2.5"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-40528.json"}},{"package":{"name":"libgcrypt20","ecosystem":"Ubuntu:20.04:LTS","purl":"pkg:deb/ubuntu/libgcrypt20@1.8.5-5ubuntu1.1?arch=source&distro=focal"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.8.5-5ubuntu1.1"}]}],"versions":["1.8.4-5ubuntu2","1.8.5-3ubuntu1","1.8.5-5ubuntu1"],"ecosystem_specific":{"availability":"No subscription required","binaries":[{"binary_name":"libgcrypt20","binary_version":"1.8.5-5ubuntu1.1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-40528.json"}},{"package":{"name":"libgcrypt20","ecosystem":"Ubuntu:Pro:FIPS-updates:20.04:LTS","purl":"pkg:deb/ubuntu/libgcrypt20@1.8.5-5ubuntu1.fips.1.1?arch=source&distro=fips-updates/focal"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.8.5-5ubuntu1.fips.1.1"}]}],"ecosystem_specific":{"availability":"Available with Ubuntu Pro: https://ubuntu.com/pro","binaries":[{"binary_name":"libgcrypt20","binary_version":"1.8.5-5ubuntu1.fips.1.1"},{"binary_version":"1.8.5-5ubuntu1.fips.1.1","binary_name":"libgcrypt20-hmac"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-40528.json"}},{"package":{"name":"libgcrypt20","ecosystem":"Ubuntu:Pro:FIPS:20.04:LTS","purl":"pkg:deb/ubuntu/libgcrypt20@1.8.5-5ubuntu1.fips.1.1?arch=source&distro=fips/focal"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.8.5-5ubuntu1.fips.1.1"}]}],"ecosystem_specific":{"availability":"Available with Ubuntu Pro: https://ubuntu.com/pro","binaries":[{"binary_name":"libgcrypt20","binary_version":"1.8.5-5ubuntu1.fips.1.1"},{"binary_name":"libgcrypt20-hmac","binary_version":"1.8.5-5ubuntu1.fips.1.1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-40528.json"}},{"package":{"name":"libgcrypt20","ecosystem":"Ubuntu:22.04:LTS","purl":"pkg:deb/ubuntu/libgcrypt20@1.8.7-5ubuntu2?arch=source&distro=jammy"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.8.7-5ubuntu2"}]}],"ecosystem_specific":{"availability":"No subscription required","binaries":[{"binary_name":"libgcrypt20","binary_version":"1.8.7-5ubuntu2"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-40528.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":"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"}]}