{"id":"CVE-2026-40991","published":"2026-06-09T23:46:33Z","modified":"2026-06-27T21:10:14Z","title":"XML External Entity (XXE) injection when documenting untrusted XML content","vendor":"Spring","product":"Spring REST Docs","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.9,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:L","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00293,"percentile":0.14354,"provenance":"source"},"cwes":[{"id":"CWE-611","name":"Improper Restriction of XML External Entity Reference"}],"references":[{"url":"https://spring.io/security/cve-2026-40991","tags":[]}],"priority":{"score":7.0,"factors":[{"name":"EPSS percentile","points":2.87},{"name":"CVSS severity","points":4.13}]},"vendorSlug":"spring","affectedVersions":[{"vendor":"Spring","product":"Spring REST Docs","versions":[">= 4.0.0, < 4.0.0.1",">= 3.0.0, < 3.0.5.1",">= 2.0.0.RELEASE, < 2.0.9.RELEASE"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2026-06-10T13:01:26.403312Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Maven","package":"org.springframework.restdocs:spring-restdocs-webtestclient","vulnerableRanges":[">=4.0.0, <4.0.1",">=3.0.0, <3.0.6","<=2.0.8.RELEASE"],"patched":["4.0.1","3.0.6"],"from":["GHSA-6rpq-6vv2-5222"],"provenance":"source"},{"ecosystem":"Maven","package":"org.springframework.restdocs:spring-restdocs-restassured","vulnerableRanges":[">=4.0.0, <4.0.1",">=3.0.0, <3.0.6","<=2.0.8.RELEASE"],"patched":["4.0.1","3.0.6"],"from":["GHSA-6rpq-6vv2-5222"],"provenance":"source"}],"summary":{"text":"XML External Entity (XXE) injection exists in Spring REST Docs when its spring-restdocs-webtestclient or spring-restdocs-restassured modules are used to document a remote API accessed over HTTP. An attacker who compromises that API, or tricks the user into documenting a malicious API, can trigger the injection when the documentation-generating tests are next run, which requires user interaction.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:16:22Z"},"euvd":{"id":"EUVD-2026-35885","exploited":false,"provenance":"source"}}