{"cve":"CVE-2026-40991","nvd":{"published":"2026-06-10T00:16:50.087","modified":"2026-07-23T09:10:00.113","status":"Analyzed","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.\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.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:L","score":5.9},"cwes":["CWE-611"],"references":["https://spring.io/security/cve-2026-40991"],"products":["broadcom:spring_rest_docs"],"source":"nvd","synced_at":"2026-10-19T22:38:48.522727527+00:00"},"epss":{"cve":"CVE-2026-40991","score":0.00223,"percentile":0.12903,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-6rpq-6vv2-5222","url":"https://osv.dev/vulnerability/GHSA-6rpq-6vv2-5222","summary":"Spring REST Docs REST Assured & WebFlux are vulnerable to Improper Restriction of XML External Entity Reference","modified":"2026-08-12T15:41:04.269370Z","packages":[{"ecosystem":"Maven","name":"org.springframework.restdocs:spring-restdocs-webtestclient","purl":"pkg:maven/org.springframework.restdocs/spring-restdocs-webtestclient","ranges":[">=4.0.0 <4.0.1"],"fixed":["4.0.1"]},{"ecosystem":"Maven","name":"org.springframework.restdocs:spring-restdocs-webtestclient","purl":"pkg:maven/org.springframework.restdocs/spring-restdocs-webtestclient","ranges":[">=3.0.0 <3.0.6"],"fixed":["3.0.6"]},{"ecosystem":"Maven","name":"org.springframework.restdocs:spring-restdocs-webtestclient","purl":"pkg:maven/org.springframework.restdocs/spring-restdocs-webtestclient","ranges":["<=2.0.8.RELEASE"],"fixed":[]},{"ecosystem":"Maven","name":"org.springframework.restdocs:spring-restdocs-restassured","purl":"pkg:maven/org.springframework.restdocs/spring-restdocs-restassured","ranges":[">=4.0.0 <4.0.1"],"fixed":["4.0.1"]},{"ecosystem":"Maven","name":"org.springframework.restdocs:spring-restdocs-restassured","purl":"pkg:maven/org.springframework.restdocs/spring-restdocs-restassured","ranges":[">=3.0.0 <3.0.6"],"fixed":["3.0.6"]},{"ecosystem":"Maven","name":"org.springframework.restdocs:spring-restdocs-restassured","purl":"pkg:maven/org.springframework.restdocs/spring-restdocs-restassured","ranges":["<=2.0.8.RELEASE"],"fixed":[]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}