Vulnerabilities in pkg:golang/github.com/crewjam/saml

PACKAGE
Advisory Identifier: GHSA-4hq8-gmxx-h6w9
Advisory Summary

CVE-2020-27846 is a CRITICAL (CVSS 9.8) xml processing error vulnerability (CWE-287: Improper Authentication) affecting Github.com/crewjam/saml libraries in the Go ecosystem. The issue involves xml processing error in github.com/crewjam/saml. Remediation is available by upgrading affected packages to version 0.4.3.

4 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:golang/github.com/crewjam/saml

4 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:golang/github.com/crewjam/saml. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-4hq8-gmxx-h6w9 CVE-2020-27846 CRITICAL XML Processing error in github.com/crewjam/saml
GHSA-267v-3v32-g6q5 CVE-2023-45683 HIGH Cross-site Scripting via missing Binding syntax validation
GHSA-5mqj-xc49-246p CVE-2023-28119 HIGH crewjam/saml vulnerable to Denial Of Service Via Deflate Decompression Bomb
GHSA-j2jp-wvqg-wc2g CVE-2022-41912 CRITICAL crewjam/saml vulnerable to signature bypass via multiple Assertion elements due to improper authentication

CVE-2020-27846 at a Glance

CVE Identifier CVE-2020-27846
GHSA Identifier GHSA-4hq8-gmxx-h6w9
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-287: Improper Authentication
Affected Product Github.com/crewjam/saml
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 9.8

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

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

How to Fix CVE-2020-27846

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

github.com/crewjam/saml fixed: 0.4.3
Upgrade github.com/crewjam/saml to 0.4.3
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 github.com/crewjam/saml

How to Check if You Are Affected

To determine whether your application is affected by CVE-2020-27846, inspect your project dependencies for Github.com/crewjam/saml:

inspect dependencies for github.com/crewjam/saml

Analyze the terminal output to locate any version of Github.com/crewjam/saml in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.4.3), 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-287: Improper Authentication, where when an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct. In Github.com/crewjam/saml, 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

### Impact There are three vulnerabilities in the go `encoding/xml` package that can allow an attacker to forge part of a signed XML document. For details on this vulnerability see [xml-roundtrip-validator](https://github.com/mattermost/xml-roundtrip-validator) ### Patches In version 0.4.3, all XML input is validated prior to being parsed.

CVE-2020-27846 Affected Github.com/crewjam/saml Versions

1 component(s)
Fixed Versions:
0.4.3
Product / Package Ecosystem Affected Versions Fixed Version
github.com/crewjam/saml
Go
< 0.4.3
0.4.3

References

Frequently Asked Questions

What is CVE-2020-27846?
CVE-2020-27846 is a security vulnerability in Github.com/crewjam/saml involving XML Processing error in github.com/crewjam/saml under CWE-287: Improper Authentication.
Which Github.com/crewjam/saml versions are affected?
Affected versions include releases prior to 0.4.3 across affected packages: github.com/crewjam/saml.
What version fixes CVE-2020-27846?
Upgrading to 0.4.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/crewjam/saml affected?
Yes, github.com/crewjam/saml is affected in releases prior to 0.4.3. Upgrade your dependency to 0.4.3 or later.
What is the CVSS score of CVE-2020-27846?
CVE-2020-27846 has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2020-27846?
CVE-2020-27846 is classified under CWE-287: Improper Authentication (When an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct.).
How can I check Go dependencies for CVE-2020-27846?
Run the dependency tree command: 'inspect dependencies for github.com/crewjam/saml'. 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-4hq8-gmxx-h6w9",
  "modified" : "2025-09-19T17:41:50Z",
  "published" : "2021-06-23T17:29:42Z",
  "aliases" : [ "CVE-2020-27846" ],
  "summary" : "XML Processing error in github.com/crewjam/saml",
  "details" : "### Impact\n\nThere are three vulnerabilities in the go `encoding/xml` package that can allow an attacker to forge part of a signed XML document. For details on this vulnerability see [xml-roundtrip-validator](https://github.com/mattermost/xml-roundtrip-validator)\n\n### Patches\n\nIn version 0.4.3, all XML input is validated prior to being parsed.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/crewjam/saml"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.4.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/crewjam/saml/security/advisories/GHSA-4hq8-gmxx-h6w9"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-27846"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/crewjam/saml/commit/da4f1a0612c0a8dd0452cf8b3c7a6518f6b4d053"
  }, {
    "type" : "WEB",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=1907670"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/crewjam/saml"
  }, {
    "type" : "WEB",
    "url" : "https://grafana.com/blog/2020/12/17/grafana-6.7.5-7.2.3-and-7.3.6-released-with-important-security-fix-for-grafana-enterprise"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/3YUTKIRWT6TWU7DS6GF3EOANVQBFQZYI"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ICP3YRY2VUCNCF2VFUSK77ZMRIC77FEM"
  }, {
    "type" : "WEB",
    "url" : "https://mattermost.com/blog/coordinated-disclosure-go-xml-vulnerabilities"
  }, {
    "type" : "WEB",
    "url" : "https://pkg.go.dev/vuln/GO-2021-0058"
  }, {
    "type" : "WEB",
    "url" : "https://security.netapp.com/advisory/ntap-20210205-0002"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-115", "CWE-287" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-05-21T20:54:26Z",
    "nvd_published_at" : null
  }
}