---
id: CVE-2026-40998
title: >-
  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
  config…
summary: >-
  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
  config…
severity: high
cvss: 8.2
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N'
cwe:
  - CWE-611
vendor: broadcom
product: spring_web_services
affected:
  - spring_web_services < 3.1.9
  - 'spring_web_services >= 4.0.0, < 4.0.19'
  - 'spring_web_services >= 4.1.0, < 4.1.3.1'
  - 'spring_web_services >= 5.0.0, < 5.0.1.1'
patched:
  - spring_web_services 5.0.1.1
published: '2026-06-11'
updated: '2026-09-04'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-40998'
references:
  - url: 'https://spring.io/security/cve-2026-40998'
    label: security@vmware.com
tags:
  - nvd
epss: 0.00386
epssPercentile: 0.29859
ingestedAt: '2026-09-05T13:39:55.472Z'
---

## Overview

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

- `spring_web_services < 3.1.9`
- `spring_web_services >= 4.0.0, < 4.0.19`
- `spring_web_services >= 4.1.0, < 4.1.3.1`
- `spring_web_services >= 5.0.0, < 5.0.1.1`

## Remediation

Upgrade past the affected range:

- `spring_web_services 5.0.1.1`
