WaratekVRT Sign in

CVE-2026-40998 Spring Web Services

Affected softwareSpring Web Services
Severity8.2 High CVSS 3.1
Fixed in5.0.2, 4.1.4
WeaknessXML external entity (XXE) (CWE-611)
Published11 Jun 2026
Updated4 Sep 2026

Description

Jaxp13XPathTemplate evaluated XPath expressions for StreamSource and SAXSource inputs using a code path that parsed attacker-controlled XML with the JDK's default DocumentBuilderFactory behavior instead of Spring's hardened parser configuration. Applications that evaluate XPath against untrusted XML payloads could therefore be exposed to XML External Entity (XXE) style attacks. Affected versions: Spring Web Services 5.0.0 through 5.0.1; 4.1.0 through 4.1.3; 4.0.0 through 4.0.18; 3.1.0 through 3.1.8.

Exploitation status

No public exploit

No exploit has been reported in the sources we check.

  • CISA KEV not listed
  • VulnCheck KEV not listed
  • CISA Vulnrichment exploitation: none
  • Indexed PoC none indexed
  • EPSS 0.35% chance in 30 days

Waratek protection

Protected by Waratek

Waratek has a rule that blocks attacks on this vulnerability.

  • Protection full XXE
  • Action available security rule
  • Review automated Inferred
  • Record active
Decided by A vulnerability class already blocked by an ARMR security rule
Finding Protected by Waratek's ARMR xxe security rule, which blocks this class of attack at the JVM level without a rule written for this CVE specifically. The CVE's weakness is CWE-611: XML External Entity Reference.

How to mitigate CVE-2026-40998

Upgrade Spring Web Services to a release that fixes it: 5.0.2 or 4.1.4. Until you can, Waratek RASP blocks exploitation with its XXE rule. It runs inside the Java application, with no code changes.

Waratek RASP Runtime protection for Java applications

Affected software and releases

Maven packages

Affected and fixed versions, from OSV.dev
PackageIntroducedFixedLast affected
org.springframework.ws:spring-xml 5.0.0 5.0.2 unbounded
org.springframework.ws:spring-xml 4.1.0 4.1.4 unbounded
org.springframework.ws:spring-xml 4.0.0 none 4.0.18
org.springframework.ws:spring-xml 3.1.0 none 3.1.8

Products and versions

2 products, 8 version entries
SourceVendorProductSchemeAffected versions
nvd broadcom spring web services generic < 3.1.9 · ≥ 4.0.0 and < 4.0.19 · ≥ 4.1.0 and < 4.1.3.1 · ≥ 5.0.0 and < 5.0.1.1
osv org.springframework.ws spring-xml generic ≥ 3.1.0 and ≤ 3.1.8 · ≥ 4.0.0 and ≤ 4.0.18 · ≥ 4.1.0 and < 4.1.4 · ≥ 5.0.0 and < 5.0.2

References

URLTags
https://github.com/spring-projects/spring-ws/commit/eb8d66c0995d1e1dd5bfcfb657c8c9de21266d97 WEB
https://github.com/spring-projects/spring-ws PACKAGE
https://spring.io/security/cve-2026-40998 WEB

Timeline

Published2026-06-11By the CVE Program.
NVD record modified2026-09-04NVD's own last-modified date for this record.