{"id":"CVE-2026-48807","published":"2026-07-14T21:29:15Z","modified":"2026-07-15T12:50:42Z","title":"Twig: Sandbox `__toString()` policy bypass via `Traversable` in `join` and `replace` filters","vendor":"twigphp","product":"Twig","tier":"tail","description":{"text":"Twig is a template language for PHP. Prior to 3.27.0, the sandbox __toString() checks do not fully cover Traversable values passed to join and replace filters or operands evaluated by the in and not in operators, allowing contained Stringable objects to be coerced to strings without consulting the sandbox policy. This issue is fixed in version 3.27.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.00367,"percentile":0.31334,"provenance":"source"},"cwes":[{"id":"CWE-693","name":"Protection Mechanism Failure"},{"id":"CWE-863","name":"Incorrect Authorization"}],"references":[{"url":"https://github.com/twigphp/Twig/security/advisories/GHSA-8x9c-rmqh-456c","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/twigphp/Twig/releases/tag/v3.27.0","tags":["x_refsource_MISC"]}],"priority":{"score":11.2,"factors":[{"name":"EPSS percentile","points":6.27},{"name":"CVSS severity","points":4.97}]},"vendorSlug":"twigphp","affectedVersions":[{"vendor":"twigphp","product":"Twig","versions":["< 3.27.0"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2026-07-15T12:46:57.656178Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Packagist","package":"twig/twig","vulnerableRanges":["<3.27.0"],"patched":["3.27.0"],"from":["GHSA-8x9c-rmqh-456c"],"provenance":"source"}],"summary":{"text":"Twig, the PHP template language, has a flaw in its sandbox where the __toString() policy checks do not fully cover Traversable values passed to the join and replace filters or to operands of the in and not in operators, so Stringable objects inside those values can be converted to strings without the sandbox policy being applied. An attacker with low privileges and network access to a template-rendering path can exploit this without user interaction, gaining high confidentiality impact and low integrity impact, and the issue is fixed in Twig 3.27.0.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:56:04Z"},"euvd":{"id":"EUVD-2026-44514","exploited":false,"provenance":"source"}}