Advisory Database
  • Advisories
  • Dependency Scanning
  1. maven
  2. ›
  3. org.springframework.restdocs/spring-restdocs-webtestclient
  4. ›
  5. CVE-2026-40991

CVE-2026-40991: Spring REST Docs REST Assured & WebFlux are vulnerable to Improper Restriction of XML External Entity Reference

June 10, 2026 (updated August 12, 2026)

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.

References

  • github.com/advisories/GHSA-6rpq-6vv2-5222
  • github.com/spring-projects/spring-restdocs/releases/tag/v3.0.6
  • github.com/spring-projects/spring-restdocs/releases/tag/v4.0.1
  • nvd.nist.gov/vuln/detail/CVE-2026-40991
  • spring.io/security/cve-2026-40991

Code Behaviors & Features

Detect and mitigate CVE-2026-40991 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions up to 2.0.8, all versions starting from 3.0.0 before 3.0.6, all versions starting from 4.0.0 before 4.0.1

Fixed versions

  • 3.0.6
  • 4.0.1

Solution

Upgrade to versions 3.0.6, 4.0.1 or above.

Impact 5.9 MEDIUM

CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:L

Learn more about CVSS

Weakness

  • CWE-611: Improper Restriction of XML External Entity Reference

Source file

maven/org.springframework.restdocs/spring-restdocs-webtestclient/CVE-2026-40991.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:15:53 +0000.