{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "cpe": "cpe:2.3:a:broadcom:spring_rest_docs:4.0.0:-:*:*:*:*:*:*",
            "extracted_events": [
              {
                "introduced": "4.0.0-NA"
              },
              {
                "last_affected": "4.0.0-NA"
              }
            ],
            "source": "CPE_STRING"
          },
          "events": [
            {
              "introduced": "b088263fd22195c49e6f8fc49f05c9d9e89e4eeb"
            },
            {
              "last_affected": "b088263fd22195c49e6f8fc49f05c9d9e89e4eeb"
            }
          ],
          "repo": "https://github.com/spring-projects/spring-restdocs",
          "type": "GIT"
        }
      ],
      "versions": [
        "4.0.0-NA"
      ]
    }
  ],
  "database_specific": {
    "cna_assigner": "vmware",
    "cwe_ids": [
      "CWE-611"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/40xxx/CVE-2026-40991.json",
    "unresolved_ranges": [
      {
        "extracted_events": [
          {
            "introduced": "4.0.0"
          },
          {
            "fixed": "4.0.0.1"
          },
          {
            "introduced": "3.0.0"
          },
          {
            "fixed": "3.0.5.1"
          },
          {
            "introduced": "2.0.0.RELEASE"
          },
          {
            "fixed": "2.0.9.RELEASE"
          }
        ],
        "source": "AFFECTED_FIELD"
      },
      {
        "extracted_events": [
          {
            "introduced": "3.0.0"
          },
          {
            "fixed": "3.0.5"
          },
          {
            "introduced": "2.0.0.RELEASE"
          },
          {
            "fixed": "2.0.8.RELEASE"
          }
        ],
        "source": "DESCRIPTION"
      }
    ]
  },
  "details": "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.",
  "id": "CVE-2026-40991",
  "modified": "2026-07-25T03:56:39.761710210Z",
  "published": "2026-06-09T23:46:33.676Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://spring.io/security/cve-2026-40991"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/40xxx/CVE-2026-40991.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-40991"
    }
  ],
  "schema_version": "1.8.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:L",
      "type": "CVSS_V3"
    }
  ],
  "summary": "XML External Entity (XXE) injection when documenting untrusted XML content"
}