{"id":"CVE-2026-40991","summary":"XML External Entity (XXE) injection when documenting untrusted XML content","details":"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.\n\nAffected versions:\nSpring REST Docs 4.0.0; 3.0.0 through 3.0.5; 2.0.0.RELEASE through 2.0.8.RELEASE.","modified":"2026-07-25T03:56:39.761710210Z","published":"2026-06-09T23:46:33.676Z","database_specific":{"unresolved_ranges":[{"extracted_events":[{"introduced":"4.0.0"},{"fixed":"4.0.0.1"},{"introduced":"3.0.0"},{"fixed":"3.0.5.1"},{"introduced":"2.0.0.RELEASE"},{"fixed":"2.0.9.RELEASE"}],"source":"AFFECTED_FIELD"},{"source":"DESCRIPTION","extracted_events":[{"introduced":"3.0.0"},{"fixed":"3.0.5"},{"introduced":"2.0.0.RELEASE"},{"fixed":"2.0.8.RELEASE"}]}],"cna_assigner":"vmware","cwe_ids":["CWE-611"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/40xxx/CVE-2026-40991.json"},"references":[{"type":"WEB","url":"https://spring.io/security/cve-2026-40991"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/40xxx/CVE-2026-40991.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-40991"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/spring-projects/spring-restdocs","events":[{"introduced":"b088263fd22195c49e6f8fc49f05c9d9e89e4eeb"},{"last_affected":"b088263fd22195c49e6f8fc49f05c9d9e89e4eeb"}],"database_specific":{"source":"CPE_STRING","cpe":"cpe:2.3:a:broadcom:spring_rest_docs:4.0.0:-:*:*:*:*:*:*","extracted_events":[{"introduced":"4.0.0-NA"},{"last_affected":"4.0.0-NA"}]}}],"versions":["4.0.0-NA","v4.0.0"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-40991.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:L"}]}