Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2022-39261— Twig may load a template outside a configured directory when using the filesystem loader

Quick assessment

Affected
twigphp Twig
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

Sensio Labs Twig是法国Sensio Labs公司的一个PHP模板引擎,它支持自定义标签和过滤器,并创建DSL。 Twig 1.44.7 版本之前的 1.x 版本、2.15.3 版本之前的 2.x 版本和 3.4.3 版本之前的 3.x 版本存在路径遍历漏洞,该漏洞源于使用特定命名空间时可以使用 source 和 include 从模板目录引用任意文件。

CVSS 7.5 · High EPSS 3.17% · P88

Possible ATT&CK Techniques 1 AI

T1083 · File and Directory Discovery
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2022-39261

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
Twig may load a template outside a configured directory when using the filesystem loader
Source: CVE Program / CVE List V5
Vulnerability 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.
Source: CVE Program / CVE List V5
CVSS Information
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Source: CVE Program / CVE List V5
Vulnerability Type
对路径名的限制不恰当(路径遍历)
Source: CVE Program / CVE List V5
Vulnerability Title
Sensio Labs Twig 路径遍历漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
Sensio Labs Twig是法国Sensio Labs公司的一个PHP模板引擎,它支持自定义标签和过滤器,并创建DSL。 Twig 1.44.7 版本之前的 1.x 版本、2.15.3 版本之前的 2.x 版本和 3.4.3 版本之前的 3.x 版本存在路径遍历漏洞,该漏洞源于使用特定命名空间时可以使用 source 和 include 从模板目录引用任意文件。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

Vendor Product Affected Versions CPE Subscribe
twigphp Twig => 1.0.0, < 1.44.7 -

II. Public POCs for CVE-2022-39261

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2022-39261

请登录查看更多情报信息。

Patches & Fixes for CVE-2022-39261 (1)

Vendor Advisories for CVE-2022-39261 (3)

Mailing List Discussions for CVE-2022-39261 (7)

IV. Related Vulnerabilities

V. Comments for CVE-2022-39261

No comments yet


Leave a comment