Cakephp twig-view unserialize Twig filter allows arbitrary object deserializationGHSA-48qj-5wxh-m8hc
Fix: cakephp/twig-view#119GHSA-48qj-5wxh-m8hc is a Deserialization of Untrusted Data vulnerability in cakephp/twig-view. A fix is available for cakephp/twig-view — see the affected versions and patch details below.
Exploitation Status
No confirmed exploitation observed yet
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for GHSA-48qj-5wxh-m8hc.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
Real-World Exposure
cakephp/twig-view🐘cakephp/twig-viewReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Packagist packages — download data is not available via public APIs for these ecosystems.
Description
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, the unserialize filter has no restriction on which classes are allowed. This can used as a deserialization remote-code-execution gadget. This issue has been patched in versions 1.3.3 and 2.1.2.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐘Packagist | cakephp/twig-view | all versions | 1.3.3composer require cakephp/twig-view:^1.3.3 |
| 🐘Packagist | cakephp/twig-view | ≥ 2.0.0&&< 2.1.2 | 2.1.2composer require cakephp/twig-view:^2.1.2 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for cakephp/twig-view, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update cakephp/twig-view to 1.3.3 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-48qj-5wxh-m8hc is resolved across your whole dependency graph.
Workarounds
Do not deserialise data from untrusted sources: where the format allows it, restrict deserialisation to an explicit allowlist of expected types, and prefer a data-only format (JSON, Protobuf) over one that can reconstruct arbitrary objects until you can upgrade.
Frequently Asked Questions
Is GHSA-48qj-5wxh-m8hc in your dependencies?
Find it across Packagist, including transitive dependencies.