Executive brief
A vulnerability in the python-liquid template engine allows unauthorized access to sensitive files on the server. By providing a specific file path, a template author can bypass security restrictions to read and display files that should be private, such as configuration files or system data. This could lead to the exposure of confidential information if the application allows users to provide or modify templates.
Technical details
A path traversal vulnerability exists in python-liquid's FileSystemLoader and CachingFileSystemLoader components. The vulnerability arises because the 'resolve_path' method does not properly validate absolute paths, allowing them to escape the defined search path. An attacker with the ability to author or influence Liquid templates can use the '{% include %}' or '{% render %}' tags with an absolute path to read any file on the filesystem that the application process has permissions to access, provided the file contains valid Liquid markup. This issue is resolved in version 2.2.0 by explicitly checking for and rejecting absolute paths during template resolution.
Affected products
- jg-rp python-liquid < 2.2.0
Timeline
- 2026-05-11: advisory: GitHub Advisory published
- 2026-05-28: disclosed: NVD publication date
- 2026-05-06: patched: Fix released in version 2.2.0