{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "cpe": "cpe:2.3:a:symfony:twig:*:*:*:*:*:*:*:*",
            "extracted_events": [
              {
                "introduced": "0"
              },
              {
                "fixed": "3.26.0"
              }
            ],
            "source": [
              "CPE_RANGE",
              "REFERENCES"
            ]
          },
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "1fcae487b180d78e6351f4e0afa91f9eab96a2bc"
            },
            {
              "fixed": "6bfa285e2f98651adb7aa480bf83a741d154f09f"
            }
          ],
          "repo": "https://github.com/twigphp/twig",
          "type": "GIT"
        }
      ]
    }
  ],
  "aliases": [
    "GHSA-923g-j88x-j34q"
  ],
  "database_specific": {
    "cna_assigner": "GitHub_M",
    "cwe_ids": [
      "CWE-400"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/46xxx/CVE-2026-46627.json"
  },
  "details": "Twig is a template language for PHP. Prior to 3.26.0, the Twig sandbox does not prevent a template from consuming CPU, memory, or wall-clock time, even under the strictest allow-list, allowing untrusted templates to cause resource exhaustion. This issue is addressed in version 3.26.0 by documenting that the sandbox does not protect against resource exhaustion.",
  "id": "CVE-2026-46627",
  "modified": "2026-07-18T03:41:43.482388339Z",
  "published": "2026-07-14T21:15:17.366Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/twigphp/Twig/releases/tag/v3.26.0"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/46xxx/CVE-2026-46627.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/twigphp/Twig/security/advisories/GHSA-923g-j88x-j34q"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-46627"
    },
    {
      "type": "FIX",
      "url": "https://github.com/twigphp/Twig/commit/6bfa285e2f98651adb7aa480bf83a741d154f09f"
    }
  ],
  "schema_version": "1.8.0",
  "severity": [
    {
      "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N",
      "type": "CVSS_V4"
    }
  ],
  "summary": "Twig: Sandbox resource exhaustion via unbounded `for` / `range()`"
}