CVE-2026-22692: October/rain October Rain Has A Twig Vulnerability

MODERATE
Advisory Identifier: GHSA-m5qg-jc75-4jp6
CVSS 4.9
CWE-284 CWE-693
Published
Advisory Summary

CVE-2026-22692 is a MODERATE (CVSS 4.9) october rain has a twig vulnerability (CWE-284: Improper Access Control) affecting October/rain libraries in the Packagist ecosystem. The issue involves october rain has a twig sandbox bypass via collection methods. Remediation is available by upgrading affected packages to version 4.1.5, 3.7.13.

CVE-2026-22692 at a Glance

CVE Identifier CVE-2026-22692
GHSA Identifier GHSA-m5qg-jc75-4jp6
Severity MODERATE
CVSS v3.1 Base Score 4.9
CWE Classification CWE-284: Improper Access Control
Affected Product October/rain
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 4.9

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required High (PR:H)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2026-22692

To remediate this vulnerability, upgrade all affected October/rain dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

october/rain fixed: 4.1.5
Upgrade october/rain to 4.1.5
october/rain fixed: 3.7.13
Upgrade october/rain to 3.7.13
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for october/rain

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-22692, inspect your project dependencies for October/rain:

inspect dependencies for october/rain

Analyze the terminal output to locate any version of October/rain in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.1.5), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-284: Improper Access Control, where the product does not restrict or incorrectly restricts access to a resource from an unauthorized actor. In October/rain, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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

CVE-2026-22692 Affected October/rain Versions

2 component(s)
Fixed Versions:
4.1.53.7.13
Product / Package Ecosystem Affected Versions Fixed Version
october/rain
Packagist
≥ 4.0.0
< 4.1.5
4.1.5
october/rain
Packagist
< 3.7.13
3.7.13

References

Frequently Asked Questions

What is CVE-2026-22692?
CVE-2026-22692 is a security vulnerability in October/rain involving October Rain has a Twig Sandbox Bypass via Collection Methods under CWE-284: Improper Access Control.
Which October/rain versions are affected?
Affected versions include releases prior to 4.1.5, 3.7.13 across affected packages: october/rain.
What version fixes CVE-2026-22692?
Upgrading to 4.1.5, 3.7.13 (or the latest patched release for your respective branch) resolves the vulnerability.
Is october/rain affected?
Yes, october/rain is affected in releases prior to 4.1.5, 3.7.13. Upgrade your dependency to 4.1.5, 3.7.13 or later.
What is the CVSS score of CVE-2026-22692?
CVE-2026-22692 has a CVSS v3.1 base score of 4.9 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2026-22692?
CVE-2026-22692 is classified under CWE-284: Improper Access Control (The product does not restrict or incorrectly restricts access to a resource from an unauthorized actor.).
How can I check Packagist dependencies for CVE-2026-22692?
Run the dependency tree command: 'inspect dependencies for october/rain'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-m5qg-jc75-4jp6",
  "modified" : "2026-04-14T20:02:05Z",
  "published" : "2026-04-14T20:02:05Z",
  "aliases" : [ "CVE-2026-22692" ],
  "summary" : "October Rain has a Twig Sandbox Bypass via Collection Methods",
  "details" : "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.\n\n### Impact\n- Bypass of Twig sandbox restrictions\n- Only affects installations with `CMS_SAFE_MODE` enabled (disabled by default)\n- Requires authenticated backend access with CMS template editing permissions\n\n### Patches\nThe 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.\n\n### Workarounds\nIf upgrading immediately is not possible:\n- Disable `CMS_SAFE_MODE` if untrusted template editing is not required\n- Restrict CMS template editing permissions to fully trusted administrators only\n\n### References\n- Reported by Łukasz Rybak",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "october/rain"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.0.0"
      }, {
        "fixed" : "4.1.5"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 4.1.4"
    }
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "october/rain"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.7.13"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 3.7.12"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/octobercms/october/security/advisories/GHSA-m5qg-jc75-4jp6"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-22692"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/octobercms/october"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-284", "CWE-693" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-04-14T20:02:05Z",
    "nvd_published_at" : "2026-04-14T17:16:28Z"
  }
}