Security Resilience

CVE-2026-24400

XXE in Assertj 1.4.0 – 3.27.7

Published
26 January 2026
Modified
09 March 2026
Patch / advisory
CVSS Score v4 8.2
Click a component to see what it means
Raw vectorCVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:L/SC:H/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
EPSS Score 0.0076 51th percentile
Risk Priority 34 floored blend · peak EPSS

CVSS and EPSS are reproduced from their sources (NVD, FIRST EPSS). EPSS, Forum of Incident Response and Security Teams (FIRST), epss.first.org. Risk Priority is our own derived reading, not an NVD score.

Summary

CVE-2026-24400 is a high-severity Improper Restriction of XML External Entity Reference (CWE-611) vulnerability in Assertj. Its CVSS base score is 8.2 (High).

Operationally, exploitation aligns with the MITRE ATT&CK technique Exploit Public-Facing Application (T1190); ranked in the top 49% of CVEs by exploit likelihood; it is not currently listed in the CISA KEV catalog.

The strongest mitigations our analysis identified map to CM-6 (Configuration Settings) and SA-11 (Developer Testing and Evaluation) — see the control section below for these in your framework.

Deeper analysis AI-assisted summary

Synthesised by an AI model from the NVD description and linked references — a reading aid, not an authoritative source.

CVE-2026-24400 is an XML External Entity (XXE) vulnerability in AssertJ, a fluent testing assertions library for Java and the Java Virtual Machine (JVM). It affects versions starting from 1.4.0 up to but not including 3.27.7, specifically in the `org.assertj.core.util.xml.XmlStringPrettyFormatter` class. The vulnerable `toXmlDocument(String)` method initializes `DocumentBuilderFactory` with default settings that do not disable Document Type Definitions (DTDs) or external entities. This issue is triggered when applications process untrusted XML input using either the `isXmlEqualTo(CharSequence)` assertion from `org.assertj.core.api.AbstractCharSequenceAssert` or the `xmlPrettyFormat(String)` method from `XmlStringPrettyFormatter`. The `isXmlEqualTo` method has been deprecated since version 3.18.0 in favor of XMLUnit and is scheduled for removal in version 4.0.

The vulnerability carries a CVSS v3.1 base score of 9.1 (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H), indicating high severity due to network accessibility with low complexity and no privileges required. Remote attackers can exploit it by supplying malicious XML payloads to affected methods in vulnerable applications. Successful exploitation enables reading arbitrary local files via `file://` URIs (such as `/etc/passwd` or configuration files), performing Server-Side Request Forgery (SSRF) attacks via HTTP/HTTPS URIs, or causing denial of service through entity expansion attacks like "Billion Laughs."

Advisories recommend mitigating by replacing `isXmlEqualTo(CharSequence)` with XMLUnit (preferred), upgrading to AssertJ version 3.27.7, or avoiding these methods with untrusted input. The `XmlStringPrettyFormatter` is deprecated in 3.27.7 and removed in 4.0, as it was primarily a utility for the deprecated assertion. Relevant resources include the GitHub security advisory (GHSA-rqfh-9r24-8c9r), the fixing commit (85ca7eb6609bb179c043b85ae7d290523b1ba79a), and the 3.27.7 release notes, along with the OWASP XML External Entity Prevention Cheat Sheet.

OWASP Top 10 for Web (2025)

EU & UK References

Vulnerability Data

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…

more

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.

CWE(s)

Related Threats

MITRE ATT&CK Enterprise Techniques

MITRE ATT&CK v20.0

T1190 Exploit Public-Facing Application Initial Access
Adversaries may attempt to exploit a weakness in an Internet-facing host or system to initially access a network.
T1499 Endpoint Denial of Service Impact
Adversaries may perform Endpoint Denial of Service (DoS) attacks to degrade or block the availability of services to users.
T1499.004 Application or System Exploitation Impact
Adversaries may exploit software vulnerabilities that can cause an application or system to crash and deny availability to users.
T1005 Data from Local System Collection
Adversaries may search local system sources, such as file systems, configuration files, local databases, virtual machine files, or process memory, to find files of interest and sensitive data prior to Exfiltration.
T1046 Network Service Discovery Discovery
Adversaries may attempt to get a listing of services running on remote hosts and local network infrastructure devices, including those that may be vulnerable to remote software exploitation.
T1189 Drive-by Compromise Initial Access
Adversaries may gain access to a system through a user visiting a website over the normal course of browsing.
Derived from this CVE’s CWE(s) via the direct CWE→ATT&CK cross-walk.

CVEs Like This One

CVE-2024-40896Shared CWE-611
CVE-2026-16626Shared CWE-611
CVE-2026-40991Shared CWE-611
CVE-2026-131299Shared CWE-611
CVE-2026-1567Shared CWE-611
CVE-2025-4044Shared CWE-611
CVE-2026-54079Shared CWE-611
CVE-2026-125883Shared CWE-611
CVE-2023-26999Shared CWE-611
CVE-2024-25971Shared CWE-611

Affected Assets

assertj
assertj
1.4.0 — 3.27.7

Mitigating Controls

Control response

Prevent
Stop it (NIST 800-53)

—

Detect
Catch it (NIST detect / respond)

—

Harden
Shrink the surface (DISA STIG)

—

Validate
Prove the fix (OWASP ASVS)
  • V1.5.1
  • V15.3.2

Mitigating Controls (NIST 800-53 r5)

Our mappings, made for this CVE.

Secure configuration settings can disable external entity processing in XML parsers.

Developer testing can discover XXE flaws through targeted XML parsing tests.

Input validation can reject or sanitize XML containing external entity references.

Mitigating Controls (NIST CSF 2.0)

Our mappings, derived directly from the weakness types (CWEs) cited in the NVD entry via our CWE→CSF cross-walk — links open the control.

PR.PS-01 mostly match
blocks

Hardened XML parser configurations directly disable external entity resolution.

PR.PS-06 mostly match
blocks

Secure SDLC practices include input validation and safe XML parser configuration that prevent XXE.

ID.RA-01 partial match
blocks

Vulnerability scanning can discover XXE flaws but does not prevent their introduction in code.

PR.PS-02 partial match
blocks

Patching eliminates XXE-vulnerable parser versions but is only one aspect of software maintenance.

Mitigating Controls (ISO/IEC 27001:2022 Annex A)

Our mappings, derived directly from the weakness types (CWEs) cited in the NVD entry via our CWE→ISO cross-walk — links open the control.

finds

Security testing in development catches XXE via static analysis and dynamic XML fuzzing.

prevents

Training developers about secure XML parsing practices (disabling external entity resolution, using safe parser configurations) reduces some instances of XXE, but the weakness is a specific implementation defect that requires technical knowledge to avoid, and developers remain fallible; the strongest control for this weakness is A.8.29 security testing, not training.

blocks

Network segregation with egress filtering at domain gateways can block the outbound HTTP/HTTPS requests that XXE makes to external servers (one exploitation path), but it does not block local file disclosure via file:// URIs, internal-network requests, or DoS via resource consumption — the weakness remains exploitable through those paths, so only a portion of exploitation is stopped.

prevents

Secure coding standards require disabling DTDs and external entities in XML processing.

prevents

A.8.30 carries its effect through the secure-development practices its contract requires of the supplier (8.25 to 8.29), so it reduces ordinary software implementation weaknesses like XXE in delivered code the way those practices do, at `partial` -- the same reasoning the owner applied to A.8.30 vs CWE-134 (format string).

finds

REACH: a disclosure-reach control sees only instances that carry a vendor-published flaw, so `finds` is at most `partial` (rule, 2026-10-17).

References