Description
_gcry_md_block_write in cipher/hash-common.c in Libgcrypt version 1.9.0 has a heap-based buffer overflow when the digest final function sets a large count value. It is recommended to upgrade to 1.9.1 or later.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | libgcrypt | 1.9.4-1.2 | openSUSE-SU-2024:10941-1 |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
GitHub 2 repositories
-
MLGRadish/CVE-2021-3345 ★ 9 · Jan 31, 2021
POC exploit of CVE-2021-3345, a vulnerability in libgcrypt version 1.9.0
-
SpiralBL0CK/CVE-2021-3345 ★ 3 · Feb 29, 2024
Actual working exploit for CVE-2021-3345
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Advisories 1
- openSUSE-SU-2024:10941-1 libgcrypt-cavs-1.9.4-1.2 on GA media SUSE / openSUSE Security Updates · Feb 4, 2026
References
- https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgcrypt.git%3Ba=commit%3Bh=512c0c75276949f13b6373b5c04f7065af750b08
- https://lists.gnupg.org/pipermail/gnupg-announce/2021q1/000455.html
- https://lists.gnupg.org/pipermail/gnupg-announce/2021q1/000456.html
- https://gnupg.org
- https://bugs.gentoo.org/show_bug.cgi?id=767814
- https://www.oracle.com//security-alerts/cpujul2021.html