CVE-2021-21264: October CMS - Template Injection
- Cve: CVE-2021-21264
- Name: October CMS - Template Injection
- Description: October is a free, open-source, self-hosted CMS platform based on the Laravel PHP Framework. A bypass of CVE-2020-26231 (fixed in 1.0.470/471 and 1.1.1) was discovered that has the same impact as CVE-2020-26231 & CVE-2020-15247. An authenticated backend user with the `cms.manage_pages`, `cms.manage_layouts`, or `cms.manage_partials` permissions who would **normally** not be permitted to provide PHP code to be executed by the CMS due to `cms.enableSafeMode` being enabled is able to write specific Twig code to escape the Twig sandbox and execute arbitrary PHP. This is not a problem for anyone that trusts their users with those permissions to normally write & manage PHP within the CMS by not having `cms.enableSafeMode` enabled, but would be a problem for anyone relying on `cms.enableSafeMode` to ensure that users with those permissions in production do not have access to write & execute arbitrary PHP. Issue has been patched in Build 472 (v1.0.472) and v1.1.2. As a workaround, apply https://github.com/octobercms/october/commit/f63519ff1e8d375df30deba63156a2fc97aa9ee7 to your installation manually if unable to upgrade to Build 472 or v1.1.2.
- Impact: Authenticated users can execute arbitrary PHP code, leading to remote code execution and full system compromise.
- Remediation: Update to Build 472 (v1.0.472) or v1.1.2, or manually apply the provided patch if upgrade is not possible.
- Vulnerability type: template_injection
- Vulnerability impact: remote_code_execution
- Requirement type: logged_in
- Requirements: Attacker must be an authenticated backend user with specific permissions and `cms.enableSafeMode` enabled.
- Labels source: projectdiscovery
- Severity: medium
- Cvss score: 5.2
- Cvss vector: CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:L
- Epss score: 0.00265
- Epss percentile: 0.18345
- Assignee: [email protected]
- Published at: 2021-05-03T16:15:07Z
- Age in days: 2031
- Modified at: 2026-06-17T03:35:09Z
- Patch available: yes
- References total: 1
- Products total: 1
- Oss: yes
- Projects total: 1
- Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2021-21264
- Nvd status: modified
- Checked, none or zero: known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, rejected by nvd
- Not known: hackerone
Cwe
| Id | Name |
|---|---|
| CWE-862 | Missing Authorization |
| NVD-CWE-Other | — |
References
| Url | Source | Tags |
|---|---|---|
| https://github.com/octobercms/october/security/advisories/GHSA-fcr8-6q7r-m4wg | nvd | Patch, Third Party Advisory |
Products
| Product | Affected | Platform bound | Sources | Url |
|---|---|---|---|---|
| octobercms:october | >= 1.1.0, <= 1.1.1; <= 1.0.471 | no | nvd | /v1/products/octobercms/october |
Projects
| Repository | Link kinds | Indexed | Url |
|---|---|---|---|
| octobercms/october | fix, package, security_advisory | yes | /v1/repositories/octobercms/october |
Index
- Checked, none or zero: repositories, repositories high signal, packages
Exploitation
- Authentication required: yes
- Exposed hosts: 264
- Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access, remote
- Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since, hackerone reports