GHSA-j5g2-q29x-cw3h: Simplesamlphp/simplesamlphp SimpleSAMLphp Vulnerable To XXE Vulnerability

HIGH
CVSS 8.3
CWE-611
Published
Advisory Summary

GHSA-j5g2-q29x-cw3h is a HIGH (CVSS 8.3) simplesamlphp vulnerable to xxe vulnerability (CWE-611: Improper Restriction of XML External Entity Reference) affecting Simplesamlphp/simplesamlphp libraries in the Packagist ecosystem. The issue involves simplesamlphp vulnerable to xxe in parsing saml messages. Remediation is available by upgrading affected packages to version 2.3.4, 2.2.4, 2.1.7, 2.0.15.

GHSA-j5g2-q29x-cw3h at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-j5g2-q29x-cw3h
Severity HIGH
CVSS v3.1 Base Score 8.3
CWE Classification CWE-611: Improper Restriction of XML External Entity Reference
Affected Product Simplesamlphp/simplesamlphp
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 8.3

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:C/C:L/I:L/A:L).

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

How to Fix GHSA-j5g2-q29x-cw3h

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

simplesamlphp/simplesamlphp fixed: 2.3.4
Upgrade simplesamlphp/simplesamlphp to 2.3.4
simplesamlphp/simplesamlphp fixed: 2.2.4
Upgrade simplesamlphp/simplesamlphp to 2.2.4
simplesamlphp/simplesamlphp fixed: 2.1.7
Upgrade simplesamlphp/simplesamlphp to 2.1.7
simplesamlphp/simplesamlphp fixed: 2.0.15
Upgrade simplesamlphp/simplesamlphp to 2.0.15
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 simplesamlphp/simplesamlphp

How to Check if You Are Affected

To determine whether your application is affected by GHSA-j5g2-q29x-cw3h, inspect your project dependencies for Simplesamlphp/simplesamlphp:

inspect dependencies for simplesamlphp/simplesamlphp

Analyze the terminal output to locate any version of Simplesamlphp/simplesamlphp in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.3.4), 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-611: Improper Restriction of XML External Entity Reference, where the product processes an xml document that can contain xml entities with uris that resolve to documents outside of the intended sphere of control, causing the product to embed incorrect documents into its output. In Simplesamlphp/simplesamlphp, 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

## Withdrawn Advisory This advisory has been withdrawn because the vulnerability affects users of the SimpleSAMLphp tarball, not the SimpleSAMLphp Composer package. The underlying information about CVE-2024-52596 is still valid. ## Original Description # Summary When loading an (untrusted) XML document, for example the SAMLResponse, it's possible to induce an XXE. ## Mitigation: Remove the `LIBXML_DTDLOAD | LIBXML_DTDATTR` options from `$options` is in: https://github.com/simplesamlphp/saml2/blob/717c0adc4877ebd58428637e5626345e59fa0109/src/SAML2/DOMDocumentFactory.php#L41 ## Background / details To be published on Dec 8th

GHSA-j5g2-q29x-cw3h Affected Simplesamlphp/simplesamlphp Versions

4 component(s)
Fixed Versions:
2.3.42.2.42.1.72.0.15
Product / Package Ecosystem Affected Versions Fixed Version
simplesamlphp/simplesamlphp
Packagist
≥ 2.3.0
< 2.3.4
2.3.4
simplesamlphp/simplesamlphp
Packagist
≥ 2.2.0
< 2.2.4
2.2.4
simplesamlphp/simplesamlphp
Packagist
≥ 2.1.0
< 2.1.7
2.1.7
simplesamlphp/simplesamlphp
Packagist
< 2.0.15
2.0.15

References

Frequently Asked Questions

What is GHSA-j5g2-q29x-cw3h?
GHSA-j5g2-q29x-cw3h is a security vulnerability in Simplesamlphp/simplesamlphp involving SimpleSAMLphp vulnerable to XXE in parsing SAML messages under CWE-611: Improper Restriction of XML External Entity Reference.
Which Simplesamlphp/simplesamlphp versions are affected?
Affected versions include releases prior to 2.3.4, 2.2.4, 2.1.7, 2.0.15 across affected packages: simplesamlphp/simplesamlphp.
What version fixes GHSA-j5g2-q29x-cw3h?
Upgrading to 2.3.4, 2.2.4, 2.1.7, 2.0.15 (or the latest patched release for your respective branch) resolves the vulnerability.
Is simplesamlphp/simplesamlphp affected?
Yes, simplesamlphp/simplesamlphp is affected in releases prior to 2.3.4, 2.2.4, 2.1.7, 2.0.15. Upgrade your dependency to 2.3.4, 2.2.4, 2.1.7, 2.0.15 or later.
What is the CVSS score of GHSA-j5g2-q29x-cw3h?
GHSA-j5g2-q29x-cw3h has a CVSS v3.1 base score of 8.3 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:L.
What CWE is associated with GHSA-j5g2-q29x-cw3h?
GHSA-j5g2-q29x-cw3h is classified under CWE-611: Improper Restriction of XML External Entity Reference (The product processes an XML document that can contain XML entities with URIs that resolve to documents outside of the intended sphere of control, causing the product to embed incorrect documents into its output.).
How can I check Packagist dependencies for GHSA-j5g2-q29x-cw3h?
Run the dependency tree command: 'inspect dependencies for simplesamlphp/simplesamlphp'. 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-j5g2-q29x-cw3h",
  "modified" : "2024-12-04T16:13:50Z",
  "published" : "2024-12-02T20:00:29Z",
  "withdrawn" : "2024-12-04T16:13:50Z",
  "aliases" : [ ],
  "summary" : "SimpleSAMLphp vulnerable to XXE in parsing SAML messages",
  "details" : "## Withdrawn Advisory\nThis advisory has been withdrawn because the vulnerability affects users of the SimpleSAMLphp tarball, not the SimpleSAMLphp Composer package. The underlying information about CVE-2024-52596 is still valid.\n\n## Original Description\n\n# Summary\nWhen loading an (untrusted) XML document, for example the SAMLResponse, it's possible to induce an XXE.\n\n## Mitigation:\n\nRemove the `LIBXML_DTDLOAD | LIBXML_DTDATTR` options from `$options` is in: https://github.com/simplesamlphp/saml2/blob/717c0adc4877ebd58428637e5626345e59fa0109/src/SAML2/DOMDocumentFactory.php#L41\n\n## Background / details\n\nTo be published on Dec 8th",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "simplesamlphp/simplesamlphp"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.3.0"
      }, {
        "fixed" : "2.3.4"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "simplesamlphp/simplesamlphp"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.2.0"
      }, {
        "fixed" : "2.2.4"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "simplesamlphp/simplesamlphp"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.1.0"
      }, {
        "fixed" : "2.1.7"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "simplesamlphp/simplesamlphp"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.0.15"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/simplesamlphp/simplesamlphp/security/advisories/GHSA-j5g2-q29x-cw3h"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/simplesamlphp/xml-common/security/advisories/GHSA-2x65-fpch-2fcm"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-52596"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/simplesamlphp/simplesamlphp"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-611" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-12-02T20:00:29Z",
    "nvd_published_at" : null
  }
}