Laravel: Eloquent mass-assignment guard bypass via attribute-name normalization mismatch
Package Affected versions Patched versions Description Impact Eloquent's $guarded protection can be bypassed with an alternate spelling of a guarded attribute name, such as a hyphen or whitespace vari
Package
laravel/framework (Composer)Affected versions
>= 13.0.0, < 13.43.0 < 12.73.0Patched versions
13.43.0 12.73.0Description
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 laravel/framework#62499. It normalizes keys before comparing them against the guarded list.
References
- GHSA-6pxv-c29g-cc5h
- https://nvd.nist.gov/vuln/detail/CVE-2026-142634
- laravel/framework#62499
- laravel/framework@4b27e94
- https://github.com/laravel/framework/releases/tag/v12.73.0
- https://github.com/laravel/framework/releases/tag/v13.43.0
Severity
Moderate CVSS overall score This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS). / 10CVSS v3 base metrics
Attack vector Network Attack complexity High Privileges required Low User interaction None Scope Unchanged Confidentiality None Integrity High Availability None CVSS v3 base metrics Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability. Attack complexity: More severe for the least complex attacks. Privileges required: More severe if no privileges are required. User interaction: More severe when no user interaction is required. Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope. Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user. Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user. Availability: More severe when the loss of impacted component availability is highest. CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:NEPSS score
Weaknesses
Weakness CWE-915Improperly Controlled Modification of Dynamically-Determined Object Attributes
The product receives input from an upstream component that specifies multiple attributes, properties, or fields that are to be initialized or updated in an object, but it does not properly control which attributes can be modified. Learn more on MITRE.CVE ID
CVE-2026-142634GHSA ID
GHSA-6pxv-c29g-cc5hSource code
laravel/framework Loading Checking historyUh oh!
There was an error while loading. Please reload this page.
See something to contribute? Suggest improvements for this vulnerability.