# CVE-2026-24400: AssertJ has XML External Entity (XXE) vulnerability when parsing untrusted XML via isXmlEqualTo assertion

- Severity: High 8.2 (CVSS:4.0, scored by GitHub_M) `CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:L/SC:H/SI:N/SA:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.57%, higher than 48% of CVEs (2026-12-01)
- Published: 2026-01-26T21:31:41.000Z
- Modified: 2026-06-17T10:23:00.570Z
- Also known as: GHSA-rqfh-9r24-8c9r
- Weaknesses: CWE-611
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

AssertJ provides Fluent testing assertions for Java and the Java Virtual Machine (JVM). Starting in version 1.4.0 and prior to version 3.27.7, an XML External Entity (XXE) vulnerability exists in `org.assertj.core.util.xml.XmlStringPrettyFormatter`: the `toXmlDocument(String)` method initializes `DocumentBuilderFactory` with default settings, without disabling DTDs or external entities. This formatter is used by the `isXmlEqualTo(CharSequence)` assertion for `CharSequence` values. An application is vulnerable only when it uses untrusted XML input with either `isXmlEqualTo(CharSequence)` from `org.assertj.core.api.AbstractCharSequenceAssert` or `xmlPrettyFormat(String)` from `org.assertj.core.util.xml.XmlStringPrettyFormatter`. If untrusted XML input is processed by tone of these methods, an attacker couldnread arbitrary local files via `file://` URIs (e.g., `/etc/passwd`, application configuration files); perform Server-Side Request Forgery (SSRF) via HTTP/HTTPS URIs, and/or cause Denial of Service via "Billion Laughs" entity expansion attacks. `isXmlEqualTo(CharSequence)` has been deprecated in favor of XMLUnit in version 3.18.0 and will be removed in version 4.0. Users of affected versions should, in order of preference: replace `isXmlEqualTo(CharSequence)` with XMLUnit, upgrade to version 3.27.7, or avoid using `isXmlEqualTo(CharSequence)` or `XmlStringPrettyFormatter` with untrusted input. `XmlStringPrettyFormatter` has historically been considered a utility for `isXmlEqualTo(CharSequence)` rather than a feature for AssertJ users, so it is deprecated in version 3.27.7 and removed in version 4.0, with no replacement.

(As written by CVE List.)

## Affected

- assertj assertj: >= 1.4.0, < 3.27.7; from 1.4.0 before 3.27.7
- org.assertj:assertj-core (Maven): from 1.4.0 before 3.27.7

## Every score

- GitHub_M: CVSS:4.0 8.2 High `CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:L/SC:H/SI:N/SA:N`
- GitHub: CVSS:4.0 High `CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:L/SC:H/SI:N/SA:N`
- NVD: CVSS:3.1 9.1 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H`

## References

- <https://github.com/assertj/assertj/security/advisories/GHSA-rqfh-9r24-8c9r> (mitigation, vendor-advisory, web)
- <https://github.com/assertj/assertj/commit/85ca7eb6609bb179c043b85ae7d290523b1ba79a> (patch, web)
- <https://cheatsheetseries.owasp.org/cheatsheets/XML_External_Entity_Prevention_Cheat_Sheet.html> (technical-description, web)
- <https://github.com/assertj/assertj/releases/tag/assertj-build-3.27.7> (product, release-notes, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-24400> (advisory)
- <https://github.com/assertj/assertj> (package)

## Sources

- CVE List: [CVE-2026-24400](https://www.cve.org/CVERecord?id=CVE-2026-24400), CVE Terms of Use, modified 2026-01-27
- GitHub Advisory Database: [GHSA-rqfh-9r24-8c9r](https://github.com/advisories/GHSA-rqfh-9r24-8c9r), CC-BY-4.0, modified 2026-02-03
- NVD: [CVE-2026-24400](https://nvd.nist.gov/vuln/detail/CVE-2026-24400), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2026-24400 · Whole record: https://cve.day/CVE-2026-24400.json · Rebuilt by cve.day 2026-11-25T22:59:13.200Z
