Skip to content

October Rain has a Twig Sandbox Bypass via Collection Methods

Moderate severity GitHub Reviewed Published Apr 14, 2026 in octobercms/october • Updated Apr 14, 2026

Package

composer october/rain (Composer)

Affected versions

>= 4.0.0, <= 4.1.4
<= 3.7.12

Patched versions

4.1.5
3.7.13

Description

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

References

@daftspunk daftspunk published to octobercms/october Apr 14, 2026
Published by the National Vulnerability Database Apr 14, 2026
Published to the GitHub Advisory Database Apr 14, 2026
Reviewed Apr 14, 2026
Last updated Apr 14, 2026

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
High
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N

EPSS score

Exploit Prediction Scoring System (EPSS)

This score estimates the probability of this vulnerability being exploited within the next 30 days. Data provided by FIRST.
(5th percentile)

Weaknesses

Improper Access Control

The product does not restrict or incorrectly restricts access to a resource from an unauthorized actor. Learn more on MITRE.

Protection Mechanism Failure

The product does not use or incorrectly uses a protection mechanism that provides sufficient defense against directed attacks against the product. Learn more on MITRE.

CVE ID

CVE-2026-22692

GHSA ID

GHSA-m5qg-jc75-4jp6

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.