PT-2024-40156 · Twig · Twig

Published

2024-05-30

·

Updated

2024-05-30

CVSS v3.1

5.3

Medium

VectorAV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
Name of the Vulnerable Software and Affected Versions: Twig (affected versions not specified)
Description: The issue allows for path traversal when Twig is used with Twig Loader Filesystem for loading templates and the application uses non-trusted template names. This enables an attacker to access files in a parent directory of the configured path by prepending /../ to the path in an include statement, such as {% include "/../somefile in path to" %}. Other variations like ../somefile, /../../somefile, or ../../somefile will not work and will result in an exception.
Recommendations: At the moment, there is no information about a newer version that contains a fix for this vulnerability.

Path traversal

Weakness Enumeration

Related Identifiers

GHSA-7CVR-XHM5-X998

Affected Products

Twig