{"id":"CVE-2015-7809","aliases":["DEBIAN-CVE-2015-7809","DSA-3343-1","EUVD-2022-5869","GHSA-xw83-pwrm-9j74"],"status":"published","title":"Twig remote code execution in templates","description":"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.","severity":{"version":"2.0","score":6.8,"vector":"AV:N/AC:M/Au:N/C:P/I:P/A:P","level":"medium","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-08","score":0.03398,"percentile":0.88918,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-264","CWE-74"],"published":"2015-08-26T00:00:00Z","modified":"2026-06-17T00:33:10Z","fixes":[{"ecosystem":"Packagist","package":"twig/twig","fixed_in":["1.20.0"],"sources":["ghsa","osv"]},{"ecosystem":"Debian:8","package":"twig","fixed_in":["1.16.2-1+deb8u1"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"Packagist","package":"twig/twig","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.20.0"}]}]},{"source":"osv","ecosystem":"Debian:8","package":"twig","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.16.2-1+deb8u1"}]}],"versions":["1.16.2-1"]},{"source":"osv","ecosystem":"Packagist","package":"twig/twig","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.20.0"}]}],"versions":["1.3.0","1.4.0","1.5.0","1.5.1","1.6.0","1.6.1","1.6.2","1.6.3","1.6.4","1.6.5","v1.10.0","v1.10.1","v1.10.2","v1.10.3","v1.11.0","v1.11.1","v1.12.0","v1.12.0-RC1","v1.12.1","v1.12.2","v1.12.3","v1.13.0","v1.13.1","v1.13.2","v1.14.0","v1.14.1","v1.14.2","v1.15.0","v1.15.1","v1.16.0","v1.16.1","v1.16.2","v1.16.3","v1.17.0","v1.18.0","v1.18.1","v1.18.2","v1.19.0","v1.7.0","v1.8.0","v1.8.1","v1.8.2","v1.8.3","v1.9.0","v1.9.1","v1.9.2"]}],"products":[{"vendor":"symfony","product":"twig"}],"references":[{"url":"https://github.com/twigphp/Twig/pull/1759","tags":["x_refsource_CONFIRM","x_transferred","web"]},{"url":"http://www.debian.org/security/2015/dsa-3343","tags":["vendor-advisory","x_refsource_DEBIAN","x_transferred","web"]},{"url":"http://symfony.com/blog/security-release-twig-1-20-0","tags":["x_refsource_CONFIRM","x_transferred","Vendor Advisory","web"]},{"url":"https://github.com/fabpot/Twig/commit/30be07759a3de2558da5224f127d052ecf492e8f","tags":["x_refsource_CONFIRM","x_transferred"]},{"url":"http://openwall.com/lists/oss-security/2015/10/11/2","tags":["mailing-list","x_refsource_MLIST","x_transferred","web"]},{"url":"http://openwall.com/lists/oss-security/2015/08/21/3","tags":["mailing-list","x_refsource_MLIST","x_transferred","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2015-7809","tags":["advisory"]},{"url":"https://github.com/twigphp/Twig/commit/30be07759a3de2558da5224f127d052ecf492e8f","tags":["web"]},{"url":"https://github.com/FriendsOfPHP/security-advisories/blob/master/twig/twig/CVE-2015-7809.yaml","tags":["web"]},{"url":"https://symfony.com/blog/security-release-twig-1-20-0","tags":["web"]},{"url":"https://github.com/advisories/GHSA-xw83-pwrm-9j74"},{"url":"https://github.com/twigphp/Twig","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2015-7809","description":"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.","status":"published","published":"2015-11-06T21:00:00Z","modified":"2024-08-06T07:58:59.915Z","updated_at":"2026-11-02T14:35:44.744952Z"}],"euvd":[{"id":"EUVD-2022-5869","description":"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.","status":"published","published":"2015-11-06T21:00:00Z","modified":"2024-08-06T07:58:59Z","updated_at":"2026-11-03T02:21:50.987466Z"}],"ghsa":[{"id":"GHSA-xw83-pwrm-9j74","title":"Twig remote code execution in templates","description":"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.","status":"published","published":"2022-05-14T02:03:50Z","modified":"2024-05-30T12:39:44Z","cvss":[{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"high"}],"cwes":["CWE-74"],"updated_at":"2026-11-02T14:37:52.2286Z"}],"nvd":[{"id":"CVE-2015-7809","description":"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.","status":"published","published":"2015-11-06T21:59:12.58Z","modified":"2026-06-17T00:33:10.67Z","cvss":[{"version":"2.0","score":6.8,"vector":"AV:N/AC:M/Au:N/C:P/I:P/A:P","level":"medium","assessor":"primary"}],"cwes":["CWE-264"],"updated_at":"2026-11-02T14:03:12.30866Z"}],"osv":[{"id":"GHSA-xw83-pwrm-9j74","title":"Twig remote code execution in templates","description":"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.","status":"published","published":"2022-05-14T02:03:50Z","modified":"2024-05-30T13:26:54.93282Z","cvss":[{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"high"}],"cwes":["CWE-74"],"updated_at":"2026-11-02T15:47:00.604718Z"},{"id":"DSA-3343-1","title":"twig - security update","status":"published","published":"2015-08-26T00:00:00Z","modified":"2026-03-09T01:19:56.908184Z","updated_at":"2026-11-02T15:46:16.199525Z"}]}}
