Responsible Disclosure Requires Accountability: Putting Recent GnuPG Security Reports into Context

A talk at the 39th Chaos Communication Congress (39C3) presented several observations related to signature verification in GnuPG. These observations are documented on the accompanying website gpg.fail.

The way the findings were presented creates the impression that GnuPG is affected by serious security flaws and that we, as maintainers, are failing to meet our responsibilities.

In fact, we carefully reviewed each reported observation and provided timely feedback to the security researchers involved. However, this did not result in a constructive technical exchange.

Public Communication and Technical Context

After the talk was published, we received many follow-up questions: Is GnuPG still secure? Can the software continue to be used?

The short answer is: yes.

In this article, we explain the published observations and their technical background. We show which of them were actual bugs and which were not.

We addressed all confirmed bugs promptly (October/November 2025). Other observations relate to known properties of the software or to deliberate design decisions. Why we chose not to change those is explained in the section Why Not Every Security Report Leads to a Fix.

Maintainer Decisions: Security Fixes, Stability, and Long-Term Compatibility

As maintainers of GnuPG, we continuously make decisions about how the software evolves. This responsibility goes far beyond maintaining a codebase that has grown over decades. It includes advancing the software itself as well as handling requirements and expectations from the community and from users who rely on GnuPG in production environments.

At the same time, we must ensure that GnuPG remains reliable and stable. The software is used in security-critical contexts, in some cases even in environments where failures can have serious real-world consequences.

Another key factor is backward compatibility. GnuPG must continue to interoperate with older versions and with software systems that have depended on GnuPG for many years, or that use it as a drop-in replacement.

Secure Use of GnuPG Requires Knowledge and Responsibility

Note: GnuPG consists of multiple tools. Whether its use is secure depends on how those tools are applied. Anyone working with GnuPG should have a basic understanding of fundamental security concepts.

GnuPG can also be used in ways that carry inherent risk. This is not a consequence of the code itself, but is often the result of misuse or incorrect assumptions about what is actually being verified or protected.

Responsibility therefore does not end with the program code. It also includes the conscious and informed use of the tools. Secure operation requires users who are appropriately trained.

Why Not Every Security Report Leads to a Fix

Not every security report results in a change to the code. In this section, we explain why this is the case and under which circumstances we deliberately decide against making an adjustment.

Why the GnuPG User Interface rarely Changes

GnuPG has been developed for many years with a strong focus on compatibility with older versions. This backward compatibility goes back to PGP, which was first released in 1991.

Changes to the behavior of the gpg command-line interface have direct consequences. These include, for example, different default values or modified input and output formats. Such changes can disrupt established workflows or bring automated processes to a halt.

This does not only affect current Open Source projects. Many proprietary and internal systems have relied on gpg in production environments for decades. They depend on its behavior remaining stable and predictable.

For this reason, we avoid changes to the user interface whenever possible. We follow the Linux philosophy of Don't break user space. Existing user environments should not be disrupted or rendered unusable by incompatible changes to the user interface.

Cleartext Signatures: Known Limitations and Recommended Usage

For historical reasons, cleartext signatures are still used today in many critical systems. We assume that, in practice, they are usually applied correctly.

At the same time, cleartext signatures have always had technical limitations. From today's perspective, they are therefore considered problematic. As a general rule, we recommend avoiding their use.

If the use of cleartext signatures cannot be avoided, the --output option should at least be used. This ensures that only the content that was actually signed is passed on for further processing.

Further Reading: A detailed technical discussion of cleartext signatures can be found in the following blog post: https://www.gnupg.org/blog/20251226-cleartext-signatures.html

Social Engineering: Limits of Technical Protections

