CVE-2019-11841: Golang.org/x/crypto Golang/x/crypto Message Forgery Vulnerability Vulnerability

MODERATE
Advisory Identifier: GHSA-x3jr-pf6g-c48f
CVSS 5.9
CWE-347
Published
Advisory Summary

CVE-2019-11841 is a MODERATE (CVSS 5.9) golang/x/crypto message forgery vulnerability vulnerability (CWE-347: Improper Verification of Cryptographic Signature) affecting Golang.org/x/crypto libraries in the Go ecosystem. The issue involves golang/x/crypto message forgery vulnerability. Remediation is available by upgrading affected packages to version 0.0.0-20190424203555-c05e17bb3b2d.

CVE-2019-11841 at a Glance

CVE Identifier CVE-2019-11841
GHSA Identifier GHSA-x3jr-pf6g-c48f
Severity MODERATE
CVSS v3.1 Base Score 5.9
CWE Classification CWE-347: Improper Verification of Cryptographic Signature
Affected Product Golang.org/x/crypto
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 5.9

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2019-11841

To remediate this vulnerability, upgrade all affected Golang.org/x/crypto dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

golang.org/x/crypto fixed: 0.0.0-20190424203555-c05e17bb3b2d
Upgrade golang.org/x/crypto to 0.0.0-20190424203555-c05e17bb3b2d
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for golang.org/x/crypto

How to Check if You Are Affected

To determine whether your application is affected by CVE-2019-11841, inspect your project dependencies for Golang.org/x/crypto:

inspect dependencies for golang.org/x/crypto

Analyze the terminal output to locate any version of Golang.org/x/crypto in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.0.0-20190424203555-c05e17bb3b2d), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-347: Improper Verification of Cryptographic Signature, where the product does not verify, or incorrectly verifies, the cryptographic signature for data. In Golang.org/x/crypto, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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.

CVE-2019-11841 Affected Golang.org/x/crypto Versions

1 component(s)
Fixed Versions:
0.0.0-20190424203555-c05e17bb3b2d
Product / Package Ecosystem Affected Versions Fixed Version
golang.org/x/crypto
Go
< 0.0.0-20190424203555-c05e17bb3b2d
0.0.0-20190424203555-c05e17bb3b2d

References

Frequently Asked Questions

What is CVE-2019-11841?
CVE-2019-11841 is a security vulnerability in Golang.org/x/crypto involving Golang/x/crypto message forgery vulnerability under CWE-347: Improper Verification of Cryptographic Signature.
Which Golang.org/x/crypto versions are affected?
Affected versions include releases prior to 0.0.0-20190424203555-c05e17bb3b2d across affected packages: golang.org/x/crypto.
What version fixes CVE-2019-11841?
Upgrading to 0.0.0-20190424203555-c05e17bb3b2d (or the latest patched release for your respective branch) resolves the vulnerability.
Is golang.org/x/crypto affected?
Yes, golang.org/x/crypto is affected in releases prior to 0.0.0-20190424203555-c05e17bb3b2d. Upgrade your dependency to 0.0.0-20190424203555-c05e17bb3b2d or later.
What is the CVSS score of CVE-2019-11841?
CVE-2019-11841 has a CVSS v3.1 base score of 5.9 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N.
What CWE is associated with CVE-2019-11841?
CVE-2019-11841 is classified under CWE-347: Improper Verification of Cryptographic Signature (The product does not verify, or incorrectly verifies, the cryptographic signature for data.).
How can I check Go dependencies for CVE-2019-11841?
Run the dependency tree command: 'inspect dependencies for golang.org/x/crypto'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-x3jr-pf6g-c48f",
  "modified" : "2023-10-02T15:42:07Z",
  "published" : "2022-05-24T16:46:15Z",
  "aliases" : [ "CVE-2019-11841" ],
  "summary" : "Golang/x/crypto message forgery vulnerability",
  "details" : "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.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "golang.org/x/crypto"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.0.0-20190424203555-c05e17bb3b2d"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2019-11841"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/golang/crypto/commit/c05e17bb3b2dca130fc919668a96b4bec9eb9442"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/golang/crypto/tree/master/openpgp/clearsign"
  }, {
    "type" : "WEB",
    "url" : "https://go-review.git.corp.google.com/c/crypto/+/173778"
  }, {
    "type" : "WEB",
    "url" : "https://go.googlesource.com/crypto/+/c05e17bb3b2dca130fc919668a96b4bec9eb9442"
  }, {
    "type" : "WEB",
    "url" : "https://groups.google.com/d/msg/golang-openpgp/6vdgZoTgbIY/K6bBY9z3DAAJ"
  }, {
    "type" : "WEB",
    "url" : "https://lists.debian.org/debian-lts-announce/2019/09/msg00011.html"
  }, {
    "type" : "WEB",
    "url" : "https://lists.debian.org/debian-lts-announce/2020/10/msg00014.html"
  }, {
    "type" : "WEB",
    "url" : "https://lists.debian.org/debian-lts-announce/2023/06/msg00017.html"
  }, {
    "type" : "WEB",
    "url" : "https://pkg.go.dev/vuln/GO-2023-1992"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20201207161832/https://sec-consult.com/en/blog/advisories/cleartext-message-spoofing-in-go-cryptography-libraries-cve-2019-11841"
  }, {
    "type" : "WEB",
    "url" : "http://packetstormsecurity.com/files/152840/Go-Cryptography-Libraries-Cleartext-Message-Spoofing.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-347" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-08-01T23:32:27Z",
    "nvd_published_at" : "2019-05-22T17:29:00Z"
  }
}