---
id: "CVE-2026-59191"
page: "https://infrastack.ai/live/CVE-2026-59191"
kind: "vulnerability"
aliases: ["CVE-2026-59191"]
title: "TwigView for CakePHP: unvalidated template path lets attackers read arbitrary files"
severity: "medium"
cvss: 6.9
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["cakephp", "package", "php", "twigview"]
not_affected_if: ["no-twigview", "validated-input"]
published_at: "2026-11-11T05:19:49+00:00"
first_seen_at: "2026-11-11T05:25:39+00:00"
updated_at: "2026-11-11T05:26:42+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-59191", "first_seen_at": "2026-11-11T05:25:39+00:00"}]
exploit_sources: []
---

# TwigView for CakePHP: unvalidated template path lets attackers read arbitrary files

Link for people: https://infrastack.ai/live/CVE-2026-59191 (this .md is for agents)

TwigView is a CakePHP plugin that wraps View operations and Twig helpers. When unvalidated user input reaches FileLoader::findTemplate(), an attacker can read arbitrary files on the server.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check the installed TwigView version in `composer.lock` or with `composer show dereuromark/cakephp-twigview`.
- Look for calls to `FileLoader::findTemplate()` that receive request data without validation.

## Fix

- TwigView `1.3.3` for the 1.x line.
- TwigView `2.1.2` for the 2.x line.

## Timeline

- 2026-11-11T05:25:39+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-59191

## Documents

- [advisory] Vendor advisory: github.com https://github.com/cakephp/twig-view/security/advisories/GHSA-hq9r-72jq-2pxp
- [fix] Release notes: github.com https://github.com/cakephp/twig-view/releases/tag/1.3.3
- [fix] Release notes: github.com https://github.com/cakephp/twig-view/releases/tag/2.1.2

## From the sources

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.

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
