Severity by source
AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:L
Primary rating from Vendor (vmware) · only source for this CVE.
CVSS VectorVendor: vmware
Lifecycle Timeline
2Blast Radius
ecosystem impact- 1 maven packages depend on org.springframework.restdocs:spring-restdocs-webtestclient (1 direct, 0 indirect)
Ecosystem-wide dependent count for version 4.0.0.
DescriptionCVE.org
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.
AnalysisAI
XXE injection in Spring REST Docs exposes developer machines and CI runners to file disclosure when documentation-generating tests process responses from a remote API. Versions 4.0.0, 3.0.0-3.0.5, and 2.0.0.RELEASE-2.0.8.RELEASE of the spring-restdocs-webtestclient and spring-restdocs-restassured modules fail to disable XML external entity processing, allowing an attacker who controls the documented API endpoint to serve a malicious XML response. No confirmed active exploitation exists (not in CISA KEV), and no public exploit has been identified at time of analysis; however, the High confidentiality impact against developer and CI environments warrants prompt patching.
Technical ContextAI
Spring REST Docs is a Java framework (tagged Java, XXE) that auto-generates API documentation from integration test snippets. The vulnerable surface is limited to the spring-restdocs-webtestclient module (targeting Spring WebFlux's WebTestClient) and the spring-restdocs-restassured module (targeting REST Assured), both of which process real HTTP responses from a remote endpoint during test execution. The spring-restdocs-mockmvc module, which uses local mocks, is not in scope. CWE-611 (Improper Restriction of XML External Entity Reference) identifies the root cause: the library's XML response parser does not disable DOCTYPE declarations or external entity resolution. When an attacker-controlled API returns XML with an XXE payload such as an entity referencing a local file path or an out-of-band SSRF destination, the Java XML parser resolves it during documentation snippet generation, leaking data without the developer's awareness. Reported by security@vmware.com, indicating origin from the Spring/VMware security team.
RemediationAI
Upgrade to a patched version of Spring REST Docs per the vendor advisory at https://spring.io/security/cve-2026-40991. The exact fixed release version is not confirmed in the available intelligence data - the advisory must be consulted for the precise target version for each affected branch (4.x, 3.0.x, 2.0.x). Patch is available per vendor advisory. Where immediate upgrade is not feasible, the most targeted compensating control is to restrict documentation test execution to local mock servers only (e.g., spring-restdocs-mockmvc) and avoid running spring-restdocs-webtestclient or spring-restdocs-restassured tests against any external or third-party HTTP endpoint until patched; this eliminates the attack surface entirely but may require refactoring test suites. Additionally, CI runners should operate with least-privilege file system access and minimal secrets in the environment to limit exposure if an XXE payload is triggered, though this mitigates impact rather than preventing exploitation.
Oracle Java SE 7 Update 6 and earlier contains multiple sandbox bypass vulnerabilities via the ClassFinder and forName m
Remote code execution in IBM Sterling B2B Integrator, Sterling Integrator, and Tivoli Common Reporting allows unauthenti
Java Runtime Environment sandbox bypass via incorrect image channel verification in 2D component allows remote unauthent
Oracle Java SE JDK/JRE 7 and 6 Update 27 and earlier allows remote code execution with complete system compromise throug
JBoss Seam 2 in Red Hat JBoss EAP 4.3.0 fails to sanitize JBoss Expression Language inputs, allowing remote attackers to
Unspecified vulnerability in the Java Runtime Environment (JRE) component in Oracle Java SE 7 update 4 and earlier, 6 up
Multiple vulnerabilities in Oracle Java 7 before Update 11 allow remote attackers to execute arbitrary code by (1) using
Unspecified vulnerability in the Java Runtime Environment (JRE) component in Oracle Java SE 7 Update 2 and earlier, 6 Up
The WLS Security component in Oracle WebLogic Server 10.3.6.0, 12.1.2.0, 12.1.3.0, and 12.2.1.0 allows remote attackers
Unspecified vulnerability in the Java Runtime Environment (JRE) component in Oracle Java SE 7 Update 7 and earlier allow
Remote unauthenticated attackers can execute arbitrary code on Adobe ColdFusion servers through Java deserialization fla
The ExceptionDelegator component in Apache Struts before 2.2.3.1 interprets parameter values as OGNL expressions during
Share
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-35885
GHSA-6rpq-6vv2-5222