8.8high
SimpleSAMLphp xml-common XXE vulnerability
- Severity
- 8.8high CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.98% (higher than 63% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-2x65-fpch-2fcm
Description
SimpleSAMLphp xml-common is a common classes for handling XML-structures. When loading an (untrusted) XML document, for example the SAMLResponse, it's possible to induce an XXE. This vulnerability is fixed in 1.19.0.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| simplesamlphp xml-common | < 1.20.0, before 1.20.0 | CVE List |
| simplesamlphp/xml-common (Packagist) | before 1.20.0 | GitHub Advisory Database |
All scores
| GitHub_M | 8.8high CVSS:4.0 | 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 |
| GitHub | high CVSS:4.0 | 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 |
Classification
SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.
What each source says
CVE List
SimpleSAMLphp xml-common is a common classes for handling XML-structures. When loading an (untrusted) XML document, for example the SAMLResponse, it's possible to induce an XXE. This vulnerability is fixed in 1.19.0.
GitHub Advisory Database
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)
NVD (es)
SimpleSAMLphp xml-common es una clase común para manejar estructuras XML. Al cargar un documento XML (no confiable), por ejemplo SAMLResponse, es posible inducir un XXE. Esta vulnerabilidad se solucionó en la versión 1.19.0.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2024-52596 changed 2024-12-02 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-2x65-fpch-2fcm changed 2024-12-12 | CC-BY-4.0 |
| NVD | CVE-2024-52596 changed 2026-06-17 | Public domain |