Medium
Security advisory
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.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2021-40528
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 1 Nov 2026, 07:09 UTC · Revision 1
Source evidence
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.
osv:CVE-2021-40528
Complete source record
{
"id": "e156e63ba60b4f19e3f64c1a2f45044ae5e6a052a5fd4d875869e781f5e130eb",
"url": "https://osv.dev/vulnerability/CVE-2021-40528",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "CVE-2021-40528",
"summary": "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.",
"evidence": "osv:CVE-2021-40528",
"products": [],
"severity": "medium",
"structured": {
"id": "CVE-2021-40528",
"aliases": [
"CVE-2021-40528"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N"
}
],
"affected": [
{
"ranges": [
{
"repo": "git://git.gnupg.org/libgcrypt.git",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "05422ca24a0391dad2a0b7790a904ce348819c10"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:gnupg:libgcrypt:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "0"
},
{
"fixed": "1.9.4"
}
],
"source": "CPE_RANGE"
}
]
}
}
],
"versions": [
"libgcrypt-1.10-base",
"libgcrypt-1.9.3",
"libgcrypt-1.9.1",
"libgcrypt-1.9-base",
"libgcrypt-1.8.1",
"libgcrypt-1.8.0",
"libgcrypt-1.7.3",
"libgcrypt-1.7.2",
"libgcrypt-1.7.1",
"libgcrypt-1.7.0",
"libgcrypt-1.6.0",
"libgcrypt-1.5.0",
"libgcrypt-1.5.0-beta1",
"post-nuke-of-trailing-ws",
"ecc-integration-done",
"libgcrypt-1.4.4",
"libgcrypt-1.4.3",
"libgcrypt-1.4.2",
"libgcrypt-1.4.2rc2",
"libgcrypt-1.4.2rc1",
"libgcrypt-1.4.1",
"libgcrypt-1.4.1rc1",
"libgcrypt-1.4.0",
"libgcrypt-1.3.2",
"libgcrypt-1.3.1",
"libgcrypt-1.3.0",
"V1-2-1",
"V1-2-0",
"V1-1-94",
"marcus-after-thread-cbs",
"marcus-before-thread-cbs",
"V1-1-93",
"V1-1-92",
"V1-1-91",
"V1-1-90",
"V1-1-44",
"V1-1-43",
"V1-1-42",
"V1-1-12",
"V1-1-11",
"V1-1-10",
"V1-1-9",
"V1-1-8",
"V1-1-7",
"now-less-freedom-protected",
"last-gpl-version",
"V1-1-6",
"V1-1-5",
"V1-1-4",
"V1-1-3",
"V1-1-2",
"V1-1-0",
"DEVEL-BRANCH-1-1",
"V1-0-0",
"V0-9-11",
"V0-9-10",
"V0-9-9",
"V0-9-8",
"V0-9-7",
"V0-9-6",
"V0-9-5",
"V0-9-4",
"V1-0-4",
"V1-0-3",
"V1-0-2",
"V1-0-1-ePit-1",
"V1-0-1",
"V0-9-3",
"V0-9-2",
"V0-9-1",
"V0-9-0",
"V0-4-5",
"V0-4-4",
"V0-4-3",
"V0-4-2",
"V0-4-1",
"V0-4-0",
"V0-3-5",
"V0-3-4",
"V0-3-3",
"V0-3-2",
"V0-3-1",
"V0-3-0",
"V0-2-19",
"V0-2-18",
"V0-2-17",
"V0-2-15",
"V0-2-10",
"V-0-2-8",
"V0-2-6",
"V0-2-0",
"V0-1-0",
"V0-0-0"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-40528.json"
}
},
{
"ranges": [
{
"repo": "https://github.com/gpg/libgcrypt",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "05422ca24a0391dad2a0b7790a904ce348819c10"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:gnupg:libgcrypt:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "0"
},
{
"fixed": "1.9.4"
}
],
"source": "CPE_RANGE"
}
]
}
}
],
"versions": [
"libgcrypt-1.10-base",
"libgcrypt-1.9.3",
"libgcrypt-1.9.1",
"libgcrypt-1.9-base",
"libgcrypt-1.8.1",
"libgcrypt-1.8.0",
"libgcrypt-1.7.3",
"libgcrypt-1.7.2",
"libgcrypt-1.7.1",
"libgcrypt-1.7.0",
"libgcrypt-1.6.0",
"libgcrypt-1.5.0",
"libgcrypt-1.5.0-beta1",
"post-nuke-of-trailing-ws",
"ecc-integration-done",
"libgcrypt-1.4.4",
"libgcrypt-1.4.3",
"libgcrypt-1.4.2",
"libgcrypt-1.4.2rc2",
"libgcrypt-1.4.2rc1",
"libgcrypt-1.4.1",
"libgcrypt-1.4.1rc1",
"libgcrypt-1.4.0",
"libgcrypt-1.3.2",
"libgcrypt-1.3.1",
"libgcrypt-1.3.0",
"V1-2-1",
"V1-2-0",
"V1-1-94",
"marcus-after-thread-cbs",
"marcus-before-thread-cbs",
"V1-1-93",
"V1-1-92",
"V1-1-91",
"V1-1-90",
"V1-1-44",
"V1-1-43",
"V1-1-42",
"V1-1-12",
"V1-1-11",
"V1-1-10",
"V1-1-9",
"V1-1-8",
"V1-1-7",
"now-less-freedom-protected",
"last-gpl-version",
"V1-1-6",
"V1-1-5",
"V1-1-4",
"V1-1-3",
"V1-1-2",
"V1-1-0",
"DEVEL-BRANCH-1-1",
"V1-0-0",
"V0-9-11",
"V0-9-10",
"V0-9-9",
"V0-9-8",
"V0-9-7",
"V0-9-6",
"V0-9-5",
"V0-9-4",
"V1-0-4",
"V1-0-3",
"V1-0-2",
"V1-0-1-ePit-1",
"V1-0-1",
"V0-9-3",
"V0-9-2",
"V0-9-1",
"V0-9-0",
"V0-4-5",
"V0-4-4",
"V0-4-3",
"V0-4-2",
"V0-4-1",
"V0-4-0",
"V0-3-5",
"V0-3-4",
"V0-3-3",
"V0-3-2",
"V0-3-1",
"V0-3-0",
"V0-2-19",
"V0-2-18",
"V0-2-17",
"V0-2-15",
"V0-2-10",
"V-0-2-8",
"V0-2-6",
"V0-2-0",
"V0-1-0",
"V0-0-0"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-40528.json"
}
}
],
"modified": "2026-10-24T10:30:49.461210230Z",
"provider": "osv",
"references": [
"https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgcrypt.git%3Ba=commit%3Bh=3462280f2e23e16adf3ed5176e0f2413d8861320",
"https://eprint.iacr.org/2021/923",
"https://ibm.github.io/system-security-research-updates/2021/07/20/insecurity-elgamal-pt1",
"https://security.gentoo.org/glsa/202210-13",
"https://ibm.github.io/system-security-research-updates/2021/09/06/insecurity-elgamal-pt2"
],
"provider_metadata": {}
},
"related_cves": [
{
"value": "CVE-2021-40528",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 436997,
"published_at": "2021-09-06T19:15:07.587+00:00"
}