SecurityContext

CVE-2026-40991: Spring REST Docs - XML External Entity Injection

  • Cve: CVE-2026-40991
  • Name: Spring REST Docs - XML External Entity Injection
  • 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.
  • Impact: Attackers can perform XXE injection to disclose sensitive files or cause denial of service during documentation test execution.
  • Remediation: Update to a version later than 4.0.0 or the latest available version.
  • Vulnerability type: xml_external_entity_injection
  • Vulnerability impact: information_disclosure, denial_of_service
  • Requirement type: none
  • Labels source: projectdiscovery
  • Severity: medium
  • Cvss score: 5.9
  • Cvss vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:L
  • Epss score: 0.00223
  • Epss percentile: 0.12744
  • Assignee: [email protected]
  • Published at: 2026-06-10T00:16:50Z
  • Age in days: 167
  • Modified at: 2026-07-23T09:10:00Z
  • Patch available: yes
  • References total: 1
  • Products total: 1
  • Oss: yes
  • Projects total: 1
  • Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2026-40991
  • Nvd status: analyzed
  • Checked, none or zero: known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, rejected by nvd
  • Not known: requirements, hackerone

Cwe

IdName
CWE-611Improper Restriction of XML External Entity Reference

References

UrlSourceTags
https://spring.io/security/cve-2026-40991nvdVendor Advisory

Products

ProductAffectedPlatform boundSourcesUrl
broadcom:spring_rest_docs= 4.0.0; >= 3.0.0, < 3.0.5.1; >= 2.0.0, < 2.0.9nonvd/v1/products/broadcom/spring_rest_docs

Projects

RepositoryLink kindsIndexedUrl
spring-projects/spring-restdocspackage, releasesyes/v1/repositories/spring-projects/spring-restdocs

Index

  • Repositories: 1
  • Checked, none or zero: repositories high signal, packages

Exploitation

  • Remote: yes
  • Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access, authentication required
  • Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since, hackerone reports, exposed hosts