{"id":"CVE-2026-47732","published":"2026-07-14T21:12:13Z","modified":"2026-07-15T13:26:33Z","title":"Twig Sandbox: multiple `__toString()` policy bypasses via unguarded string coercion points","vendor":"twigphp","product":"Twig","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.1,"severity":"HIGH","version":"4.0","vector":"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","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00402,"percentile":0.35278,"provenance":"source"},"cwes":[{"id":"CWE-863","name":"Incorrect Authorization"}],"references":[{"url":"https://github.com/twigphp/Twig/security/advisories/GHSA-pr2w-4gpj-cpq4","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/twigphp/Twig/commit/447d0b2331e01b8fc6e08119ac984e1ef50caef9","tags":["x_refsource_MISC"]},{"url":"https://github.com/twigphp/Twig/releases/tag/v3.26.0","tags":["x_refsource_MISC"]}],"priority":{"score":12.0,"factors":[{"name":"EPSS percentile","points":7.06},{"name":"CVSS severity","points":4.97}]},"vendorSlug":"twigphp","affectedVersions":[{"vendor":"twigphp","product":"Twig","versions":["< 3.26.0"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2026-07-15T13:20:12.888618Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Packagist","package":"twig/twig","vulnerableRanges":["<3.26.0"],"patched":["3.26.0"],"from":["GHSA-pr2w-4gpj-cpq4"],"provenance":"source"}],"euvd":{"id":"EUVD-2026-44555","exploited":false,"provenance":"source"}}