VYPR
Moderate severityNVD Advisory· Published Jun 3, 2020· Updated Aug 4, 2024

Local File read vulnerability in OctoberCMS

CVE-2020-5295

Description

In OctoberCMS (october/october composer package) versions from 1.0.319 and before 1.0.466, an attacker can exploit this vulnerability to read local files of an October CMS server. The vulnerability is only exploitable by an authenticated backend user with the cms.manage_assets permission. Issue has been patched in Build 466 (v1.0.466).

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
october/cmsPackagist
>= 1.0.319, < 1.0.4661.0.466

Affected products

1

Patches

1
2b8939cc8b5b

Improve asset file path handling

https://github.com/octobercms/octoberLuke TowersMar 31, 2020via ghsa
1 file changed · +8 1
  • modules/cms/classes/Asset.php+8 1 modified
    @@ -285,7 +285,14 @@ public function getFilePath($fileName = null)
                 $fileName = $this->fileName;
             }
     
    -        return $this->theme->getPath().'/'.$this->dirName.'/'.$fileName;
    +        // Limit paths to those under the assets directory
    +        $directory = $this->theme->getPath() . '/' . $this->dirName . '/';
    +        $path = realpath($directory . $fileName);
    +        if (!starts_with($path, $directory)) {
    +            return false;
    +        }
    +
    +        return $path;
         }
     
         /**
    

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

6

News mentions

0

No linked articles in our index yet.