Staging Environment: Content and features may be unstable or change without notice.
Search for packages
Package details: pkg:composer/twig/twig@1.0.0
purl pkg:composer/twig/twig@1.0.0
Tags Ghost
Next non-vulnerable version 3.11.2
Latest non-vulnerable version 3.19.0
Risk 4.0
Vulnerabilities affecting this package (4)
Vulnerability Summary Fixed by
VCID-c3tf-7b2z-3fhy
Aliases:
GHSA-7cvr-xhm5-x998
Twig Path Traversal vulnerability in the filesystem loader Twig is affected by path traversal vulnerability when used with Twig_Loader_Filesystem for loading Twig templates but only if the application is using non-trusted template names (names provided by a end-user for instance). When affected, it is possible to go up one directory for the paths configured in the application's loader. For instance, if the filesystem loader is configured with /path/to/templates as a path to look for templates, an attacker can force Twig to include a file stored in /path/to by prepending the path with /../ like in {% include "/../somefile_in_path_to" %} Note that using anything else (like ../somefile, /../../somefile, or ../../somefile) won’t work and the application will return a proper exception.
1.12.3
Affected by 9 other vulnerabilities.
VCID-etje-vrfw-nbh4
Aliases:
CVE-2024-45411
GHSA-6j75-5wfj-gh66
Twig has a possible sandbox bypass ### Description Under some circumstances, the sandbox security checks are not run which allows user-contributed templates to bypass the sandbox restrictions. The security issue happens when all these conditions are met: * The sandbox is disabled globally; * The sandbox is enabled via a sandboxed `include()` function which references a template name (like `included.twig`) and not a `Template` or `TemplateWrapper` instance; * The included template has been loaded before the `include()` call but in a non-sandbox context (possible as the sandbox has been globally disabled). ### Resolution The patch ensures that the sandbox security checks are always run at runtime. ### Credits We would like to thank Fabien Potencier for reporting and fixing the issue.
1.44.8
Affected by 2 other vulnerabilities.
2.16.1
Affected by 2 other vulnerabilities.
3.0.0-BETA1
Affected by 2 other vulnerabilities.
3.11.1
Affected by 2 other vulnerabilities.
3.14.0
Affected by 2 other vulnerabilities.
VCID-ummk-h11z-bkaj
Aliases:
CVE-2022-39261
GHSA-52m2-vc4m-jj33
Twig may load a template outside a configured directory when using the filesystem loader # Description When using the filesystem loader to load templates for which the name is a user input, it is possible to use the `source` or `include` statement to read arbitrary files from outside the templates directory when using a namespace like `@somewhere/../some.file` (in such a case, validation is bypassed). # Resolution We fixed validation for such template names. Even if the 1.x branch is not maintained anymore, a new version has been released. # Credits We would like to thank Dariusz Tytko for reporting the issue and Fabien Potencier for fixing the issue.
1.44.7
Affected by 3 other vulnerabilities.
2.15.3
Affected by 3 other vulnerabilities.
3.0.0-BETA1
Affected by 2 other vulnerabilities.
3.4.3
Affected by 3 other vulnerabilities.
VCID-ywkt-zvb8-fybd
Aliases:
2013-04-08
Path Traversal Vulnerability in the filesystem loader.
1.12.3
Affected by 9 other vulnerabilities.
Vulnerabilities fixed by this package (0)
Vulnerability Summary Aliases
This package is not known to fix vulnerabilities.

Date Actor Action Vulnerability Source VulnerableCode Version
2026-04-03T21:27:55.411205+00:00 GitLab Importer Affected by VCID-ummk-h11z-bkaj https://gitlab.com/gitlab-org/advisories-community/-/blob/main/packagist/twig/twig/CVE-2022-39261.yml 38.1.0
2026-04-02T12:40:00.792182+00:00 GitLab Importer Affected by VCID-etje-vrfw-nbh4 https://gitlab.com/gitlab-org/advisories-community/-/blob/main/packagist/twig/twig/CVE-2024-45411.yml 38.0.0
2026-04-02T12:39:24.874719+00:00 GitLab Importer Affected by VCID-c3tf-7b2z-3fhy https://gitlab.com/gitlab-org/advisories-community/-/blob/main/packagist/twig/twig/GHSA-7cvr-xhm5-x998.yml 38.0.0
2026-04-01T16:06:22.267354+00:00 GHSA Importer Affected by VCID-etje-vrfw-nbh4 https://github.com/advisories/GHSA-6j75-5wfj-gh66 38.0.0
2026-04-01T16:05:35.119292+00:00 GHSA Importer Affected by VCID-c3tf-7b2z-3fhy https://github.com/advisories/GHSA-7cvr-xhm5-x998 38.0.0
2026-04-01T16:03:34.398658+00:00 GHSA Importer Affected by VCID-ummk-h11z-bkaj https://github.com/advisories/GHSA-52m2-vc4m-jj33 38.0.0
2026-04-01T12:46:48.963779+00:00 GitLab Importer Affected by VCID-ywkt-zvb8-fybd https://gitlab.com/gitlab-org/advisories-community/-/blob/main/packagist/twig/twig/2013-04-08.yml 38.0.0