Broken Object Level Authorization

Broken Object Level Authorization in Laravel [Mar 2026] [CVE-2020-15246]

[Fixed Oct 2020] Updated CVE-2020-15246

Overview

CVE-2020-15246 describes a local file disclosure in October CMS (a Laravel-based platform). Versions 1.0.421 through 1.0.468 were affected, with patches in 1.0.469 and 1.1.0. The flaw is a Broken Object Level Authorization (CWE-863) issue where per-resource access checks were not enforced when retrieving a file, enabling attackers to read arbitrary local files by manipulating the resource identifier. This guide outlines how the vulnerability manifests in Laravel-style code and how to remediate it in real-world PHP/Laravel apps built on or similar to October CMS. In practical terms, an endpoint that fetches a file by an object ID may directly derive a file path from the object without validating that the current user is authorized to access that specific object. An attacker can craft requests that reference other users’ resources and unknowingly retrieve private files from the server. This is a classic BOLA scenario: the system grants access based on the resource ID without verifying per-object permissions, which in turn can expose sensitive data and configuration files. To fix this pattern in Laravel, enforce per-object authorization on every access path. Use Laravel policies or gates to validate that the authenticated user can view the requested resource before reading or streaming any file. Consider restricting file storage to a private disk, validating object ownership, and applying authorization at the controller level or via resource controllers. After upgrading, re-check all code paths that construct file paths from user-supplied identifiers and add tests that cover unauthorized access attempts. The CVE demonstrates why such per-object checks are essential for secure object access control in Laravel-based apps like October CMS.

Affected Versions

October CMS 1.0.421 through 1.0.468; patched in 1.0.469 and 1.1.0.

Code Fix Example

Laravel API Security Remediation
VULNERABLE
<?php
// VULNERABLE
public function showFile($id) {
    $att = Attachment::find($id);
    $path = storage_path('app/private/' . $att->path);
    return response()->download($path);
}

// FIX
public function showFile($id) {
    $att = Attachment::findOrFail($id);
    if (Gate::denies('view', $att)) {
        abort(403);
    }
    $path = storage_path('app/private/' . $att->path);
    return response()->download($path);
}

// Policy example (simplified)
class AttachmentPolicy {
    public function view($user, $attachment) {
        return $attachment->user_id === $user->id;
    }
}
?>

CVE References

Choose which optional cookies to allow. You can change this any time.