Skip to main content
← All vulnerabilities
CVE-2026-40991GHSA-6RPQ-6VV2-5222

XML External Entity (XXE) injection when documenting untrusted XML content

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 4.0.0.1, 3.0.5.1, 2.0.9.RELEASE, 4.0.1, 3.0.6
None on Exploit-DB, Metasploit or GitHub
  • Exploitation: none
  • Automatable: no
  • Technical impact: partial

Summary

When using spring-restdocs-webtestclient or spring-restdocs-restassured to document a remote API accessed over HTTP, an attacker who compromises the API or tricks the user into documenting a malicious API can perform an XXE injection attack when the documentation-generating tests are next executed. Affected versions: Spring REST Docs 4.0.0; 3.0.0 through 3.0.5; 2.0.0.RELEASE through 2.0.8.RELEASE.

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: none · Automatable: no · Technical impact: partial

  3. Record last updated

Affected versions

  • Spring Spring REST Docs

    From 4.0.0 · fixed in 4.0.0.1; From 3.0.0 · fixed in 3.0.5.1; From 2.0.0.RELEASE · fixed in 2.0.9.RELEASE

  • org.springframework.restdocs:spring-restdocs-webtestclientMaven

    From 4.0.0 · fixed in 4.0.1

  • org.springframework.restdocs:spring-restdocs-webtestclientMaven

    From 3.0.0 · fixed in 3.0.6

  • org.springframework.restdocs:spring-restdocs-webtestclientMaven

    through 2.0.8.RELEASE

  • org.springframework.restdocs:spring-restdocs-restassuredMaven

    From 4.0.0 · fixed in 4.0.1

  • org.springframework.restdocs:spring-restdocs-restassuredMaven

    From 3.0.0 · fixed in 3.0.6

  • org.springframework.restdocs:spring-restdocs-restassuredMaven

    through 2.0.8.RELEASE

References 1

spring.io