CVE-2022-39261

HIGHCVSS 7.5/10EPSS 1.49%

Last modified

CVE-2022-39261 is a high-severity vulnerability rated 7.5/10 on the CVSS scale. 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. EPSS estimates a 1.49% chance of exploitation in the next 30 days.

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.

Metrics

CVSS 3.1
7.5/10

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

EPSS Probability
1.49%

70.8th percentile

Probability of exploitation in the next 30 days. Learn more

Weakness Enumeration

Affected Software

VendorProductVersions
SymfonyTwig>= 1.0.0, < 1.44.7
SymfonyTwig>= 2.0.0, < 2.15.3
SymfonyTwig>= 3.0.0, < 3.4.3
DrupalDrupal>= 8.0.0, < 9.3.22
DrupalDrupal>= 9.4.0, < 9.4.7
FedoraprojectFedora35
FedoraprojectFedora36
FedoraprojectFedora37
DebianDebian Linux10.0
DebianDebian Linux11.0

References

Timeline

Published
Last Modified
Status
Modified

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 score of 7.5/10 (HIGH severity). The EPSS model estimates a 1.49% probability of exploitation in the next 30 days.
How do I fix CVE-2022-39261?
Check the vendor references and advisories linked above for patched versions and mitigation guidance. You can also run a Strix scan to test if your systems are affected.

Are you affected by CVE-2022-39261?

Run a free Strix scan to check your systems for this vulnerability.

Scan your code now

Source: NVD / NIST