CakePHP TwigView: Arbitrary file read via FileLoader::findTemplate()
Summary
The TwigView plugin for CakePHP is affected by a path traversal flaw (CWE-22) in FileLoader::findTemplate(). If un-validated user-controlled data reaches this function, an attacker can read arbitrary files from the server. The vulnerability requires that the application passes request input into template lookup, and the sources do not say which applications do this.
Affected
- cakephp/twig-view versions below 1.3.3
- cakephp/twig-view versions 2.0.0 up to 2.1.1
Fixed in
- Upgrade to 1.3.3 (1.x line)
- Upgrade to 2.1.2 (2.x line)
Workaround
Unknown. The vendor documents no workaround for unpatched installations; upgrading is the only documented remedy.
Exploitation
- No known exploitation in the wild as of 11 November 2026.
- Not listed in CISA KEV.
- VulDB reports no exploit exists; no public exploit code found in Metasploit or Exploit-DB.
Our recommendation
- Identify all Composer projects that require cakephp/twig-view, including transitive dependencies.
- Upgrade to 2.1.2 or 1.3.3. The same versions also fix GHSA-48qj-5wxh-m8hc (unserialize without class restriction); test apps that rely on object deserialization in templates.
- Check whether template names or paths come from request input and fix this regardless of version.
- Prioritise internet-facing PHP applications, as a file read can expose configuration files and credentials.
Public exploits
PoC-in-GitHub, Metasploit and Exploit-DB list nothing for this CVE.
Research sources
- GitHub Release TwigView 1.3.3 github.com
- GitHub Release TwigView 2.1.2 github.com
- GitHub Security Advisory GHSA-hq9r-72jq-2pxp github.com
- CVE Record CVE-2026-59191 www.cve.org
- VulDB CVE-2026-59191 vuldb.com
- OffSeq Radar CVE-2026-59191 radar.offseq.com
Researched and written up in English and German by an AI (Claude by Anthropic) based on NVD, CISA, EPSS and the sources listed. The vendor information is authoritative. Researched on 11 Nov 2026, 09:56.
Original description (NVD)
TwigView plugin for CakePHP provides wrappers for common View operations and extensions that expose CakePHP functions and jasny/twig-extensions helpers. Prior to versions 1.3.3 and 2.1.2, if FileLoader::findTemplate() is supplied un-validated user controlled data, arbitrary files can be read. This issue has been patched in versions 1.3.3 and 2.1.2.
Sources
The tracker combines official, freely usable data sources – updated continuously:
- NVD (NIST) – CVEs, rating (CVSS), affected products
- CISA KEV – vulnerabilities confirmed by CISA as actively exploited
- CISA Vulnrichment – CISA assessment (SSVC) in the official CVE record
- FIRST EPSS – probability of exploitation
- Microsoft MSRC – Patch Tuesday: vulnerabilities, severity, updates
- PoC-in-GitHub – public proof-of-concept repositories
- Metasploit (Rapid7) – modules of the Metasploit Framework
- Exploit-DB (OffSec) – archive of public exploits (links only)
- Patch days: official vendor pages (linked per vendor) (Vendor patch days)
This product uses data from the NVD API but is not endorsed or certified by the NVD. EPSS data © FIRST.org.
Affected? We can help.
We check whether your systems are affected, install updates and close the gap – continuously with the System Health Checker if you wish.
