CVE-2026-142634: Laravel: Eloquent mass-assignment guard bypass via attribute-name normalization mismatch
Laravel is a web application framework. Prior to 13.43.0 and 12.73.0, Eloquent's $guarded protection can be bypassed with an alternate spelling of a guarded attribute name, such as a hyphen or whitespace variant of isadmin. 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. This issue is fixed in versions 13.43.0 and 12.73.0.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 13.43.0 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 12.73.0
Event History
Frequently Asked Questions
Which applications are actually exposed to this issue?
An application is affected only if a model relies on a $guarded blacklist, has a classic or Attribute-based set-mutator for a guarded attribute, and mass-assigns untrusted input, such as through $request->all(). Models without that combination are not described as affected.
What must an attacker be able to do?
The attacker needs to submit input that reaches a vulnerable mass-assignment operation on an affected model. They can use an alternate attribute spelling, including hyphen or whitespace variants, that bypasses the raw-key guard check but is normalized when the mutator is resolved.
What is the impact if exploitation succeeds?
A remote client may write attributes intended to be protected by $guarded, including role or privilege flags. Integrity is affected; the provided vector does not indicate confidentiality or availability impact.
What should be changed if an immediate framework upgrade is not possible?
Avoid mass-assigning untrusted input into models that meet the affected conditions, particularly uses of $request->all(). Review affected models for guarded attributes with set-mutators and ensure untrusted input cannot supply alternate spellings of those attribute names.
Which Laravel framework versions contain the fix?
The issue is fixed in Laravel framework versions 13.43.0 and 12.73.0. Versions prior to those releases are described as vulnerable.