Advisory Database
  • Advisories
  • Dependency Scanning
  1. composer
  2. ›
  3. craftcms/cms
  4. ›
  5. CVE-2025-57811

CVE-2025-57811: Craft CMS Potential Remote Code Execution via Twig SSTI

August 25, 2025 (updated November 27, 2025)

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

  • github.com/advisories/GHSA-crcq-738g-pqvc
  • github.com/craftcms/cms
  • github.com/craftcms/cms/commit/e77f8a287dcdda41f1724f525d03542f18566cbc
  • github.com/craftcms/cms/pull/17612
  • github.com/craftcms/cms/security/advisories/GHSA-crcq-738g-pqvc
  • github.com/craftcms/cms/security/advisories/GHSA-f3cw-hg6r-chfv
  • nvd.nist.gov/vuln/detail/CVE-2025-57811

Code Behaviors & Features

Detect and mitigate CVE-2025-57811 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 4.0.0-RC1 before 4.16.6, all versions starting from 5.0.0-RC1 before 5.8.7

Fixed versions

  • 4.16.6
  • 5.8.7

Solution

Upgrade to versions 4.16.6, 5.8.7 or above.

Impact 7.2 HIGH

CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine
  • CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
  • CWE-94: Improper Control of Generation of Code ('Code Injection')

Source file

packagist/craftcms/cms/CVE-2025-57811.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Fri, 05 Dec 2025 12:20:50 +0000.