MEDIUM · CVSS 4.0 EPSS 0.6% · 44th percentile CWE-22

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

How to check your project

Automated analysis of the published advisory data, generated 2026-11-24. Not human-reviewed; verify against the official advisory. How this works.

Affected packages

EcosystemPackageAffected versionsFixed inUpgrade
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 vectorNetwork
Attack complexityLow
Attack requirementsNone
Privileges requiredNone
User interactionNone
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
### Impact If `FileLoader::findTemplate()` is supplied un-validated user controlled data, arbitrary files can be read. ### Patches 1.3.3 and 2.1.2 contain a fix for this issue. ### Workarounds Don't supply user controlled data to `include` and `extends` tags.

References

Source records: GHSA-hq9r-72jq-2pxp (OSV.dev) · EPSS by FIRST, 2026-11-26.