Vulnerability · Published Jan 26, 2026 · Assigned by GitHub_M
CVE-2026-24400AssertJ has XML External Entity (XXE) vulnerability when parsing untrusted XML via isXmlEqualTo assertion
High 8.2
In plain English
A high-severity XML external entity in assertj from assertj. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.6% (higher than 47% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| AlmaLinux:10 | assertj-core | 3.24.2-9.el10_2.1 | ALSA-2026:59372 |
| AlmaLinux:9 | assertj-core | 3.19.0-9.el9_8.1 | ALSA-2026:60215 |
| AlmaLinux:10 | assertj-core-javadoc | 3.24.2-9.el10_2.1 | ALSA-2026:59372 |
| Debian:12 | assertj-core | no fix listed | DEBIAN-CVE-2026-24400 |
| Debian:13 | assertj-core | no fix listed | DEBIAN-CVE-2026-24400 |
| Debian:14 | assertj-core | no fix listed | DEBIAN-CVE-2026-24400 |
| Maven | org.assertj:assertj-core | 3.27.7 | GHSA-rqfh-9r24-8c9r |
| Rocky Linux:10 | assertj-core | 0:3.24.2-9.el10_2.1 | RLSA-2026:59372 |
| Rocky Linux:9 | assertj-core | 0:3.19.0-9.el9_8.1 | RLSA-2026:60215 |
| Ubuntu:22.04:LTS | assertj-core | no fix listed | UBUNTU-CVE-2026-24400 |
| Ubuntu:24.04:LTS | assertj-core | no fix listed | UBUNTU-CVE-2026-24400 |
| Ubuntu:25.10 | assertj-core | no fix listed | UBUNTU-CVE-2026-24400 |
| Ubuntu:26.04:LTS | assertj-core | no fix listed | UBUNTU-CVE-2026-24400 |
| Ubuntu:26.10 | assertj-core | no fix listed | UBUNTU-CVE-2026-24400 |
Affected products (as reported)
Weakness: CWE-611 · Vector: 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
References
- https://github.com/assertj/assertj/security/advisories/GHSA-rqfh-9r24-8c9r x_refsource_CONFIRM
- https://github.com/assertj/assertj/commit/85ca7eb6609bb179c043b85ae7d290523b1ba79a x_refsource_MISC
- https://cheatsheetseries.owasp.org/cheatsheets/XML_External_Entity_Prevention_Cheat_Sheet.html x_refsource_MISC
- https://github.com/assertj/assertj/releases/tag/assertj-build-3.27.7 x_refsource_MISC