VYPR
High severityNVD Advisory· Published Jan 14, 2022· Updated Apr 23, 2025

Authenticated file write leads to remote code execution in october/system

CVE-2021-32649

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 "create, modify and delete website pages" privileges in the backend is able to execute PHP code by running specially crafted Twig code in the template markup. 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.

PackageAffected versionsPatched versions
october/systemPackagist
>= 1.1.0, < 1.1.61.1.6
october/systemPackagist
< 1.0.4731.0.473

Affected products

1

Patches

1
167b592eed29

Backport fixes from 2.0

https://github.com/octobercms/octoberSamuel GeorgesMay 29, 2021via ghsa
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

News mentions

0

No linked articles in our index yet.