CVE-2023-48703: Github.com/RobotsAndPencils/go saml Authentication Bypass Vulnerability

HIGH
Advisory Identifier: GHSA-6h53-q94j-348w
CVSS 7.5
CWE-287
Published
Advisory Summary

CVE-2023-48703 is a HIGH (CVSS 7.5) authentication bypass vulnerability (CWE-287: Improper Authentication) affecting Github.com/RobotsAndPencils/go saml libraries in the Go ecosystem. The issue involves robotsandpencils go-saml authentication bypass vulnerability. Remediation is available in the latest vendor maintenance releases.

CVE-2023-48703 at a Glance

CVE Identifier CVE-2023-48703
GHSA Identifier GHSA-6h53-q94j-348w
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-287: Improper Authentication
Affected Product Github.com/RobotsAndPencils/go saml
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 7.5

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:N/I:H/A:N).

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 None (C:N)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2023-48703

To remediate this vulnerability, upgrade all affected Github.com/RobotsAndPencils/go 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/RobotsAndPencils/go-saml fixed: Latest secure release
Upgrade github.com/RobotsAndPencils/go-saml to Latest secure release
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/RobotsAndPencils/go-saml

How to Check if You Are Affected

To determine whether your application is affected by CVE-2023-48703, inspect your project dependencies for Github.com/RobotsAndPencils/go saml:

inspect dependencies for github.com/RobotsAndPencils/go-saml

Analyze the terminal output to locate any version of Github.com/RobotsAndPencils/go saml in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), 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/RobotsAndPencils/go 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

RobotsAndPencils go-saml, a SAML client library written in Go, contains an authentication bypass vulnerability in all known versions. This is due to how the `xmlsec1` command line tool is called internally to verify the signature of SAML assertions. When `xmlsec1` is used without defining the enabled key data, the origin of the public key for the signature verification is, unfortunately, not restricted. That means an attacker can sign the SAML assertions themselves and provide the required public key (e.g. an RSA key) directly embedded in the SAML token. Projects still using RobotsAndPencils/go-saml should move to another SAML library or alternatively remove support for SAML from their projects. The vulnerability can likely temporarily be fixed by forking the go-saml project and adding the command line argument `--enabled-key-data` and specifying a value such as `x509` or `raw-x509-cert` when calling the `xmlsec1` binary in the verify function. Please note that this workaround must be carefully tested before it can be used.

CVE-2023-48703 Affected Github.com/RobotsAndPencils/go saml Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
github.com/RobotsAndPencils/go-saml
Go
≤ 0.0.0-20230606195814-29020529affc

References

Frequently Asked Questions

What is CVE-2023-48703?
CVE-2023-48703 is a security vulnerability in Github.com/RobotsAndPencils/go saml involving RobotsAndPencils go-saml authentication bypass vulnerability under CWE-287: Improper Authentication.
Which Github.com/RobotsAndPencils/go saml versions are affected?
Affected versions include releases prior to current release patches across affected packages: github.com/RobotsAndPencils/go-saml.
What version fixes CVE-2023-48703?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/RobotsAndPencils/go-saml affected?
Yes, github.com/RobotsAndPencils/go-saml is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2023-48703?
CVE-2023-48703 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N.
What CWE is associated with CVE-2023-48703?
CVE-2023-48703 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-2023-48703?
Run the dependency tree command: 'inspect dependencies for github.com/RobotsAndPencils/go-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-6h53-q94j-348w",
  "modified" : "2024-08-05T21:29:23Z",
  "published" : "2024-08-05T21:29:23Z",
  "aliases" : [ "CVE-2023-48703" ],
  "summary" : "RobotsAndPencils go-saml authentication bypass vulnerability",
  "details" : "RobotsAndPencils go-saml, a SAML client library written in Go, contains an authentication bypass vulnerability in all known versions. This is due to how the `xmlsec1` command line tool is called internally to verify the signature of SAML assertions. When `xmlsec1` is used without defining the enabled key data, the origin of the public key for the signature verification is, unfortunately, not restricted. That means an attacker can sign the SAML assertions themselves and provide the required public key (e.g. an RSA key) directly embedded in the SAML token. Projects still using RobotsAndPencils/go-saml should move to another SAML library or alternatively remove support for SAML from their projects. The vulnerability can likely temporarily be fixed by forking the go-saml project and adding the command line argument `--enabled-key-data` and specifying a value such as `x509` or `raw-x509-cert` when calling the `xmlsec1` binary in the verify function. Please note that this workaround must be carefully tested before it can be used.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/RobotsAndPencils/go-saml"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "0.0.0-20230606195814-29020529affc"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-48703"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/RobotsAndPencils/go-saml"
  }, {
    "type" : "ADVISORY",
    "url" : "https://securitylab.github.com/advisories/GHSL-2023-121_go-saml__archived_"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-287" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-08-05T21:29:23Z",
    "nvd_published_at" : "2024-03-06T20:15:47Z"
  }
}