CVE-2026-40991
JSON

5.9medium

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

Severity
5.9medium CVSS:3.1 by vmware
Exploit likelihood
0.22% (higher than 13% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
vmware
Also known as
GHSA-6rpq-6vv2-5222

Description

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.

Affected

Product or packageVersionsReported by
Spring Spring REST Docsfrom 4.0.0 before 4.0.0.1, from 3.0.0 before 3.0.5.1, from 2.0.0.RELEASE before 2.0.9.RELEASECVE List
org.springframework.restdocs:spring-restdocs-webtestclient (Maven)from 4.0.0 before 4.0.1, from 3.0.0 before 3.0.6, up to 2.0.8.RELEASEGitHub Advisory Database
org.springframework.restdocs:spring-restdocs-restassured (Maven)from 4.0.0 before 4.0.1, from 3.0.0 before 3.0.6, up to 2.0.8.RELEASEGitHub Advisory Database
broadcom spring_rest_docsfrom 2.0.0 before 2.0.9, from 3.0.0 before 3.0.5.1, 4.0.0NVD

All scores

vmware5.9medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:L
GitHub5.9medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:L

Classification

CWE-611

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

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.

NVD (es)

Al usar spring-restdocs-webtestclient o spring-restdocs-restassured para documentar una API remota accedida a través de HTTP, un atacante que compromete la API o engaña al usuario para que documente una API maliciosa puede realizar un ataque de inyección XXE cuando las pruebas de generación de documentación se ejecuten a continuación. Versiones afectadas: Spring REST Docs 4.0.0; 3.0.0 a 3.0.5; 2.0.0.RELEASE a 2.0.8.RELEASE.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-40991 changed 2026-06-27CVE Terms of Use
GitHub Advisory DatabaseGHSA-6rpq-6vv2-5222 changed 2026-08-12CC-BY-4.0
NVDCVE-2026-40991 changed 2026-07-23Public domain