Machine-written summary
Summary written by Claude Haiku from the source advisory. Not reviewed by a person.
Twig (Packagist twig/twig) versions before 3.27.0 are affected. A sandboxed template author can use an object as a dynamic mapping key so that its __toString() method runs without the sandbox policy being checked, even though direct output of the same object is blocked. The main impact described is unauthorised disclosure of data returned by __toString(). Upgrade to Twig 3.27.0, which fixes the issue.
Not analysed yet
We haven’t published our analysis of this Advisory yet. Once a person has reviewed it, this page will say what’s vulnerable, what has to be true for your app to be affected, and how to check.
Severity and exploitation
| Score | Rating | CVSS | Vector | Source |
|---|---|---|---|---|
| 7.1 | High | 4.0 | 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 | CNA (GitHub_M) |
- CISA KEV Not listed.
- EPSS 0.0042, the 36th percentile, on 9 Nov 2026: FIRST’s estimate of the chance of exploitation in the next 30 days.
Timeline
- 27 May 2026, 13:13 UTC Published by the maintainers as a GitHub repository advisory
- 31 Oct 2026, 14:01 UTC First seen by agentprime
- 31 Oct 2026, 14:01 UTC Confirmed by OSV
Sources
- GitHub Advisory Database: GHSA-5v5v-ww74-355v
- OSV: GHSA-5v5v-ww74-355v
- github.com/twigphp/Twig/security/advisories/GHSA-5v5v-ww74-355v
- github.com/FriendsOfPHP/security-advisories/blob/master/twig/twig/CVE-2026-48806.yaml
- github.com/twigphp/Twig
- github.com/twigphp/Twig/releases/tag/v3.27.0
- symfony.com/blog/cve-2026-48806-sandbox-tostring-policy-bypass-via-dynamic-mapping-keys