---
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
  - url: >-
      https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-40998.json
  - url: 'https://access.redhat.com/security/cve/CVE-2026-40998'
  - url: 'https://bugzilla.redhat.com/show_bug.cgi?id=2487794'
  - url: 'https://www.cve.org/CVERecord?id=CVE-2026-40998'
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2026-40998'
tags:
  - nvd
  - csaf
  - vex
  - red-hat
epss: 0.00352
epssPercentile: 0.29042
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`

## Vendor advisories

- **Red Hat VEX** · Important · affected: Red Hat Fuse 7 · no fix planned: Red Hat Fuse 7 · updated 2026-10-02 · [vex](https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-40998.json)
