High severityNVD Advisory· Published Jan 14, 2022· Updated Apr 22, 2025
Arbitrary code execution in october/system
CVE-2021-32650
Description
October CMS is a self-hosted content management system (CMS) platform based on the Laravel PHP Framework. Prior to versions 1.0.473 and 1.1.6, 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.The issue has been patched in Build 473 (v1.0.473) and v1.1.6. Those unable to upgrade may apply the patch to their installation manually as a workaround.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
october/systemPackagist | >= 1.1.0, < 1.1.6 | 1.1.6 |
october/systemPackagist | < 1.0.473 | 1.0.473 |
Affected products
1- Range: < 1.0.473
Patches
1167b592eed29Backport fixes from 2.0
2 files changed · +14 −2
modules/cms/controllers/Themes.php+8 −0 modified@@ -265,6 +265,10 @@ protected function makeExportFormWidget($theme) public function index_onLoadImportForm() { + if (\Cms\Helpers\Cms::safeModeEnabled()) { + throw new ApplicationException(trans('cms::lang.cms_object.safe_mode_enabled')); + } + $theme = $this->findThemeObject(); $this->vars['widget'] = $this->makeImportFormWidget($theme); $this->vars['themeDir'] = $theme->getDirName(); @@ -274,6 +278,10 @@ public function index_onLoadImportForm() public function index_onImport() { + if (\Cms\Helpers\Cms::safeModeEnabled()) { + throw new ApplicationException(trans('cms::lang.cms_object.safe_mode_enabled')); + } + $theme = $this->findThemeObject(); $widget = $this->makeImportFormWidget($theme);
modules/system/twig/SecurityPolicy.php+6 −2 modified@@ -18,18 +18,22 @@ final class SecurityPolicy implements SecurityPolicyInterface * @var array List of forbidden methods. */ protected $blockedMethods = [ - // \October\Rain\Extension\ExtendableTrait + // Prevent manipulating Twig itself + 'getTwig', + + // Prevent dynamic methods and props 'addDynamicMethod', 'addDynamicProperty', - // \October\Rain\Support\Traits\Emitter + // Prevent binding event logic 'bindEvent', 'bindEventOnce', // Eloquent & Halcyon data modification 'insert', 'update', 'delete', + 'write', ]; /**
Vulnerability mechanics
Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
4- github.com/advisories/GHSA-5hfj-r725-wpc4ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2021-32650ghsaADVISORY
- github.com/octobercms/october/commit/167b592eed291ae1563c8fcc5b9b34a03a300f26ghsax_refsource_MISCWEB
- github.com/octobercms/october/security/advisories/GHSA-5hfj-r725-wpc4ghsax_refsource_CONFIRMWEB
News mentions
0No linked articles in our index yet.