Golang/x/crypto message forgery vulnerability
Moderate severity
GitHub Reviewed
Published
May 24, 2022
to the GitHub Advisory Database
•
Updated Oct 2, 2023
Package
Affected versions
< 0.0.0-20190424203555-c05e17bb3b2d
Patched versions
0.0.0-20190424203555-c05e17bb3b2d
Description
Published by the National Vulnerability Database
May 22, 2019
Published to the GitHub Advisory Database
May 24, 2022
Reviewed
Aug 1, 2023
Last updated
Oct 2, 2023
A message-forgery issue was discovered in
crypto/openpgp/clearsign/clearsign.go
in supplementary Go cryptography libraries 2019-03-25. According to the OpenPGP Message Format specification in RFC 4880 chapter 7, a cleartext signed message can contain one or more optional "Hash" Armor Headers. The "Hash" Armor Header specifies the message digest algorithm(s) used for the signature. However, the Go clearsign package ignores the value of this header, which allows an attacker to spoof it. Consequently, an attacker can lead a victim to believe the signature was generated using a different message digest algorithm than what was actually used. Moreover, since the library skips Armor Header parsing in general, an attacker can not only embed arbitrary Armor Headers, but also prepend arbitrary text to cleartext messages without invalidating the signatures.References