Description
Heap-based buffer overflow in the ask_outfile_name function in openfile.c for GnuPG (gpg) 1.4 and 2.0, when running interactively, might allow attackers to execute arbitrary code via messages with "C-escape" expansions, which cause the make_printable_string function to return a longer string than expected while constructing a prompt.
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.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | gnupg2 | 2.0.0-5.1 | — |
| Debian 13 | gnupg2 | 2.0.0-5.1 | — |
| Debian 12 | gnupg2 | 2.0.0-5.1 | — |
| Debian 3.1 | gnupg | 1.4.1-1.sarge6 | DSA-1231-1 |
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| RHEL 4 | gnupg | 1.2.6-8 | RHSA-2006:0754 |
| RHEL 3 | gnupg | 1.2.1-19 | RHSA-2006:0754 |
| RHEL 2 | gnupg | 1.0.7-20 | RHSA-2006:0754 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | gpg2 | 2.2.27-2.4 | openSUSE-SU-2024:10815-1 |
Advisories 3
- RHSA-2006:0754 Red Hat Security Advisory: gnupg security update Red Hat Security Advisories (RHSA) · Jun 26, 2026
- DSA-1231-1 gnupg Debian Security (DSA / DLA) · Mar 9, 2026
- openSUSE-SU-2024:10815-1 dirmngr-2.2.27-2.4 on GA media SUSE / openSUSE Security Updates · Feb 4, 2026
References
- 23110 third-party-advisory
- 23269 third-party-advisory
- 23303 third-party-advisory
- 20061127 GnuPG 1.4 and 2.0 buffer overflow mailing-list
- https://issues.rpath.com/browse/RPL-826
- gnupg-openfile-bo(30550) vdb-entry
- 23513 third-party-advisory
- 23284 third-party-advisory
- 23146 third-party-advisory
- 23171 third-party-advisory
- USN-393-2 vendor-advisory
- RHSA-2006:0754 vendor-advisory
- 2006-0068 vendor-advisory
- 1927 third-party-advisory
- DSA-1231 vendor-advisory
- 23299 third-party-advisory
- USN-389-1 vendor-advisory
- https://bugs.g10code.com/gnupg/issue728
- 1017291 vdb-entry
- GLSA-200612-03 vendor-advisory
- [gnupg-announce] 20061127 GnuPG 1.4 and 2.0 buffer overflow mailing-list
- 23094 third-party-advisory
- SUSE-SA:2006:075 vendor-advisory
- http://support.avaya.com/elmodocs2/security/ASA-2007-047.htm
- 20061201 rPSA-2006-0224-1 gnupg mailing-list
- 21306 vdb-entry
- ADV-2006-4736 vdb-entry
- 23250 third-party-advisory
- 23161 third-party-advisory
- MDKSA-2006:221 vendor-advisory
- OpenPKG-SA-2006.037 vendor-advisory
- oval:org.mitre.oval:def:11228 vdb-entry signature
- 24047 third-party-advisory