VYPR
High severity8.8NVD Advisory· Published Nov 1, 2017· Updated May 13, 2026

CVE-2017-16244

CVE-2017-16244

Description

Cross-Site Request Forgery exists in OctoberCMS 1.0.426 (aka Build 426) due to improper validation of CSRF tokens for postback handling, allowing an attacker to successfully take over the victim's account. The attack bypasses a protection mechanism involving X-CSRF headers and CSRF tokens via a certain _handler postback variable.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
october/octoberPackagist
< 1.0.4271.0.427

Affected products

1

Patches

1
4a6e0e1e0e2c

Implement CSRF token by default

https://github.com/octobercms/octoberSamuel GeorgesOct 29, 2017via ghsa
2 files changed · +30 1
  • config/cms.php+1 1 modified
    @@ -332,7 +332,7 @@
         |
         */
     
    -    'enableCsrfProtection' => false,
    +    'enableCsrfProtection' => true,
     
         /*
         |--------------------------------------------------------------------------
    
  • modules/cms/classes/Controller.php+29 0 modified
    @@ -337,6 +337,7 @@ public function runPage($page, $useAjax = true)
             if (
                 $useAjax &&
                 ($handler = post('_handler')) &&
    +            ($this->verifyCsrfToken()) &&
                 ($handlerResponse = $this->runAjaxHandler($handler)) &&
                 $handlerResponse !== true
             ) {
    @@ -1355,4 +1356,32 @@ protected function setComponentPropertiesFromParams($component, $parameters = []
                 }
             }
         }
    +
    +    //
    +    // Security
    +    //
    +
    +    /**
    +     * Checks the request data / headers for a valid CSRF token.
    +     * Returns false if a valid token is not found. Override this
    +     * method to disable the check.
    +     * @return bool
    +     */
    +    protected function verifyCsrfToken()
    +    {
    +        if (!Config::get('cms.enableCsrfProtection')) {
    +            return true;
    +        }
    +
    +        if (in_array(Request::method(), ['HEAD', 'GET', 'OPTIONS'])) {
    +            return true;
    +        }
    +
    +        $token = Request::input('_token') ?: Request::header('X-CSRF-TOKEN');
    +
    +        return hash_equals(
    +            Session::token(),
    +            $token
    +        );
    +    }
     }
    

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

5

News mentions

0

No linked articles in our index yet.