{"answers":{"affected":"It affects 1 product.","exploited":"There is no known exploitation of CVE-2021-40528 in the wild and no public exploit code.","fix":"Upgrade to a fixed version.","what":"CVE-2021-40528 is a medium-severity vulnerability in n/a, published on 6 Sep 2021. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2021-40528 and fix it if it is affected.\n\nWhat it is: CVE-2021-40528 is a medium-severity vulnerability in n/a, published on 6 Sep 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2021-40528 in the wild and no public exploit code.\n\nAffected product: n/a. No package-level version data is available, so check the vendor advisory linked from the reference page.\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2021-40528/ (Markdown: https://insights.sbomify.com/CVE-2021-40528/index.md)","id":"CVE-2021-40528","markdown":"https://insights.sbomify.com/CVE-2021-40528/index.md","name":"CVE-2021-40528","record":{"aliases":["ALPINE-CVE-2021-40528","ALSA-2022:5311","DEBIAN-CVE-2021-40528","DLA-2691-1","GHSA-8m2v-68m9-q2c7","JLSEC-2026-124","MGASA-2021-0446","OESA-2021-1362","RHSA-2022:5311","RLSA-2022:5311","UBUNTU-CVE-2021-40528","openSUSE-SU-2024:12540-1"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_read"],"network_reachable":"yes","non_default_config":false,"product_category":"Libgcrypt crypto library","requires_auth":"none","summary":"A flaw in Libgcrypt's ElGamal implementation allows plaintext recovery via cross-configuration attacks, impacting OpenPGP users.","user_interaction":"not_required","vuln_class":"weak_cryptography"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"mitre","cpe":[{"product":"libgcrypt","vendor":"gnupg"}],"cvss":{"score":5.9,"severity":"medium","source":"cisa-adp","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","version":"3.1"},"cwes":[{"id":"CWE-327","name":"Use of a Broken or Risky Cryptographic Algorithm"}],"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.","ecosystems":["AlmaLinux:8","Red Hat:enterprise_linux:8::baseos","Rocky Linux:8","openSUSE:Tumbleweed"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Weak cryptography in n/a","id":"CVE-2021-40528","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":null,"product":null,"products":[],"type":"weak_cryptography","year":"2021"},"n_packages":9,"n_references":5,"next":{"headline":"Weak cryptography in n/a","id":"CVE-2021-40529"},"packages":[{"ecosystem":"AlmaLinux:8","fixed":["1.8.5-7.el8_6"],"introduced":["0"],"last_affected":[],"package":"libgcrypt","purl":"pkg:rpm/almalinux/libgcrypt","source":"ALSA-2022:5311"},{"ecosystem":"AlmaLinux:8","fixed":["1.8.5-7.el8_6"],"introduced":["0"],"last_affected":[],"package":"libgcrypt-devel","purl":"pkg:rpm/almalinux/libgcrypt-devel","source":"ALSA-2022:5311"},{"ecosystem":"Red Hat:enterprise_linux:8::baseos","fixed":["0:1.8.5-7.el8_6"],"introduced":["0"],"last_affected":[],"package":"libgcrypt","purl":"pkg:rpm/redhat/libgcrypt","source":"RHSA-2022:5311"},{"ecosystem":"Red Hat:enterprise_linux:8::baseos","fixed":["0:1.8.5-7.el8_6"],"introduced":["0"],"last_affected":[],"package":"libgcrypt-debuginfo","purl":"pkg:rpm/redhat/libgcrypt-debuginfo","source":"RHSA-2022:5311"},{"ecosystem":"Red Hat:enterprise_linux:8::baseos","fixed":["0:1.8.5-7.el8_6"],"introduced":["0"],"last_affected":[],"package":"libgcrypt-debugsource","purl":"pkg:rpm/redhat/libgcrypt-debugsource","source":"RHSA-2022:5311"},{"ecosystem":"Red Hat:enterprise_linux:8::baseos","fixed":["0:1.8.5-7.el8_6"],"introduced":["0"],"last_affected":[],"package":"libgcrypt-devel","purl":"pkg:rpm/redhat/libgcrypt-devel","source":"RHSA-2022:5311"},{"ecosystem":"Red Hat:enterprise_linux:8::baseos","fixed":["0:1.8.5-7.el8_6"],"introduced":["0"],"last_affected":[],"package":"libgcrypt-devel-debuginfo","purl":"pkg:rpm/redhat/libgcrypt-devel-debuginfo","source":"RHSA-2022:5311"},{"ecosystem":"Rocky Linux:8","fixed":["0:1.8.5-7.el8_6"],"introduced":["0"],"last_affected":[],"package":"libgcrypt","purl":"pkg:rpm/rocky-linux/libgcrypt?distro=rocky-linux-8\u0026epoch=0","source":"RLSA-2022:5311"},{"ecosystem":"openSUSE:Tumbleweed","fixed":["1.10.1-1.1"],"introduced":["0"],"last_affected":[],"package":"libgcrypt","purl":"pkg:rpm/opensuse/libgcrypt\u0026distro=openSUSE%20Tumbleweed","source":"openSUSE-SU-2024:12540-1"}],"prev":{"headline":"Hardcoded credentials in n/a","id":"CVE-2021-40527"},"products":["n/a"],"published":"2021-09-06","related":[{"cvss_score":7.8,"headline":"Memory corruption in n/a","id":"CVE-2021-3345","kev_date_added":null,"published":"2021-01-29"},{"cvss_score":7.5,"headline":"Weak cryptography in n/a","id":"CVE-2018-6829","kev_date_added":null,"published":"2018-02-07"},{"cvss_score":6.7,"headline":"Memory corruption in Libgcrypt","id":"CVE-2026-41989","kev_date_added":null,"published":"2026-04-23"},{"cvss_score":5.9,"headline":"Information disclosure in n/a","id":"CVE-2019-12904","kev_date_added":null,"published":"2019-06-19"},{"cvss_score":5.9,"headline":"Information disclosure in n/a","id":"CVE-2017-9526","kev_date_added":null,"published":"2017-06-11"},{"cvss_score":4,"headline":"Memory corruption in Libgcrypt","id":"CVE-2026-41990","kev_date_added":null,"published":"2026-04-23"}],"sources":[{"class":"attribution","licence":"MIT","name":"AlmaLinux","prefix":"ALSA"},{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"Red Hat","prefix":"RHSA"},{"class":"attribution","licence":"BSD","name":"Rocky Linux","prefix":"RLSA"},{"class":"attribution","licence":"CC BY 4.0","name":"SUSE","prefix":"openSUSE"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-06-09","vendors":["n/a"]},"summary":"A flaw in Libgcrypt's ElGamal implementation allows plaintext recovery via cross-configuration attacks, impacting OpenPGP users.","url":"https://insights.sbomify.com/CVE-2021-40528/"}