NewApp Monitoring is liveSign up free
AgentbeamBeta
Open-source package vulnerability · Composer (PHP)

CVE-2026-22692: October Rain has a Twig Sandbox Bypass via Collection Methods

mediumCVSS 3.1 4.9GHSA-m5qg-jc75-4jp6

A sandbox bypass vulnerability was identified in the optional Twig safe mode feature (CMSSAFEMODE). Certain methods on the collect() helper were not properly restricted, allowing authenticated users with template editing permissions to bypass sandbox protections.

Published Apr 14, 2026

Affected packages

october/rain

Ecosystem
Composer (PHP)
Affected
>= 4.0.0, <= 4.1.4
Fixed in
4.1.5
Check
composer show october/rain

october/rain

Ecosystem
Composer (PHP)
Affected
<= 3.7.12
Fixed in
3.7.13
Check
composer show october/rain

Advisory details

From the GitHub Advisory Database (CC BY 4.0).

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.

Impact

  • Bypass of Twig sandbox restrictions
  • Only affects installations with CMS_SAFE_MODE enabled (disabled by default)
  • Requires authenticated backend access with CMS template editing permissions

Patches

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.

Workarounds

If upgrading immediately is not possible:

  • Disable CMS_SAFE_MODE if untrusted template editing is not required
  • Restrict CMS template editing permissions to fully trusted administrators only

References

  • Reported by Łukasz Rybak

Credited to lukasz-rybak, daftspunk.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology

More Composer (PHP) vulnerabilities

All Composer (PHP) entries