{
  "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": "447d0b2331e01b8fc6e08119ac984e1ef50caef9"
            }
          ],
          "repo": "https://github.com/twigphp/twig",
          "type": "GIT"
        }
      ]
    }
  ],
  "aliases": [
    "GHSA-pr2w-4gpj-cpq4"
  ],
  "database_specific": {
    "cna_assigner": "GitHub_M",
    "cwe_ids": [
      "CWE-863"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/47xxx/CVE-2026-47732.json"
  },
  "details": "Twig is a template language for PHP. Prior to 3.26.0, several Twig language constructs trigger PHP string coercion on a Stringable operand without consulting SecurityPolicy::checkMethodAllowed(), allowing a sandboxed template author to invoke __toString() on objects reachable in the render context through conditional expressions, comparison operators, tests, template-loading tags, dynamic attribute names, spread arguments, the do tag, and the .. range operator. This issue is fixed in version 3.26.0.",
  "id": "CVE-2026-47732",
  "modified": "2026-08-12T03:51:31.790623685Z",
  "published": "2026-07-14T21:12:13.071Z",
  "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/47xxx/CVE-2026-47732.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/twigphp/Twig/security/advisories/GHSA-pr2w-4gpj-cpq4"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-47732"
    },
    {
      "type": "FIX",
      "url": "https://github.com/twigphp/Twig/commit/447d0b2331e01b8fc6e08119ac984e1ef50caef9"
    }
  ],
  "schema_version": "1.9.0",
  "severity": [
    {
      "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N",
      "type": "CVSS_V4"
    }
  ],
  "summary": "Twig Sandbox: multiple `__toString()` policy bypasses via unguarded string coercion points"
}