CVE-2026-59191: TwigView FileLoader may allow arbitrary file reads through user-controlled template paths
Published 2026-11-24 · Updated 2026-11-24 · Also known as GHSA-hq9r-72jq-2pxp
Summary
The TwigView FileLoader in cakephp/twig-view allows arbitrary file reads when supplied with un-validated user-controlled template paths. Engineering and security teams using affected versions should update immediately.
Who is affected
Deployments utilizing cakephp/twig-view are affected if un-validated user-controlled data is passed to `FileLoader::findTemplate()`, such as through include and extends tags. This vulnerability allows attackers to achieve low confidentiality impact by reading arbitrary files on the server.
Exploitability
The vulnerability is network-exploitable with low complexity and requires no privileges or user interaction. The EPSS score is 0.005 and it is not present in the CISA Known Exploited Vulnerabilities catalog.
Remediation
- Upgrade cakephp/twig-view to version 1.3.3 or 2.1.2.
- Ensure user-controlled data is not supplied directly to include and extends tags as a workaround.
How to check your project
- Check composer.json or composer.lock for the presence of the package `cakephp/twig-view` within the affected version ranges (0 to <1.3.3 and 2.0.0 to <2.1.2).
Automated analysis of the published advisory data, generated 2026-11-24. Not human-reviewed; verify against the official advisory. How this works.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | Upgrade |
|---|---|---|---|---|
| Packagist | cakephp/twig-view |
>= 0, < 1.3.3 | 1.3.3 | composer require "cakephp/twig-view:>=1.3.3" |
| Packagist | cakephp/twig-view |
>= 2.0.0, < 2.1.2 | 2.1.2 | composer require "cakephp/twig-view:>=2.1.2" |
CVSS 4.0 vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N
| Attack vector | Network |
|---|---|
| Attack complexity | Low |
| Attack requirements | None |
| Privileges required | None |
| User interaction | None |
| Confidentiality (vulnerable system) | Low |
| Integrity (vulnerable system) | None |
| Availability (vulnerable system) | None |
| Confidentiality (subsequent systems) | None |
| Integrity (subsequent systems) | None |
| Availability (subsequent systems) | None |
Base score is not computed for CVSS 4.0 vectors; severity is taken from the advisory.
FAQ
What causes the arbitrary file read in TwigView?
The flaw occurs when `FileLoader::findTemplate()` receives un-validated user-controlled data, leading to path traversal issues (CWE-22).
Which versions of cakephp/twig-view are vulnerable?
Versions introduced from 0 before 1.3.3 and versions introduced from 2.0.0 before 2.1.2 are vulnerable.
Is there a workaround if I cannot upgrade immediately?
Yes, you can avoid supplying user-controlled data to `include` and `extends` tags.
Original advisory description
References
- WEB https://github.com/cakephp/twig-view/security/advisories/GHSA-hq9r-72jq-2pxp
- ADVISORY https://nvd.nist.gov/vuln/detail/CVE-2026-59191
- WEB https://github.com/cakephp/twig-view/commit/1c5107c9f562ab285273ceafd1c28bf314faa6d5
- WEB https://github.com/cakephp/twig-view/commit/65f5035ee65e76925242fdca2dc2bb0d732b6c1d
- PACKAGE https://github.com/cakephp/twig-view
- WEB https://github.com/cakephp/twig-view/releases/tag/1.3.3
- WEB https://github.com/cakephp/twig-view/releases/tag/2.1.2
Source records: GHSA-hq9r-72jq-2pxp (OSV.dev) · EPSS by FIRST, 2026-11-26.