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

> Attackers can read local files, cause SSRF, or trigger DoS via XXE in AssertJ's XML assertions when processing untrusted input.

- **Severity:** High 8.2 (`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`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 26 Jan 2026
- **Updated:** 27 Jan 2026
- **Also known as:** ALSA-2026:59372, ALSA-2026:60215, AZL-75431, CLSA-2026-1783558957, CLSA-2026-1783904622, CLSA-2026-1783991040, CLSA-2026-1784077508, CLSA-2026-1784682842, CLSA-2026-1784682843, CLSA-2026-1784682933, CLSA-2026-1785727930, CLSA-2026-1788370561, CLSA-2026-1788881384, CLSA-2026-1793128109, DEBIAN-CVE-2026-24400, GHSA-rqfh-9r24-8c9r, RHLW-2026-04395e330cc28cb3, RHLW-2026-06c890c70b401b52, RHLW-2026-0a09f6ecf7835ea0, RHLW-2026-125c08589a792d0c, RHLW-2026-1dfa725faa28bd98, RHLW-2026-2f00b906a72c7d80, RHLW-2026-3c10659b7340e612, RHLW-2026-3f93bdcc94a21f2e, RHLW-2026-44bcd6e79804e6f9, RHLW-2026-4688fa8056bb5eb0, RHLW-2026-4b923e6a0c9408d7, RHLW-2026-5c040610f497341f, RHLW-2026-621a8fc2f80d3756, RHLW-2026-68f6300fe5cddf04, RHLW-2026-69e0a9b52c08198f, RHLW-2026-6aaf368527c42953, RHLW-2026-75db1a29fed8473f, RHLW-2026-8213cb2f9fa5e4f3, RHLW-2026-8e630efedd4a966b, RHLW-2026-8ee8407887122c89, RHLW-2026-91aedc27b0276f09, RHLW-2026-9eb6b9377232bc55, RHLW-2026-a5a3e82a382ab25b, RHLW-2026-a8f2feb806a7ec11, RHLW-2026-afaba61eb7f2850c, RHLW-2026-afdab2228d9d349b, RHLW-2026-b2c0ee9cf7434158, RHLW-2026-b7941f01d48eb65e, RHLW-2026-beb8398e1777d04e, RHLW-2026-bfccea342dd4b844, RHLW-2026-c0819a53dd258db2, RHLW-2026-c47eb74b897b797c, RHLW-2026-c53452d5f25a2707, RHLW-2026-ced7f507fae93c0b, RHLW-2026-d0894948a3363188, RHLW-2026-d16850b6ed26ed8a, RHLW-2026-d8b82278a734aa57, RHLW-2026-e6ec7dddaa32b002, RHLW-2026-e9a6a9ae2da7f754, RHLW-2026-edfb54be5079ebb7, RHLW-2026-edffb5d3bb599ff9, RHLW-2026-f06e820781099ad6, RHLW-2026-f4501c345c2f2e8b, RHLW-2026-f5cfa6309ad4f62e, RHSA-2026:58949, RHSA-2026:58956, RHSA-2026:58957, RHSA-2026:59372, RHSA-2026:60215, RHSA-2026:69106, RLSA-2026:59372, RLSA-2026:60215, ROOT-APP-MAVEN-CVE-2026-24400, SUSE-SU-2026:0344-1, SUSE-SU-2026:20604-1, UBUNTU-CVE-2026-24400, openSUSE-SU-2026:10106-1, openSUSE-SU-2026:20298-1

## What is CVE-2026-24400?

CVE-2026-24400 is a high-severity vulnerability in assertj, published on 26 Jan 2026. It can only be exploited from the same machine or local network, with no action from the victim.

### 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.

Weakness: CWE-611 (Improper Restriction of XML External Entity Reference)

## Which versions are affected by CVE-2026-24400?

2 open source packages ship an affected version, including org.assertj:assertj-core. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.assertj:assertj-core` | Maven | From 1.4.0 | 3.27.7 |
| `org.assertj:assertj-core` | Maven | From 1.4.0 | 3.27.7 |
| `assertj-core` | AlmaLinux:10 | All versions | 3.24.2-9.el10_2.1 |
| `assertj-core-javadoc` | AlmaLinux:10 | All versions | 3.24.2-9.el10_2.1 |
| `assertj-core` | AlmaLinux:9 | All versions | 3.19.0-9.el9_8.1 |
| `assertj-core` | Red Hat:enterprise_linux:10.2 | All versions | 0:3.24.2-9.el10_2.1 |
| `assertj-core-javadoc` | Red Hat:enterprise_linux:10.2 | All versions | 0:3.24.2-9.el10_2.1 |
| `assertj-core` | Red Hat:enterprise_linux:9::appstream | All versions | 0:3.19.0-9.el9_8.1 |
| `assertj-core` | Red Hat:enterprise_linux_eus:10.0 | All versions | 0:3.24.2-9.el10_0.1 |
| `assertj-core-javadoc` | Red Hat:enterprise_linux_eus:10.0 | All versions | 0:3.24.2-9.el10_0.1 |
| `assertj-core` | Red Hat:rhel_e4s:9.2::appstream | All versions | 0:3.19.0-5.el9_2.2 |
| `assertj-core` | Red Hat:rhel_e4s:9.4::appstream | All versions | 0:3.19.0-5.el9_4.2 |
| `assertj-core` | Red Hat:rhel_eus:9.6::appstream | All versions | 0:3.19.0-9.el9_6.1 |
| `assertj-core` | Rocky Linux:10 | All versions | 0:3.24.2-9.el10_2.1 |
| `assertj-core` | Rocky Linux:9 | All versions | 0:3.19.0-9.el9_8.1 |
| `assertj-core` | SUSE:Linux Enterprise Server 16.0 | All versions | 3.27.7-160000.1.1 |
| `assertj-core` | SUSE:Linux Enterprise Server for SAP applications 16.0 | All versions | 3.27.7-160000.1.1 |
| `assertj-core` | openSUSE:Leap 15.6 | All versions | 3.27.7-150200.5.9.2 |
| `assertj-core` | openSUSE:Leap 16.0 | All versions | 3.27.7-160000.1.1 |
| `assertj-core` | openSUSE:Tumbleweed | All versions | 3.27.7-1.1 |

Products: Assertj Assertj.

## How do I fix CVE-2026-24400?

Upgrade org.assertj:assertj-core to 3.27.7 or later.

## Is CVE-2026-24400 being exploited?

There is no known exploitation of CVE-2026-24400 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-24400 and fix it if it is affected.

What it is: CVE-2026-24400 is a high-severity vulnerability in assertj, published on 26 Jan 2026. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-24400 in the wild and no public exploit code.

Affected packages and fixed versions:
- org.assertj:assertj-core (Maven): affected from 1.4.0; fixed in 3.27.7
- org.assertj:assertj-core (Maven): affected from 1.4.0; fixed in 3.27.7

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-24400/ (Markdown: https://insights.sbomify.com/CVE-2026-24400/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-24400
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-24400
- OSV: https://osv.dev/vulnerability/CVE-2026-24400

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-24400/
Summaries are generated and may contain mistakes; the official description above is the record.
