{"schemaVersion":3,"id":"CVE-2021-40528","aliases":["ALPINE-CVE-2021-40528","MGASA-2021-0446","RHSA-2022:5311","UBUNTU-CVE-2021-40528","DEBIAN-CVE-2021-40528","DLA-2691-1","openSUSE-SU-2024:12540-1"],"status":"published","duplicateOf":null,"title":null,"description":"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.","dates":{"published":"2021-09-06T00:00:00.000Z","modified":"2025-06-09T15:13:03.906Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":5.9,"severity":"medium","version":"3.1","versionLabel":"v3.1","source":"CVE.org","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.1","versionLabel":"v3.1","source":"CVE.org","score":5.9,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","exploitability":null,"impact":null,"computed":false},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Alpine","score":5.9,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","exploitability":5.6,"impact":6,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Red hat","score":5.9,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","exploitability":5.6,"impact":6,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Ubuntu","score":5.9,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","exploitability":5.6,"impact":6,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Debian","score":5.9,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","exploitability":5.6,"impact":6,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":5.9,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","exploitability":null,"impact":null,"computed":false},{"version":"2.0","versionLabel":"v2.0","source":"NVD","score":2.6,"severity":"low","vector":"AV:N/AC:H/Au:N/C:P/I:N/A:N","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":0.01423,"percentile":0.72485,"severity":"low","asOf":"2026-10-19T00:00:00.000Z","change":{"pp":0,"baselineDate":"2026-09-19T00:00:00.000Z","baselineScore":0.01423},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.01423,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.01423,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.01423,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.01423,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.01423,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.01423,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.01423,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.01423,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.01423,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.01423,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.01423,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.01423,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.01423,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.01423,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.01423,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.01423,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.01423,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.01423,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.01423,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.01423,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.01423,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.01423,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.01423,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.01423,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.01423,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.01423,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.01423,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.01423,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.01423,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.01423,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.01423,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.01423,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.01423,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.01423,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.01423,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.01423,"percentile":0.72485}],"last30":[{"date":"2026-09-19T00:00:00.000Z","score":0.01423,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.01423,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.01423,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.01423,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.01423,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.01423,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.01423,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.01423,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.01423,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.01423,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.01423,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.01423,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.01423,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.01423,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.01423,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.01423,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.01423,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.01423,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.01423,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.01423,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.01423,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.01423,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.01423,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.01423,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.01423,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.01423,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.01423,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.01423,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.01423,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.01423,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.01423,"percentile":0.72485}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[{"id":"REF_EA81F0E90832F854","name":"Exploit Reference (ibm.github.io)","source":"reference","url":"https://ibm.github.io/system-security-research-updates/2021/09/06/insecurity-elgamal-pt2","maturity":"unknown","reliabilityScore":0.2,"verified":false,"type":null,"platforms":[],"requiresAuth":null,"exploitdb":null,"metasploit":null}],"exploitCount":1,"weaknesses":[{"id":"CWE-327","name":"Use of a Broken or Risky Cryptographic Algorithm","description":"The product uses a broken or risky cryptographic algorithm or protocol.","type":"weakness","status":"Draft","abstraction":"Class","likelihoodOfExploit":"High","url":"https://cwe.mitre.org/data/definitions/327.html"}],"affected":[{"vendor":"alpine","product":"libgcrypt","name":"libgcrypt","label":"libgcrypt","ecosystem":"Alpine Linux","cpePart":null,"purl":"pkg:apk/alpine/libgcrypt","purlType":"apk","versions":[{"text":"< 1.8.8-r1","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 1.8.8-r1","eol":null,"hubHref":null},{"vendor":"debian","product":"libgcrypt20","name":"libgcrypt20","label":"libgcrypt20","ecosystem":"Debian","cpePart":null,"purl":"pkg:deb/debian/libgcrypt20","purlType":"deb","versions":[{"text":"< 1.8.7-6","noFixRecorded":false,"fixedIn":null},{"text":"< 1.7.6-2+deb9u4","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 1.8.7-6 | < 1.7.6-2+deb9u4","eol":null,"hubHref":null},{"vendor":"ubuntu","product":"libgcrypt20","name":"libgcrypt20","label":"libgcrypt20","ecosystem":"Ubuntu","cpePart":null,"purl":"pkg:deb/ubuntu/libgcrypt20","purlType":"deb","versions":[{"text":"< 1.6.5-2ubuntu0.6+esm1","noFixRecorded":false,"fixedIn":null},{"text":"< 1.8.1-4ubuntu1.3","noFixRecorded":false,"fixedIn":null},{"text":"< 1.8.1-4ubuntu1.fips.3","noFixRecorded":false,"fixedIn":null},{"text":"All versions","noFixRecorded":true,"fixedIn":null},{"text":"< 1.8.5-5ubuntu1.1","noFixRecorded":false,"fixedIn":null},{"text":"< 1.8.5-5ubuntu1.fips.1.1","noFixRecorded":false,"fixedIn":null},{"text":"< 1.8.7-5ubuntu2","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 1.6.5-2ubuntu0.6+esm1 | < 1.8.1-4ubuntu1.3 | < 1.8.1-4ubuntu1.fips.3 | All versions (No fix recorded) | < 1.8.5-5ubuntu1.1 | < 1.8.5-5ubuntu1.fips.1.1 | < 1.8.7-5ubuntu2","eol":null,"hubHref":null},{"vendor":"gnupg","product":"libgcrypt","name":"libgcrypt","label":"libgcrypt","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"< 1.9.4","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 1.9.4","eol":null,"hubHref":"/vendor/gnupg/libgcrypt"},{"vendor":"mageia","product":"libgcrypt","name":"libgcrypt","label":"libgcrypt","ecosystem":"Mageia","cpePart":null,"purl":"pkg:rpm/mageia/libgcrypt","purlType":"rpm","versions":[{"text":"< 1.8.7-1.2.mga8","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 1.8.7-1.2.mga8","eol":null,"hubHref":null},{"vendor":"opensuse","product":"libgcrypt&distro=openSUSE Tumbleweed","name":"libgcrypt","label":"libgcrypt&distro=openSUSE Tumbleweed","ecosystem":"openSUSE","cpePart":null,"purl":"pkg:rpm/opensuse/libgcrypt&distro=openSUSE Tumbleweed","purlType":"rpm","versions":[{"text":"< 1.10.1-1.1","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 1.10.1-1.1","eol":null,"hubHref":null},{"vendor":"redhat","product":"libgcrypt","name":"libgcrypt","label":"libgcrypt","ecosystem":"Red Hat","cpePart":null,"purl":"pkg:rpm/redhat/libgcrypt","purlType":"rpm","versions":[{"text":"< 0:1.8.5-7.el8_6","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 0:1.8.5-7.el8_6","eol":null,"hubHref":null},{"vendor":"redhat","product":"libgcrypt-debuginfo","name":"libgcrypt-debuginfo","label":"libgcrypt-debuginfo","ecosystem":"Red Hat","cpePart":null,"purl":"pkg:rpm/redhat/libgcrypt-debuginfo","purlType":"rpm","versions":[{"text":"< 0:1.8.5-7.el8_6","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 0:1.8.5-7.el8_6","eol":null,"hubHref":null},{"vendor":"redhat","product":"libgcrypt-debugsource","name":"libgcrypt-debugsource","label":"libgcrypt-debugsource","ecosystem":"Red Hat","cpePart":null,"purl":"pkg:rpm/redhat/libgcrypt-debugsource","purlType":"rpm","versions":[{"text":"< 0:1.8.5-7.el8_6","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 0:1.8.5-7.el8_6","eol":null,"hubHref":null},{"vendor":"redhat","product":"libgcrypt-devel","name":"libgcrypt-devel","label":"libgcrypt-devel","ecosystem":"Red Hat","cpePart":null,"purl":"pkg:rpm/redhat/libgcrypt-devel","purlType":"rpm","versions":[{"text":"< 0:1.8.5-7.el8_6","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 0:1.8.5-7.el8_6","eol":null,"hubHref":null},{"vendor":"redhat","product":"libgcrypt-devel-debuginfo","name":"libgcrypt-devel-debuginfo","label":"libgcrypt-devel-debuginfo","ecosystem":"Red Hat","cpePart":null,"purl":"pkg:rpm/redhat/libgcrypt-devel-debuginfo","purlType":"rpm","versions":[{"text":"< 0:1.8.5-7.el8_6","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 0:1.8.5-7.el8_6","eol":null,"hubHref":null}],"affectedCount":11,"eol":{"hasEol":false,"count":0},"references":[{"url":"https://eprint.iacr.org/2021/923","label":"eprint.iacr.org/2021/923","hostname":"eprint.iacr.org","tags":["ARTICLE","REPORT","Technical Description","Third Party Advisory"]},{"url":"https://ibm.github.io/system-security-research-updates/2021/07/20/insecurity-elgamal-pt1","label":"ibm.github.io/system-security-research-updates/2021/07/20/insecurity-elgamal-pt1","hostname":"ibm.github.io","tags":["ARTICLE","REPORT","Third Party Advisory"]},{"url":"https://ibm.github.io/system-security-research-updates/2021/09/06/insecurity-elgamal-pt2","label":"ibm.github.io/system-security-research-updates/2021/09/06/insecurity-elgamal-pt2","hostname":"ibm.github.io","tags":["ARTICLE","REPORT","Exploit","Third Party Advisory"]},{"url":"https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgcrypt.git%3Ba=commit%3Bh=3462280f2e23e16adf3ed5176e0f2413d8861320","label":"git.gnupg.org/cgi-bin/…","hostname":"git.gnupg.org","tags":[]},{"url":"https://security.gentoo.org/glsa/202210-13","label":"security.gentoo.org/glsa/202210-13","hostname":"security.gentoo.org","tags":["Vendor Advisory","Third Party Advisory"]},{"url":"https://security.alpinelinux.org/vuln/CVE-2021-40528","label":"security.alpinelinux.org/vuln/CVE-2021-40528","hostname":"security.alpinelinux.org","tags":["Advisory"]},{"url":"https://advisories.mageia.org/MGASA-2021-0446.html","label":"advisories.mageia.org/MGASA-2021-0446.html","hostname":"advisories.mageia.org","tags":["Advisory"]},{"url":"https://bugs.mageia.org/show_bug.cgi?id=29467","label":"bugs.mageia.org/show_bug.cgi?id=29467","hostname":"bugs.mageia.org","tags":["REPORT"]},{"url":"https://ubuntu.com/security/notices/USN-5080-1","label":"ubuntu.com/security/notices/USN-5080-1","hostname":"ubuntu.com","tags":["Advisory"]},{"url":"https://access.redhat.com/errata/RHSA-2022:5311","label":"access.redhat.com/errata/RHSA-2022:5311","hostname":"access.redhat.com","tags":["Advisory"]},{"url":"https://access.redhat.com/security/updates/classification/#moderate","label":"access.redhat.com/security/updates/classification/","hostname":"access.redhat.com","tags":["ARTICLE"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2002816","label":"bugzilla.redhat.com/show_bug.cgi?id=2002816","hostname":"bugzilla.redhat.com","tags":["REPORT"]},{"url":"https://security.access.redhat.com/data/csaf/v2/advisories/2022/rhsa-2022_5311.json","label":"security.access.redhat.com/data/csaf/v2/advisories/2022/rhsa-2022_5311.json","hostname":"security.access.redhat.com","tags":["Advisory"]},{"url":"https://access.redhat.com/security/cve/CVE-2021-40528","label":"access.redhat.com/security/cve/CVE-2021-40528","hostname":"access.redhat.com","tags":["REPORT"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2021-40528","label":"www.cve.org/CVERecord?id=CVE-2021-40528","hostname":"www.cve.org","tags":["Advisory","REPORT"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-40528","label":"nvd.nist.gov/vuln/detail/CVE-2021-40528","hostname":"nvd.nist.gov","tags":["Advisory","Oval"]},{"url":"https://dev.gnupg.org/rCb118681ebc4c9ea4b9da79b0f9541405a64f4c13","label":"dev.gnupg.org/rCb118681ebc4c9ea4b9da79b0f9541405a64f4c13","hostname":"dev.gnupg.org","tags":["ARTICLE"]},{"url":"https://ubuntu.com/security/CVE-2021-40528","label":"ubuntu.com/security/CVE-2021-40528","hostname":"ubuntu.com","tags":["REPORT"]},{"url":"https://ubuntu.com/security/notices/USN-5080-2","label":"ubuntu.com/security/notices/USN-5080-2","hostname":"ubuntu.com","tags":["Advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2021-40528","label":"security-tracker.debian.org/tracker/CVE-2021-40528","hostname":"security-tracker.debian.org","tags":["Advisory"]},{"url":"https://www.suse.com/security/cve/CVE-2021-40528","label":"www.suse.com/security/cve/CVE-2021-40528","hostname":"www.suse.com","tags":["WEB"]}],"lineage":{"upstream":[],"downstream":["USN-5080-1","USN-5080-2"],"duplicates":[],"related":["USN-5080-1","USN-5080-2"]},"timeline":[{"kind":"published","date":"2021-09-06T00:00:00.000Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2025-06-09T15:13:03.906Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"risk":{"score":34,"level":"medium","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-19T21:11:57.265Z","stale":false,"partial":false}}