Another attack scenario aims to trick users into executing harmful commands themselves. This is not a technical flaw, but a classic case of social engineering. It is comparable to well-known “tips” from forums, such as entering sudo rm -rf / to supposedly “speed up” a system. (Please, don't try this at home.)

A similar approach is used when users are persuaded to import a manipulated keyring instead of using the intended commands gpg --import or gpg --export.

Such social-engineering attacks cannot be prevented by technical measures alone. The only effective countermeasure is education: raising awareness of risks and common attack patterns.

Note (not limited to GnuPG): Never copy commands from the internet into your command line unless you fully understand what they do. There is no tool that can protect you if you choose to ignore this rule.

For inexperienced users, we recommend our graphical application Kleopatra for managing certificates and cryptographic services. It helps prevent common user errors and provides effective protection against many of these attack scenarios.

Assessment of the Criticism Raised in the Talk

The talk presented several observations related to GnuPG. Only a small subset of these concerned actual implementation defects. We have addressed those.

In all other cases, we deliberately did not change the code. The observations concern well-known usage risks, in particular social engineering in combination with cleartext signatures. The proposed countermeasures focus on changes to the user interface that we do not implement for reasons of backward compatibility.

Summary: We fixed one bug that could cause a non-exploitable 1-byte buffer overflow, as well as two other bugs. None of these issues constituted a security vulnerability that could be exploited in practice.

All other reports do not relate to defects in the GnuPG codebase, but to social engineering, mostly combined with a lack of verification of the signed data.

The sections below are structured according to the talk. Each item can be expanded or collapsed by clicking on the respective heading.

▶ Nr. 1: Multiple Plaintext Attack on Detached PGP Signatures in GnuPG (detached)

  • Our ticket: https://dev.gnupg.org/T7903
  • Status: fixed on October 22, 2025
  • Description: An attacker can append additional plaintext to a so-called detached signature. If this modified signature is then processed using gpg --decrypt, the appended plaintext may be displayed. This can mislead users or, at the very least, cause confusion.
  • Prerequisites: For this scenario to work, users must be persuaded not to verify the signature as intended, but to decrypt it instead.
  • Assessment: When detached signatures are created correctly and remain unmodified, the command gpg --verify does not output any of the signed content. Detached signatures do not contain the signed data itself; they only contain the cryptographic signature used for verification. Displaying plaintext is therefore neither possible nor meaningful in this case.

▶ Nr. 2: GnuPG Accepts Path Separators and Path Traversals in Literal Data "Filename" Field (filename)

  • Out ticket: https://dev.gnupg.org/T7908
  • Status: Not a security vulnerability (social engineering and UI changes would be required; see note above)
  • Description: In PGP compatibility mode, and when no explicit command is specified, GnuPG may adopt a filename from the Literal Data packet. For this reason, it has long been recommended to invoke gpg with an explicit command and to specify the target filename explicitly.
  • Prerequisites: Users must be persuaded to trust the suggested filename.
  • Assessment: The filename contained in the Literal Data packet is advisory only. It is not enforced and does not replace an explicitly specified output filename.

Originally, PGP automatically stored files using the filename provided in the Literal Data packet and would overwrite existing files if necessary. This behavior could lead to security issues.

GnuPG deliberately changed this behavior. When gpg is invoked without an explicit command or output filename, it does not overwrite existing files automatically. Instead, GnuPG explicitly asks whether an existing file should be replaced:

File 'test.txt' exists. Overwrite? (y/N)

The default response is explicitly “N” for “No”. If the input is confirmed or “N” is selected, GnuPG prompts for a new filename. This prevents accidental overwriting.

Apart from this, earlier OpenPGP specifications did not include the filename as part of the signature. In the current LibrePGP specification, however, the filename is covered by the signature—a behavior that GnuPG fully supports. Even in this case, the filename remains advisory and does not constitute a binding instruction.

For this reason, we continue to recommend invoking gpg with an explicit command (for example, --decrypt) and specifying the output filename explicitly.

▶ Nr. 3: Cleartext Signature Plaintext Truncated for Hash Calculation (formfeed)

  • Out Ticket: https://dev.gnupg.org/T7909
  • Status: Not a security vulnerability (social engineering, improper use of cleartext signatures, and UI changes would be required; see note above)
  • Description: This issue describes that, when using cleartext signatures, the plaintext used for hash computation may differ from the text displayed by simple tools such as cat. The content produced by gpg --output, however, always corresponds to the plaintext that was actually signed.
  • Prerequisites: Users rely on the plaintext displayed by cat and do not verify the content that was actually signed.
  • Assessment: Signature verification itself is correct. Any difference is a result of comparing the wrong output.

Relying solely on the output of cat is inherently unsafe, as cat doesn't always display everything that is actually contained in a file. Even using cat -v would have made additional control characters visible and shown that the displayed text does not match the actual content.

Using gpg --output, as recommended, would have reliably prevented this scenario (see above).

▶ Nr. 4: Encrypted Message Malleability Checks Are Incorrectly Enforced Causing Plaintext Recovery Attacks (malleability)

  • Our ticket: https://dev.gnupg.org/T7907
  • Status: Not a security vulnerability (social engineering, improper use of cleartext signatures, and UI changes would be required; see note above)
  • Summary: Users must ignore an error message issued by gpg (“decryption failed”) and then continue to process or even sign the resulting output.
  • Description: It is claimed that an attacker could craft manipulated encrypted messages in such a way that usable plaintext is produced despite a decryption error.
  • Prerequisites: Recipients ignore an explicit error reported by gpg and continue working with the output anyway.
  • Assessment: Under these conditions, this is not a security vulnerability.

1. Claim according to gpg.fail

In the interest of a timely disclosure, we cannot provide an refined end-to-end demonstration of the issue. However, under the following assumptions we can demonstrate relevant parts of the attack. In combination with the buggy code pointed out above, we believe that there is sufficient risk of a serious vulnerability to warrant investigation and fixes by GnuPG maintainers.

We assume that:

  • We have access to the encrypted data
  • The encrypted data is exactly 64 bytes of total entropy
  • Bob uses GnuPG 2.4.8
  • Bob has no non-standard config and uses head -c64 /dev/urandom | gpg -e -r online to encrypt his data

2. Described attack scenario

To illustrate the claimed impact, the website describes an attack scenario.

Mallory is an attacker who either later gets access to an encrypted message, or as as an active MITM. Mallory's goal is to decrypt an encrypted message that Alice encrypted for Bob.

  • Alice has Bob's public key
  • Alice encrypts the plaintext "SECRET" to Bob's public key, and sends the ciphertext as a PGP message to Bob.
  • Mallory gets access to the encrypted message, and would like to decrypt it, so Mallory modifies the message to be a public key.
  • Mallory sends Bob the modified message, asking for a signature on the public key—a common not suspicious action for PGP users.
  • Bob decrypts and signs the apparent public key, and publishes the signature along with the public key to a keyserver.
  • Mallory fetches the key from the keyserver and retrieves the accidentally decrypted plaintext

3. Constraints and assumptions of the attack

Based on the description provided, the attack essentially relies on Mallory sending Bob a manipulated message and asking him to sign what appears to be a public key—a request that is common for PGP users and does not appear suspicious. Bob decrypts the apparent public key, signs it, and publishes the signature together with the public key on a keyserver.

However, Bob ignores the fact that the decryption has failed and proceeds to sign something without being certain what he is actually signing. The purpose of authenticated encryption (AE)—either via CFB+MDC (since version 1.0.2 in 2000) or OCB (since version 2.3.0 in 2021)—is precisely to detect such modified encrypted messages.

4. Further claims regarding error handling and assessment

The attack description further states:

  1. Packets can be modified by an attacker to output a failure that appears harmless to the user, such as truncation, and
  2. it does not discard inputs known to be a security problem and continues processing the data.

This scenario assumes that a clear error message issued by gpg is deliberately downplayed or ignored. The message referred to here is:

gpg: decryption failed: Invalid packet

Calling such a failure “harmless to the user” therefore relies on social engineering—specifically on persuading users to dismiss or disregard an explicit error message.

The claim that GnuPG does not discard problematic input is also based on a misunderstanding of how Unix tools operate. A traditional Unix tool does not necessarily write directly to a file, but often works as part of a pipeline. Data that has already been written to the output cannot be retracted afterward. Only after processing has completed can it be determined whether the data as a whole was valid.

Specialized applications or graphical user interfaces can behave differently in this regard. They buffer the decrypted data in full and prompt the user before saving it. This ensures that faulty data is not reused.

Under these conditions, this is not a security vulnerability.

▶ Nr. 5: Memory Corruption in ASCII-Armor Parsing (memcpy)

  • Our ticket: https://dev.gnupg.org/T7906
  • Status: Fixed on November 6, 2025 for VSD, on November 19, 2025 for 2.5, and on December 30, 2025 for 2.4
  • Description: This issue allows at most a single byte to be overwritten. That byte could affect the beginning of the next block on the heap and potentially alter the tag typically stored there.
  • Assessment: Depending on the specific malloc(3) implementation, it might have been possible to construct an exploit from this around 20 years ago. Today, this is no longer feasible. Modern malloc implementations consistently validate pointers and sizes and abort the process immediately when inconsistencies are detected.

Even if it were possible to deliberately influence the next block on the heap, this would still not allow code execution, for example via free() (see “Vudo Malloc Tricks”, Phrack #57, 2001, [https://phrack.org/issues/57/8.html](https://phrack.org/issues/57/8.html)).

▶ Nr. 6: Not a GnuPG Issue (minisign)

  • Assessment: The observations mentioned in this context relate to minisign, not to GnuPG. They affect neither the functionality nor the security of GnuPG and therefore fall outside our area of responsibility.

▶ Nr. 7: Cleartext Signature Forgery in the NotDashEscaped Header Implementation in GnuPG (notdash)

  • Our ticket: https://dev.gnupg.org/T7901
  • Status: Not a security vulnerability (social engineering, improper use of cleartext signatures, and UI changes would be required; see note above)
  • Assessment: The affected functionality was marked as obsolete in GnuPG 2.5.16. It can now only be checked using a dedicated flag and was part of a release process that is no longer in use today.

▶ Nr. 8: OpenPGP Cleartext Signature Framework Susceptible to Format Confusion (notsoclear)

  • Our ticket: https://dev.gnupg.org/T7902
  • Status: Not a security vulnerability (social engineering, improper use of cleartext signatures, and UI changes would be required; see note above)
  • Description: In the described scenario, the format of a cleartext signature is manipulated by inserting an additional hyphen in the header: -----BEGIN PGP SIGNED MESSAGE------
  • Prerequisites: Users do not verify the signed output and accept the manipulated structure.
  • Assessment: The described confusion relies on social engineering and results from a use of cleartext signatures that is not intended.

Additional Technical Context

For this scenario to work, users must inspect the input data without noticing that the header of the cleartext signature has been slightly but deliberately modified. An additional hyphen can easily go unnoticed.

For this reason, users should not rely on the input data itself, but verify the output produced by gpg. Using the --output option ensures that the verified content is actually processed.

▶ Nr. 9: GnuPG Output Fails To Distinguish Signature Verification Success From Message Content (noverify)

  • Our ticket: https://dev.gnupg.org/T7909
  • Status: Not a security vulnerability (social engineering, improper use of cleartext signatures, and UI changes would be required; see note above)
  • Description: In this scenario, the encrypted data itself contains a forged success message that appears to indicate a successful signature verification by gpg.
  • Prerequisites: Users rely on this message instead of checking the actual result of the signature verification.
  • Assessment: The misleading effect relies on targeted social engineering and on failing to verify the signed output. There is no flaw in the signature verification itself.

▶ Nr. 10: Cleartext Signature Forgery in GnuPG (nullbyte)

  • Our ticket: https://dev.gnupg.org/T7900
  • Status: Not a security vulnerability (social engineering, improper use of cleartext signatures, and UI changes would be required; see note above)
  • Description: In the described scenario, the appearance of a valid cleartext signature is created even though the content that is actually verified differs.
  • Prerequisites: Users look at the original input rather than the output validated by gpg during signature verification.
  • Assessment: The misleading effect arises solely from not considering the verified output of the signature check. It relies on targeted social engineering and on a use of cleartext signatures that is not intended.

▶ Nr. 11: Radix64 Line-Truncation Enabling Polyglot Attacks (polyglot)

  • Our ticket: https://dev.gnupg.org/T7905
  • Status: Not a security vulnerability (social engineering, improper use of cleartext signatures, and UI changes would be required; see note above)
  • Description: In the described scenario, data is manipulated so that signed and unsigned data appear side by side.
  • Prerequisites: During decryption, users ignore an error message issued by gpg and nevertheless rely on the displayed data.
  • Assessment: Successful exploitation requires that the reported error message is deliberately ignored.

▶ Nr. 12: GnuPG May Downgrade Digest Algorithm to SHA1 (sha1)

  • Our ticket: https://dev.gnupg.org/T7904
  • Status: Fixed on October 22, 2025
  • Description: Due to a bug, GnuPG could downgrade the hash algorithm in use to SHA-1.
  • Assessment: This was a genuine bug. However, exploiting this issue would require a second-preimage attack against SHA-1. Such an attack is currently not feasible for SHA-1.

▶ Nr. 13: GnuPG Trust Packet Parsing Enables Adding Arbitrary Subkeys (trust)

  • Status: Not a security vulnerability (social engineering; see note above)
  • Description: In the described scenario, manipulated trust packets in a keyring could cause additional subkeys to be taken into account.
  • Prerequisites: Users must be induced to execute a malicious command on the command line that they do not understand.
  • Assessment: The attack requires users to import a manipulated keyring from an external source and then use it for cryptographic operations, encrypting with deliberately altered certificates contained in that keyring.

Public keys or certificates are exchanged individually. Entire keyrings are not. The described scenario therefore depends on targeted social engineering and requires command-line usage outside the intended scope.

▶ Nr. 14: Not a GnuPG Issue (minisign)

  • Assessment: The observations mentioned in this context relate to minisign, not to GnuPG. They affect neither the functionality nor the security of GnuPG and therefore fall outside our area of responsibility.

Clarification on Signing: Commits and Releases Are Consistently Signed

Toward the end of the talk, the impression is created that we either refrain from signing Git commits or do not consider this topic particularly important. This is not the case.

Commits in our official Git repositories have been consistently signed with GnuPG for many years. To protect the private keys, we rely on smartcards as a standard measure.

In addition, all of our release tarballs and release tags are, of course, digitally signed as well. GnuPG was the first project to introduce this practice—more than 25 years ago. To this day, many other widely used and in some cases critical libraries and tools still offer no way to cryptographically verify the authenticity of their releases.

Responsible Disclosure and Responsibility in Security Communication

We explicitly welcome security research and reports of potential issues. Such feedback is essential. It helps to improve security-critical software.

In this specific case, the published observations did not reveal any new security-relevant defects. Genuine bugs were—as always—clearly identified and fixed promptly. Everything else concerned known properties of the software or deliberate design decisions.

The main issue is not the observations themselves, but how they are presented. The list on gpg.fail places very different issues side by side without context or clear distinction. This creates the impression of a series of severe security vulnerabilities.

In reality, many of these observations describe variations of the same underlying problem: something different is being verified than what is later perceived as “signed” or “verified.” This is not a new phenomenon and is, to a large extent, a property of the underlying standard.

Responsible disclosure does not mean publishing and moving on. Anyone who presents findings publicly has a responsibility to provide context, remain precise, and consider the impact of how those findings are communicated.

For software like GnuPG, which is deployed in sensitive and security-critical environments, this responsibility carries particular weight. Public communication needs to take that context into account.

The observations could have been presented in a factual and differentiated way, without rhetorical escalation. That would have helped clarify the technical aspects involved. Instead, the resulting portrayal creates an impression that is neither technically warranted nor appropriate to the responsibility that comes with communicating about security-critical software.