HighGHSA-xw83-pwrm-9j74CVE-2015-7809
Twig remote code execution in templates
Published 14 May 2022 · Updated 30 May 2024
Is your project on an affected twig/twig?
Affected package
twig/twigComposer
- Affected
- <1.20.0
- Fixed in
- 1.20.0
Update to the fixed version for your release line, for example:
composer require twig/twig:^1.20.0Details
The displayBlock function Template.php in Sensio Labs Twig before 1.20.0, when Sandbox mode is enabled, allows remote attackers to execute arbitrary code via the _self variable in a template.
Is GHSA-xw83-pwrm-9j74 in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected twig/twig, and gives you the command that fixes it.
More advisories for twig/twig
- HighCVE-2026-49981Twig: Sandbox filter, tag and function allow-list bypass when sandbox state changes between renders for a cached `Template` · 1 Jul 2026
- MediumCVE-2026-48808Twig: Sandbox property allowlist bypass via the `column` filter under `SourcePolicyInterface` · 30 Jun 2026
- MediumCVE-2026-48807Twig: Sandbox `__toString()` policy bypass via `Traversable` in `join` and `replace` filters · 30 Jun 2026
- MediumCVE-2026-48806Twig: Sandbox `__toString()` policy bypass via dynamic mapping keys · 30 Jun 2026
- LowCVE-2026-48805Twig: Sandbox state regression in deprecated internal wrappers in `src/Resources/core.php` · 30 Jun 2026
- HighCVE-2026-47732Twig: Sandbox: multiple `__toString()` policy bypasses via unguarded string coercion points · 5 Jun 2026
References
- Advisorynvd.nist.gov/vuln/detail/CVE-2015-7809
- Linkgithub.com/twigphp/Twig/pull/1759
- Linkgithub.com/twigphp/Twig/commit/30be07759a3de2558da5224f127d052ecf492e8f
- Linkgithub.com/FriendsOfPHP/security-advisories/blob/master/twig/twig/CVE-2015-7809.yaml
- Packagegithub.com/twigphp/Twig
- Linksymfony.com/blog/security-release-twig-1-20-0
- Linkopenwall.com/lists/oss-security/2015/08/21/3
- Linkopenwall.com/lists/oss-security/2015/10/11/2
- Linksymfony.com/blog/security-release-twig-1-20-0
- Linkwww.debian.org/security/2015/dsa-3343
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.