Skip to main content
Mallory
High

XXE in Spring Web Services Jaxp13XPathTemplate

IdentifiersCVE-2026-40998CWE-611· Improper Restriction of XML…

CVE-2026-40998 is an XML External Entity (XXE) vulnerability in Spring Web Services affecting Jaxp13XPathTemplate. When evaluating XPath expressions for StreamSource and SAXSource inputs, the vulnerable code path parses attacker-controlled XML using the JDK's default DocumentBuilderFactory behavior instead of Spring's hardened parser configuration. As a result, applications that perform XPath evaluation on untrusted XML may allow external entity processing. Affected versions are Spring Web Services 5.0.0 through 5.0.1, 4.1.0 through 4.1.3, 4.0.0 through 4.0.18, and 3.1.0 through 3.1.8.

Share:
For your environment

Are you exposed to this one?

Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.

ANALYST BRIEF

Impact, mitigation & remediation

What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation can expose applications to XXE-style attacks, primarily enabling disclosure of sensitive local files and, depending on parser and platform behavior, server-side request forgery via external entity resolution. The published CVSS v3.1 vector (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N) indicates remote exploitation without authentication or user interaction, with high confidentiality impact and limited integrity impact.

Mitigation

If you can’t patch tonight, do this now.

The advisory states that no further mitigation steps are necessary beyond upgrading. Where immediate upgrade is not possible, reduce exposure by ensuring untrusted XML is not passed to Jaxp13XPathTemplate for XPath evaluation via StreamSource or SAXSource and by enforcing hardened XML parser settings that disable external entity resolution and related XXE-prone features in surrounding application code.

Remediation

Patch, then assume compromise.

Upgrade Spring Web Services to a fixed release. Reported fixes are 5.0.2 for OSS users on the 5.0.x line and 4.1.4 for OSS users on the 4.1.x line. Enterprise Support fixes are reported as 5.0.1.1, 4.1.3.1, 4.0.19, and 3.1.9 for the respective supported branches. Versions no longer supported are also affected and should be moved to a supported fixed release where possible.
PUBLIC EXPLOITS

Exploits

No public exploits tracked yet. Mallory keeps watching.

VALID 0 / 0 TOTALView more in app

No public exploit code observed for this vulnerability.

What this page doesn’t show

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, which detections to deploy, and what to do tonight.
Exposure mapping

Query your assets running an affected version, and investigate the blast radius.

Threat actor evidence

Every observed campaign linking this CVE to a named adversary.

Associated malware

Malware families riding this exploit, with evidence and IOCs.

Detection signatures

YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.

Vendor-by-vendor mapping

Cross-references every affected SKU, including bundled OEM variants.

Social activity5

Community discussion across Reddit, Mastodon, and other social sources.