Loading...
Skip to main content

CVE-2024-52596 — Vulnerability in simplesamlphp/xml-common — CVE...

HIGH

SimpleSAMLphp xml-common XXE vulnerability

Published December 2, 2024Updated December 12, 2024Source: osv

Summary

Summary When loading an (untrusted) XML document, for example the SAMLResponse, it's possible to induce an XXE. $options is defined as: https://github.com/simplesamlphp/xml-common/blob/v1.19.0/src/DOMDocumentFactory.php#L39 including the DTDLoad option, which allows an attacker to read file contents from local file system OR internal network. While there is the NONET option, an attacker can simply bypass if by using PHP filters: php://filter/convert.base64-encode/resource=http://URL OR FILE From there an attacker can induce network connections and steal the targeted file OOB (haven't fully tested this). RCE may be possible with the php://expect or php://phar wrappers, but this hasn't been tested. Note: The mitigation here: https://github.com/simplesamlphp/xml-common/blob/v1.19.0/src/DOMDocumentFactory.php#L58 Comes too late, as the XML has already been loaded into a document. Mitigation: Remove the LIBXML_DTDLOAD | LIBXML_DTDATTR options. Additionally, as a defense in depth measure, check if there is the string: <!DOCTYPE inside the XML before parsing it. (This is not a complete fix because someone may be able to exploit some parser differentials, to load a DOCTYPE, maybe through spacing like: <! DOCTYPE)

Advisory Timeline

  • First published December 2, 2024 (679 days ago).
  • Last revised December 12, 2024 — 10 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Composer
Update simplesamlphp/xml-common to 1.20.0 or later
composer require "simplesamlphp/xml-common:^1.20.0"

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (1)

Affects 1 ecosystem: packagist (1).

PackageEcosystemAffectedFixed In
simplesamlphp/xml-common
packagist
0.8.11, 0.8.12, v0.1.0, v0.1.1 (+118 more)1.20.0

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

  • CWE-611
    XML External Entity (XXE)MITRE

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 10.0 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
—
Confidentiality
—
Integrity
—
Availability
—

CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:H/SC:L/SI:L/SA:N

Frequently Asked Questions

What is CVE-2024-52596?
SimpleSAMLphp xml-common XXE vulnerability This vulnerability has been assigned a severity rating of HIGH (CVSS score: 10.0/10).
How do I check if my project is affected by CVE-2024-52596?
CVE-2024-52596 affects simplesamlphp/xml-common. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2024-52596 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
10.0

Exploitation is straightforward and causes maximum impact. Patch immediately.

Also Known As

GHSA-2x65-fpch-2fcm

Related CVEs

  • CVE-2026-65954
    HIGH

    PHPCSUtils: Remote code execution via eval() in AbstractArrayDeclarationSniff::getActualArrayKey()

  • CVE-2026-61825
    HIGH

    code16/sharp has a stored XSS via data-html-content Sanitizer Bypass

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies