CVE-2026-59191: Cakephp/twig view TwigView FileLoader May Allow Arbitrary Vulnerability
MODERATECVE-2026-59191 is a MODERATE twigview fileloader may allow arbitrary vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Cakephp/twig view libraries in the Packagist ecosystem. The issue involves twigview fileloader may allow arbitrary file reads through user-controlled template paths. Remediation is available by upgrading affected packages to version 1.3.3, 2.1.2.
CVE-2026-59191 at a Glance
How to Fix CVE-2026-59191
To remediate this vulnerability, upgrade all affected Cakephp/twig view dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade cakephp/twig-view to 1.3.3
Upgrade cakephp/twig-view to 2.1.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for cakephp/twig-view
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-59191, inspect your project dependencies for Cakephp/twig view:
inspect dependencies for cakephp/twig-view
Analyze the terminal output to locate any version of Cakephp/twig view in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.3.3), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In Cakephp/twig view, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-59191 Affected Cakephp/twig view Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
cakephp/twig-view
|
Packagist |
< 1.3.3
|
1.3.3
|
|
cakephp/twig-view
|
Packagist |
≥ 2.0.0
< 2.1.2
|
2.1.2
|
References
Frequently Asked Questions
What is CVE-2026-59191?
Which Cakephp/twig view versions are affected?
What version fixes CVE-2026-59191?
Is cakephp/twig-view affected?
What CWE is associated with CVE-2026-59191?
How can I check Packagist dependencies for CVE-2026-59191?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-hq9r-72jq-2pxp",
"modified" : "2026-11-24T22:39:23Z",
"published" : "2026-11-24T22:39:23Z",
"aliases" : [ "CVE-2026-59191" ],
"summary" : "TwigView FileLoader may allow arbitrary file reads through user-controlled template paths",
"details" : "### Impact\nIf `FileLoader::findTemplate()` is supplied un-validated user controlled data, arbitrary files can be read.\n\n### Patches\n1.3.3 and 2.1.2 contain a fix for this issue.\n\n### Workarounds\nDon't supply user controlled data to `include` and `extends` tags.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "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"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "cakephp/twig-view"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.3.3"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "cakephp/twig-view"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.0.0"
}, {
"fixed" : "2.1.2"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/cakephp/twig-view/security/advisories/GHSA-hq9r-72jq-2pxp"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-59191"
}, {
"type" : "WEB",
"url" : "https://github.com/cakephp/twig-view/commit/1c5107c9f562ab285273ceafd1c28bf314faa6d5"
}, {
"type" : "WEB",
"url" : "https://github.com/cakephp/twig-view/commit/65f5035ee65e76925242fdca2dc2bb0d732b6c1d"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/cakephp/twig-view"
}, {
"type" : "WEB",
"url" : "https://github.com/cakephp/twig-view/releases/tag/1.3.3"
}, {
"type" : "WEB",
"url" : "https://github.com/cakephp/twig-view/releases/tag/2.1.2"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-11-24T22:39:23Z",
"nvd_published_at" : "2026-11-11T05:19:49Z"
}
}