Craft CMS Potential Remote Code Execution via Twig SSTI
Impact
Note that users must have administrator access to the Craft Control Panel, and allowAdminChanges must be enabled for this to work, which is against Craft CMS' recommendations for any non-dev environment.
Source excerpt · OSVNote that users must have administrator access to the Craft Control Panel, and allowAdminChanges must be enabled for this to work, which is against Craft CMS' recommendations for any non-dev environment.
Affected packages
Start with the recorded fix for your release branch. Check your installed version and test compatibility before upgrading. Fixing this advisory does not rule out other vulnerabilities in the release.
| Affected range | Recorded fix |
|---|---|
| From 4.0.0-RC1 before 4.16.6Ecosystem versions | 4.16.6 |
| From 5.0.0-RC1 before 5.8.7Ecosystem versions | 5.8.7 |
Version evidence: OSV · GHSA-crcq-738g-pqvc
View original version evidence (339 explicit versions)
Original source description
Note that users must have administrator access to the Craft Control Panel, and allowAdminChanges must be enabled for this to work, which is against Craft CMS' recommendations for any non-dev environment.
https://craftcms.com/knowledge-base/securing-craft#set-allowAdminChanges-to-false-in-production
Note: This is a follow-up to GHSA-f3cw-hg6r-chfv
Users should update to the patched versions (4.16.6 and 5.8.7) to mitigate the issue.
Resources: https://github.com/craftcms/cms/pull/17612
References
- Security advisory github.com/craftcms/cms/security/advisories/GHSA-crcq-738g-pqvc
- Security advisory github.com/craftcms/cms/security/advisories/GHSA-f3cw-hg6r-chfv
- Security advisory nvd.nist.gov/vuln/detail/CVE-2025-57811
- Patch github.com/craftcms/cms/pull/17612
- Patch github.com/craftcms/cms/commit/e77f8a287dcdda41f1724f525d03542f18566cbc
- Source reference github.com/craftcms/cms