CVE-2022-39261
CVE-2022-39261 is a high-severity vulnerability in Symfony Twig with a CVSS 3.x base score of 7.5. It is not currently listed as actively exploited by CISA, and its EPSS exploit-prediction score is low. The underlying weakness is classified as CWE-22.
Key facts
- Severity: High (CVSS 3.x base score 7.5)
- EPSS exploit prediction: 3% (88th percentile)
- Actively exploited: Not listed in CISA KEV
- Weakness: CWE-22
- Affected product: Symfony Twig
- Published:
- Last modified:
Description
Twig is a template language for PHP. Versions 1.x prior to 1.44.7, 2.x prior to 2.15.3, and 3.x prior to 3.4.3 encounter an issue when the filesystem loader loads 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. Versions 1.44.7, 2.15.3, and 3.4.3 contain a fix for validation of such template names. There are no known workarounds aside from upgrading.
Frequently asked questions
- What is CVE-2022-39261?
- Twig is a template language for PHP. Versions 1.x prior to 1.44.7, 2.x prior to 2.15.3, and 3.x prior to 3.4.3 encounter an issue when the filesystem loader loads 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. Versions 1.44.7, 2.15.3, and 3.4.3 contain a fix for validation of such template names. There are no known workarounds aside from upgrading.
- How severe is CVE-2022-39261?
- CVE-2022-39261 has a CVSS 3.x base score of 7.5, rated high severity. It is exploitable over network with low attack complexity, requires no privileges and no user interaction. Impact on confidentiality is high, integrity none, and availability none.
- Is CVE-2022-39261 being actively exploited?
- It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 3% (88th percentile), an estimate of the probability of exploitation in the next 30 days.
- What products are affected by CVE-2022-39261?
- CVE-2022-39261 primarily affects Symfony Twig. In total, 7 product configurations (CPEs) are listed as vulnerable; see the affected-products list for the exact versions.
- How do I fix CVE-2022-39261?
- Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround. Given its high severity, prioritise patching exposed systems.
- When was CVE-2022-39261 published?
- CVE-2022-39261 was published on 2022-09-28 and last updated on 2026-06-17.
References
- https://github.com/twigphp/Twig/commit/35f3035c5deb0041da7b84daf02dea074ddc7a0b
- https://github.com/twigphp/Twig/security/advisories/GHSA-52m2-vc4m-jj33
- https://lists.debian.org/debian-lts-announce/2022/10/msg00016.html
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/2OKRUHPVLIQVFPPJ2UWC3WV3WQO763NR/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/AUVTXMNPSZAHS3DWZEM56V5W4NPVR6L7/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/NWRFPZSR74SYVJKBTKTMYUK36IJ3SQJP/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/TW53TFJ6WWNXMUHOFACKATJTS7NIHVQE/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/WV5TNNJLGG536TJH6DLCIAAZZIPV2GUD/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/YU4ZYX62H2NUAKKGUES4RZIM4KMTKZ7F/
- https://www.debian.org/security/2022/dsa-5248
- https://www.drupal.org/sa-core-2022-016
Affected products (7)
- cpe:2.3:a:symfony:twig:*:*:*:*:*:*:*:*
- cpe:2.3:a:drupal:drupal:*:*:*:*:*:*:*:*
- cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:*
- cpe:2.3:o:fedoraproject:fedora:36:*:*:*:*:*:*:*
- cpe:2.3:o:fedoraproject:fedora:37:*:*:*:*:*:*:*
- cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*
- cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*
More vulnerabilities in Symfony Twig
- CVE-2026-46634 — Critical (CVSS 9.8): Twig is a template language for PHP. From 3.9.0 until 3.26.0, template_from_string() compiles an inner template under a…
- CVE-2026-46633 — Critical (CVSS 9.8): Twig is a template language for PHP. Starting in 1.15.1 and prior to 3.26.0, Compiler::string() does not escape single…
- CVE-2018-13818 — Critical (CVSS 9.8): Twig before 2.4.4 allows Server-Side Template Injection (SSTI) via the search search_key parameter. NOTE: the vendor…
- CVE-2026-48807 — Critical (CVSS 9.1): Twig is a template language for PHP. Prior to 3.27.0, the sandbox __toString() checks do not fully cover Traversable…
- CVE-2026-48806 — Critical (CVSS 9.1): Twig is a template language for PHP. Prior to 3.27.0, ArrayExpression does not guard dynamic mapping keys that are…
- CVE-2026-48805 — Critical (CVSS 9.1): Twig is a template language for PHP. Prior to 3.27.0, deprecated internal wrappers in src/Resources/core.php do not…
All CVEs affecting Symfony Twig →
Other CWE-22 (Path Traversal) vulnerabilities
- CVE-2026-77312 — Critical (CVSS 10.0): Flyto2 Core is an execution kernel for automation and AI-agent workflows. Prior to 2.26.8, the earlier CVE-2026-67429…
- CVE-2026-121351 — Critical (CVSS 10.0): Adobe Connect is affected by an Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')…
- CVE-2026-121489 — Critical (CVSS 10.0): Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') vulnerability in Apache Juneau. The…
- CVE-2026-122013 — Critical (CVSS 10.0): A vulnerability was detected in Comfast CF-WR632AX 2.6.0.1. Affected by this vulnerability is an unknown functionality…
- CVE-2026-61738 — Critical (CVSS 10.0): SOCFortress CoPilot focuses on providing a single pane of glass for all your security operations needs. Prior to…
- CVE-2026-112690 — Critical (CVSS 10.0): This issue was addressed with improved input validation. This issue is fixed in iOS 26.7.2 and iPadOS 26.7.2, iOS 27.2…
Browse all CWE-22 (Path Traversal) vulnerabilities →
Threat intelligence
Threat-intel indicators referencing this CVE:
- 52.69.243.153 (ipv4-addr)
- 3.19.213.118 (ipv4-addr)
- 51.17.154.141 (ipv4-addr)
- 56.155.73.159 (ipv4-addr)
- 13.206.73.237 (ipv4-addr)