CVE-2026-40998: Jaxp13 XPath XXE via StreamSource and SAXSource

Published Jun 11, 2026
·
Updated

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.

Affected Software

5 affected components
Spring Spring Web Services>=5.0.0<=5.0.1, >=4.1.0<=4.1.3, >=4.0.0<=4.0.18, >=3.1.0<=3.1.8
Broadcom Spring Web Services<3.1.9
Broadcom Spring Web Services>=4.0.0<4.0.19
Broadcom Spring Web Services>=4.1.0<4.1.3.1
Broadcom Spring Web Services>=5.0.0<5.0.1.1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade Spring Web Services to a version that resolves this vulnerability.

    Fixed in 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.8Patch Jaxp13 XPath XXE via StreamSource and SAXSource
  2. Configuration

    Update the XPath evaluation code path for StreamSource and SAXSource inputs so that attacker-controlled XML is parsed using Spring’s hardened parser configuration instead of the JDK's default DocumentBuilderFactory behavior (to prevent XXE-style attacks).

    Spring Web Services (Jaxp13 XPath handling for StreamSource/SAXSource) JDK DocumentBuilderFactory default vs Spring hardened parser configuration = Use Spring's hardened parser configuration (avoid JDK default DocumentBuilderFactory behavior)

Event History

Jun 11, 2026
CVE Published
via MITRE·05:04 AM
Data Sourced
via MITRE·05:04 AM
DescriptionSeverityWeakness
Data Sourced
via NVD·07:16 AM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2026-40998?

The severity of CVE-2026-40998 is high with a CVSS score of 8.2.

2

How do I fix CVE-2026-40998?

To fix CVE-2026-40998, ensure that you are using Spring's hardened parser configuration for processing XPath expressions.

3

What software is affected by CVE-2026-40998?

CVE-2026-40998 affects Spring Web Services.

4

What type of vulnerability is CVE-2026-40998?

CVE-2026-40998 is classified as an XML External Entity (XXE) vulnerability.

5

What does CVE-2026-40998 allow an attacker to do?

CVE-2026-40998 allows an attacker to execute XPath expressions against untrusted XML, potentially leading to data exposure.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203