A sandbox bypass vulnerability was identified in the optional Twig safe mode feature (CMS_SAFE_MODE). Certain methods on the collect() helper were not properly restricted, allowing authenticated users with template editing permissions to bypass sandbox protections.
CMS_SAFE_MODE enabled (disabled by default)The vulnerability has been patched in v4.1.5 and v3.7.13. All users who have enabled safe mode are encouraged to upgrade to the latest patched version.
If upgrading immediately is not possible:
CMS_SAFE_MODE if untrusted template editing is not required{
"cwe_ids": [
"CWE-284",
"CWE-693"
],
"github_reviewed": true,
"github_reviewed_at": "2026-04-14T20:02:05Z",
"nvd_published_at": "2026-04-14T17:16:28Z",
"severity": "MODERATE"
}