CVE-2021-32650: October/system October/system Arbitrary Code Execution Vulnerability

HIGH
Advisory Identifier: GHSA-5hfj-r725-wpc4
CVSS 8.8
CWE-94 CWE-74
Published
Advisory Summary

CVE-2021-32650 is a HIGH (CVSS 8.8) october/system arbitrary code execution vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting October/system libraries in the Packagist ecosystem. The issue involves october/system arbitrary code execution. Remediation is available by upgrading affected packages to version 1.1.6, 1.0.473.

CVE-2021-32650 at a Glance

CVE Identifier CVE-2021-32650
GHSA Identifier GHSA-5hfj-r725-wpc4
Severity HIGH
CVSS v3.1 Base Score 8.8
CWE Classification CWE-94: Improper Control of Generation of Code ('Code Injection')
Affected Product October/system
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 8.8

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

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

How to Fix CVE-2021-32650

To remediate this vulnerability, upgrade all affected October/system 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/system fixed: 1.1.6
Upgrade october/system to 1.1.6
october/system fixed: 1.0.473
Upgrade october/system to 1.0.473
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/system

How to Check if You Are Affected

To determine whether your application is affected by CVE-2021-32650, inspect your project dependencies for October/system:

inspect dependencies for october/system

Analyze the terminal output to locate any version of October/system in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.1.6), 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-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. In October/system, 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

### Impact Assuming an attacker with access to the backend is able to execute PHP code by using the theme import feature. This will bypass the safe mode feature that prevents PHP execution in the CMS templates. ### Patches Issue has been patched in Build 473 and v1.1.6 ### Workarounds Apply https://github.com/octobercms/october/commit/167b592eed291ae1563c8fcc5b9b34a03a300f26 to your installation manually if you are unable to upgrade. ### References Credits to: • Sushi Yushi ### For more information If you have any questions or comments about this advisory: * Email us at [hello@octobercms.com](mailto:hello@octobercms.com)

CVE-2021-32650 Affected October/system Versions

2 component(s)
Fixed Versions:
1.1.61.0.473
Product / Package Ecosystem Affected Versions Fixed Version
october/system
Packagist
≥ 1.1.0
< 1.1.6
1.1.6
october/system
Packagist
< 1.0.473
1.0.473

References

Frequently Asked Questions

What is CVE-2021-32650?
CVE-2021-32650 is a security vulnerability in October/system involving october/system arbitrary code execution under CWE-94: Improper Control of Generation of Code ('Code Injection').
Which October/system versions are affected?
Affected versions include releases prior to 1.1.6, 1.0.473 across affected packages: october/system.
What version fixes CVE-2021-32650?
Upgrading to 1.1.6, 1.0.473 (or the latest patched release for your respective branch) resolves the vulnerability.
Is october/system affected?
Yes, october/system is affected in releases prior to 1.1.6, 1.0.473. Upgrade your dependency to 1.1.6, 1.0.473 or later.
What is the CVSS score of CVE-2021-32650?
CVE-2021-32650 has a CVSS v3.1 base score of 8.8 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2021-32650?
CVE-2021-32650 is classified under CWE-94: Improper Control of Generation of Code ('Code Injection') (The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.).
How can I check Packagist dependencies for CVE-2021-32650?
Run the dependency tree command: 'inspect dependencies for october/system'. 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-5hfj-r725-wpc4",
  "modified" : "2022-08-11T16:55:36Z",
  "published" : "2022-01-14T21:08:26Z",
  "aliases" : [ "CVE-2021-32650" ],
  "summary" : "october/system arbitrary code execution",
  "details" : "### Impact\n\nAssuming an attacker with access to the backend is able to execute PHP code by using the theme import feature. This will bypass the safe mode feature that prevents PHP execution in the CMS templates.\n\n### Patches\n\nIssue has been patched in Build 473 and v1.1.6\n\n### Workarounds\n\nApply https://github.com/octobercms/october/commit/167b592eed291ae1563c8fcc5b9b34a03a300f26 to your installation manually if you are unable to upgrade.\n\n### References\n\nCredits to:\n• Sushi Yushi\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Email us at [hello@octobercms.com](mailto:hello@octobercms.com)\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "october/system"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.1.0"
      }, {
        "fixed" : "1.1.6"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "october/system"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.0.473"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/octobercms/october/security/advisories/GHSA-5hfj-r725-wpc4"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-32650"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/octobercms/october/commit/167b592eed291ae1563c8fcc5b9b34a03a300f26"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/octobercms/october"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-74", "CWE-94" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-01-14T20:47:55Z",
    "nvd_published_at" : "2022-01-14T15:15:00Z"
  }
}