Advisory Database
  • Advisories
  • Dependency Scanning
  1. composer
  2. ›
  3. twig/twig
  4. ›
  5. CVE-2015-7809

CVE-2015-7809: Twig remote code execution in templates

May 14, 2022 (updated May 30, 2024)

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.

References

  • github.com/FriendsOfPHP/security-advisories/blob/master/twig/twig/CVE-2015-7809.yaml
  • github.com/advisories/GHSA-xw83-pwrm-9j74
  • github.com/twigphp/Twig
  • github.com/twigphp/Twig/commit/30be07759a3de2558da5224f127d052ecf492e8f
  • github.com/twigphp/Twig/pull/1759
  • nvd.nist.gov/vuln/detail/CVE-2015-7809
  • symfony.com/blog/security-release-twig-1-20-0

Code Behaviors & Features

Detect and mitigate CVE-2015-7809 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 1.20.0

Fixed versions

  • 1.20.0

Solution

Upgrade to version 1.20.0 or above.

Impact 8.1 HIGH

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')

Source file

packagist/twig/twig/CVE-2015-7809.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:14:43 +0000.