{"id":"CVE-2026-40991","aliases":["CVE-2026-40991","GHSA-6rpq-6vv2-5222"],"related":[],"kind":"vulnerability","state":"published","title":"XML External Entity (XXE) injection when documenting untrusted XML content","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","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.","source":"cvelist"},{"lang":"es","text":"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.\n\nVersiones afectadas:\nSpring REST Docs 4.0.0; 3.0.0 a 3.0.5; 2.0.0.RELEASE a 2.0.8.RELEASE.","source":"nvd"}],"published":"2026-06-09T23:46:33.676Z","modified":"2026-08-12T15:41:04.269Z","severity":{"scorer":"vmware","scheme":"CVSS: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,"rating":"MEDIUM"},"severities":[{"scorer":"vmware","scheme":"CVSS: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,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS: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,"rating":"MEDIUM"}],"cwes":["CWE-611"],"affected":[{"ranges":[{"type":"custom","introduced":"4.0.0","fixed":"4.0.0.1","status":"affected"},{"type":"custom","introduced":"3.0.0","fixed":"3.0.5.1","status":"affected"},{"type":"custom","introduced":"2.0.0.RELEASE","fixed":"2.0.9.RELEASE","status":"affected"}],"vendor":"Spring","product":"Spring REST Docs","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"4.0.0","status":"affected","fixed":"4.0.1"}],"ecosystem":"Maven","package":"org.springframework.restdocs:spring-restdocs-webtestclient","purl":"pkg:maven/org.springframework.restdocs/spring-restdocs-webtestclient","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"3.0.0","status":"affected","fixed":"3.0.6"}],"ecosystem":"Maven","package":"org.springframework.restdocs:spring-restdocs-webtestclient","purl":"pkg:maven/org.springframework.restdocs/spring-restdocs-webtestclient","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","lastAffected":"2.0.8.RELEASE"}],"ecosystem":"Maven","package":"org.springframework.restdocs:spring-restdocs-webtestclient","purl":"pkg:maven/org.springframework.restdocs/spring-restdocs-webtestclient","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"4.0.0","status":"affected","fixed":"4.0.1"}],"ecosystem":"Maven","package":"org.springframework.restdocs:spring-restdocs-restassured","purl":"pkg:maven/org.springframework.restdocs/spring-restdocs-restassured","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"3.0.0","status":"affected","fixed":"3.0.6"}],"ecosystem":"Maven","package":"org.springframework.restdocs:spring-restdocs-restassured","purl":"pkg:maven/org.springframework.restdocs/spring-restdocs-restassured","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","lastAffected":"2.0.8.RELEASE"}],"ecosystem":"Maven","package":"org.springframework.restdocs:spring-restdocs-restassured","purl":"pkg:maven/org.springframework.restdocs/spring-restdocs-restassured","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"2.0.0","fixed":"2.0.9"},{"status":"affected","introduced":"3.0.0","fixed":"3.0.5.1"},{"status":"affected","version":"4.0.0"}],"vendor":"broadcom","product":"spring_rest_docs","cpe":"cpe:2.3:a:broadcom:spring_rest_docs:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://spring.io/security/cve-2026-40991","tags":["vendor-advisory","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-40991","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/spring-projects/spring-restdocs","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/spring-projects/spring-restdocs/releases/tag/v3.0.6","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/spring-projects/spring-restdocs/releases/tag/v4.0.1","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"vmware","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-06-10T13:01:26.403Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-40991","url":"https://www.cve.org/CVERecord?id=CVE-2026-40991","licence":"CVE Terms of Use","modified":"2026-06-27T21:10:14.865Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-6rpq-6vv2-5222","url":"https://github.com/advisories/GHSA-6rpq-6vv2-5222","licence":"CC-BY-4.0","modified":"2026-08-12T15:41:04.269Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-40991","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-40991","licence":"Public domain","modified":"2026-07-23T09:10:00.113Z"}],"updatedAt":"2026-11-25T22:59:24.285Z","epss":{"score":0.00223,"percentile":0.13733,"date":"2026-12-01T12:00:22.000Z"}}