Cleartext Signature Forgery in GnuPG
Testing, NormalPublic

Assigned To
None
Authored By
• gniibe
Nov 4 2025, 6:07 AM

Description

[ Note that this is also the parent ticket for a couple of other reports by the same source]

In GnuPG implementation, g10/armor.c, the function parse_hash_header has an argument LINE and not have length of line.

When the header line input has is something like (expressed by C-escape for the NULL byte):

Hash: SHA256\x00....

The string after the NULL byte is ignored and it won't included in the computation of the signature.

This could be abused by an attacker and a user would see the string as if it's covered by the signature.


Reported-by: 49016 and Liam (two-heart)

Event Timeline

• gniibe shifted this object from the S1 Public space to the Restricted Space space.
• gniibe changed the visibility from "Public (No Login Required)" to "g10code (Project)".
• gniibe changed the edit policy from "All Users" to "g10code (Project)".
• gniibe mentioned this in Unknown Object (Maniphest Task).Nov 10 2025, 2:51 AM
• werner shifted this object from the Restricted Space space to the S1 Public space.Dec 26 2025, 2:52 PM
• werner changed the visibility from "g10code (Project)" to "All Users".
• werner removed a project: g10code.
• werner added a subscriber: • werner.

Regarding the cleartext signature please see this piece: https://gnupg.org/blog/20251226-cleartext-signatures.html

• werner triaged this task as Normal priority.Dec 29 2025, 4:54 PM
• werner edited projects, added OpenBSD, Not A Bug; removed Bug Report.
• werner changed the task status from Open to Testing.Jan 2 2026, 4:37 PM

(Testing for now for better visibility. Real or Semi-real bugs with fixes are already set to Resolved)

• werner changed the visibility from "All Users" to "Public (No Login Required)".Jan 5 2026, 11:26 AM
pl13 mentioned this in Unknown Object (Maniphest Task).Jan 12 2026, 9:31 AM
• werner set External Link to https://gnupg.org/blog/20251226-cleartext-signatures.html.Jan 15 2026, 4:05 PM