VulnWatch by ve1ve2
medium 5.3

GHSA-6pxv-c29g-cc5h: Eloquent mass-assignment guard bypass via attribute-name normalization mismatch

Source:
Laravel framework releases (GitHub laravel/framework)
Published:
Fetched:
Updated:
Affects:
laravel laravel/framework

https://github.com/laravel/framework/security/advisories/GHSA-6pxv-c29g-cc5h ↗

repo-advisorycomposersecurityrepo:laravel/framework

Eloquent mass-assignment guard bypass via attribute-name normalization mismatch ### Impact Eloquent's `$guarded` protection can be bypassed with an alternate spelling of a guarded attribute name, such as a hyphen or whitespace variant of `is_admin`. The guard check compared the raw key, while set-mutator resolution normalized it with `Str::studly()` or `Str::camel()`. Applications are affected when a model uses a `$guarded` blacklist, defines a set-mutator (classic or `Attribute`-based) on a guarded attribute, and mass-assigns untrusted input such as `$request->all()`. A remote client could then write protected attributes such as role or privilege flags. ### Patches A fix has been merged to the 12.x branch in https://github.com/laravel/framework/pull/62499. It normalizes keys before comparing them against the guarded list. Affected packages: composer:laravel/framework Patched: laravel/framework >=13.43.0, laravel/framework >=12.73.0

Linked vulnerabilities (1)

CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:N

Eloquent mass-assignment guard bypass via attribute-name normalization mismatch