CVE-2022-39261
Twig Filesystem Loader Template Name Validation Bypass
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.
INFO
Published Date :
Sept. 28, 2022, 2:15 p.m.
Last Modified :
Nov. 21, 2024, 7:17 a.m.
Source :
[email protected]
Remotely Exploitable :
Yes !
Impact Score :
3.6
Exploitability Score :
3.9
Public PoC/Exploit Available at Github
CVE-2022-39261 has a 1 public PoC/Exploit
available at Github.
Go to the Public Exploits
tab to see the list.
Affected Products
The following products are affected by CVE-2022-39261
vulnerability.
Even if cvefeed.io
is aware of the exact versions of the
products
that
are
affected, the information is not represented in the table below.
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2022-39261
.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
Github Advisory Scanner
audit npm packagist security
PHP
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2022-39261
vulnerability anywhere in the article.
- Cybersecurity News
CVE-2024-45411: Twig Sandbox Bypass Vulnerability Puts PHP Applications at Risk
A critical security vulnerability has been discovered in Twig, a widely used PHP template engine, potentially allowing attackers to bypass sandbox restrictions and execute malicious code. The vulnerab ... Read more
The following table lists the changes that have been made to the
CVE-2022-39261
vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
CVE Modified by af854a3a-2127-422b-91ae-364da2661108
Nov. 21, 2024
Action Type Old Value New Value Added Reference https://github.com/twigphp/Twig/commit/35f3035c5deb0041da7b84daf02dea074ddc7a0b Added Reference https://github.com/twigphp/Twig/security/advisories/GHSA-52m2-vc4m-jj33 Added Reference https://lists.debian.org/debian-lts-announce/2022/10/msg00016.html Added Reference https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/2OKRUHPVLIQVFPPJ2UWC3WV3WQO763NR/ Added Reference https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/AUVTXMNPSZAHS3DWZEM56V5W4NPVR6L7/ Added Reference https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/NWRFPZSR74SYVJKBTKTMYUK36IJ3SQJP/ Added Reference https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/TW53TFJ6WWNXMUHOFACKATJTS7NIHVQE/ Added Reference https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/WV5TNNJLGG536TJH6DLCIAAZZIPV2GUD/ Added Reference https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/YU4ZYX62H2NUAKKGUES4RZIM4KMTKZ7F/ Added Reference https://www.debian.org/security/2022/dsa-5248 Added Reference https://www.drupal.org/sa-core-2022-016 -
CVE Modified by [email protected]
May. 14, 2024
Action Type Old Value New Value -
CVE Modified by [email protected]
Nov. 07, 2023
Action Type Old Value New Value Added Reference GitHub, Inc. https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/AUVTXMNPSZAHS3DWZEM56V5W4NPVR6L7/ [No types assigned] Added Reference GitHub, Inc. https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/2OKRUHPVLIQVFPPJ2UWC3WV3WQO763NR/ [No types assigned] Added Reference GitHub, Inc. https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/YU4ZYX62H2NUAKKGUES4RZIM4KMTKZ7F/ [No types assigned] Added Reference GitHub, Inc. https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/NWRFPZSR74SYVJKBTKTMYUK36IJ3SQJP/ [No types assigned] Added Reference GitHub, Inc. https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/TW53TFJ6WWNXMUHOFACKATJTS7NIHVQE/ [No types assigned] Added Reference GitHub, Inc. https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/WV5TNNJLGG536TJH6DLCIAAZZIPV2GUD/ [No types assigned] Removed Reference GitHub, Inc. https://lists.fedoraproject.org/archives/list/[email protected]/message/2OKRUHPVLIQVFPPJ2UWC3WV3WQO763NR/ Removed Reference GitHub, Inc. https://lists.fedoraproject.org/archives/list/[email protected]/message/AUVTXMNPSZAHS3DWZEM56V5W4NPVR6L7/ Removed Reference GitHub, Inc. https://lists.fedoraproject.org/archives/list/[email protected]/message/NWRFPZSR74SYVJKBTKTMYUK36IJ3SQJP/ Removed Reference GitHub, Inc. https://lists.fedoraproject.org/archives/list/[email protected]/message/YU4ZYX62H2NUAKKGUES4RZIM4KMTKZ7F/ Removed Reference GitHub, Inc. https://lists.fedoraproject.org/archives/list/[email protected]/message/TW53TFJ6WWNXMUHOFACKATJTS7NIHVQE/ Removed Reference GitHub, Inc. https://lists.fedoraproject.org/archives/list/[email protected]/message/WV5TNNJLGG536TJH6DLCIAAZZIPV2GUD/ -
Modified Analysis by [email protected]
Nov. 21, 2022
Action Type Old Value New Value Changed Reference Type https://lists.debian.org/debian-lts-announce/2022/10/msg00016.html No Types Assigned https://lists.debian.org/debian-lts-announce/2022/10/msg00016.html Mailing List, Third Party Advisory Changed Reference Type https://lists.fedoraproject.org/archives/list/[email protected]/message/2OKRUHPVLIQVFPPJ2UWC3WV3WQO763NR/ No Types Assigned https://lists.fedoraproject.org/archives/list/[email protected]/message/2OKRUHPVLIQVFPPJ2UWC3WV3WQO763NR/ Mailing List, Third Party Advisory Changed Reference Type https://lists.fedoraproject.org/archives/list/[email protected]/message/AUVTXMNPSZAHS3DWZEM56V5W4NPVR6L7/ No Types Assigned https://lists.fedoraproject.org/archives/list/[email protected]/message/AUVTXMNPSZAHS3DWZEM56V5W4NPVR6L7/ Mailing List, Third Party Advisory Changed Reference Type https://lists.fedoraproject.org/archives/list/[email protected]/message/NWRFPZSR74SYVJKBTKTMYUK36IJ3SQJP/ No Types Assigned https://lists.fedoraproject.org/archives/list/[email protected]/message/NWRFPZSR74SYVJKBTKTMYUK36IJ3SQJP/ Mailing List, Third Party Advisory Changed Reference Type https://lists.fedoraproject.org/archives/list/[email protected]/message/TW53TFJ6WWNXMUHOFACKATJTS7NIHVQE/ No Types Assigned https://lists.fedoraproject.org/archives/list/[email protected]/message/TW53TFJ6WWNXMUHOFACKATJTS7NIHVQE/ Mailing List, Third Party Advisory Changed Reference Type https://lists.fedoraproject.org/archives/list/[email protected]/message/WV5TNNJLGG536TJH6DLCIAAZZIPV2GUD/ No Types Assigned https://lists.fedoraproject.org/archives/list/[email protected]/message/WV5TNNJLGG536TJH6DLCIAAZZIPV2GUD/ Mailing List, Third Party Advisory Changed Reference Type https://lists.fedoraproject.org/archives/list/[email protected]/message/YU4ZYX62H2NUAKKGUES4RZIM4KMTKZ7F/ No Types Assigned https://lists.fedoraproject.org/archives/list/[email protected]/message/YU4ZYX62H2NUAKKGUES4RZIM4KMTKZ7F/ Mailing List, Third Party Advisory Changed Reference Type https://www.debian.org/security/2022/dsa-5248 No Types Assigned https://www.debian.org/security/2022/dsa-5248 Third Party Advisory Added CWE NIST CWE-22 Added CPE Configuration OR *cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:* *cpe:2.3:o:fedoraproject:fedora:36:*:*:*:*:*:*:* *cpe:2.3:o:fedoraproject:fedora:37:*:*:*:*:*:*:* Added CPE Configuration OR *cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:* *cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:* -
CVE Modified by [email protected]
Nov. 14, 2022
Action Type Old Value New Value Added Reference https://lists.fedoraproject.org/archives/list/[email protected]/message/TW53TFJ6WWNXMUHOFACKATJTS7NIHVQE/ [No Types Assigned] Added Reference https://lists.fedoraproject.org/archives/list/[email protected]/message/WV5TNNJLGG536TJH6DLCIAAZZIPV2GUD/ [No Types Assigned] -
CVE Modified by [email protected]
Oct. 11, 2022
Action Type Old Value New Value Added Reference https://lists.debian.org/debian-lts-announce/2022/10/msg00016.html [No Types Assigned] -
CVE Modified by [email protected]
Oct. 07, 2022
Action Type Old Value New Value Added Reference https://lists.fedoraproject.org/archives/list/[email protected]/message/NWRFPZSR74SYVJKBTKTMYUK36IJ3SQJP/ [No Types Assigned] Added Reference https://lists.fedoraproject.org/archives/list/[email protected]/message/YU4ZYX62H2NUAKKGUES4RZIM4KMTKZ7F/ [No Types Assigned] -
CVE Modified by [email protected]
Oct. 07, 2022
Action Type Old Value New Value Added Reference https://lists.fedoraproject.org/archives/list/[email protected]/message/2OKRUHPVLIQVFPPJ2UWC3WV3WQO763NR/ [No Types Assigned] Added Reference https://lists.fedoraproject.org/archives/list/[email protected]/message/AUVTXMNPSZAHS3DWZEM56V5W4NPVR6L7/ [No Types Assigned] -
CVE Modified by [email protected]
Oct. 06, 2022
Action Type Old Value New Value Added Reference https://www.debian.org/security/2022/dsa-5248 [No Types Assigned] -
Initial Analysis by [email protected]
Sep. 30, 2022
Action Type Old Value New Value Added CVSS V3.1 NIST AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N Changed Reference Type https://github.com/twigphp/Twig/commit/35f3035c5deb0041da7b84daf02dea074ddc7a0b No Types Assigned https://github.com/twigphp/Twig/commit/35f3035c5deb0041da7b84daf02dea074ddc7a0b Patch, Third Party Advisory Changed Reference Type https://github.com/twigphp/Twig/security/advisories/GHSA-52m2-vc4m-jj33 No Types Assigned https://github.com/twigphp/Twig/security/advisories/GHSA-52m2-vc4m-jj33 Third Party Advisory Changed Reference Type https://www.drupal.org/sa-core-2022-016 No Types Assigned https://www.drupal.org/sa-core-2022-016 Patch, Third Party Advisory Added CPE Configuration OR *cpe:2.3:a:symfony:twig:*:*:*:*:*:*:*:* versions from (including) 1.0.0 up to (excluding) 1.44.7 *cpe:2.3:a:symfony:twig:*:*:*:*:*:*:*:* versions from (including) 2.0.0 up to (excluding) 2.15.3 *cpe:2.3:a:symfony:twig:*:*:*:*:*:*:*:* versions from (including) 3.0.0 up to (excluding) 3.4.3 Added CPE Configuration OR *cpe:2.3:a:drupal:drupal:*:*:*:*:*:*:*:* versions from (including) 8.0.0 up to (excluding) 9.3.22 *cpe:2.3:a:drupal:drupal:*:*:*:*:*:*:*:* versions from (including) 9.4.0 up to (excluding) 9.4.7 -
CVE Modified by [email protected]
Sep. 28, 2022
Action Type Old Value New Value Added Reference https://www.drupal.org/sa-core-2022-016 [No Types Assigned]
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2022-39261
is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2022-39261
weaknesses.
Exploit Prediction
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days.
0.20 }} -0.13%
score
0.57618
percentile