Laravel Guard bypass in Eloquent models
In laravel releases before 6.18.34 and 7.23.2. It was possible to mass assign Eloquent attributes that included the model's table name:
$model->fill(['users.name' => 'Taylor']);
When doing so, Eloquent would remove the table name from the attribute for you. This was a "convenience" feature of Eloquent and was not documented.
However, when paired with validation, this can lead to unexpected and unvalidated values being saved to the database. For this reason, we have removed the automatic stripping of table names from mass-asignment operations so that the attributes go through the typical "fillable" / "guarded" logic. Any attributes containing table names that are not explicitly declared as fillable will be discarded.
This security release will be a breaking change for applications that were relying on the undocumented table name stripping during mass assignment. Since this feature was relatively unknown and undocumented, we expect the vast majority of Laravel applications to be able to upgrade without issues.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| Composer package | laravel/framework | >= 5.5.0, <= 5.5.49, >= 6.0.0, < 6.18.34, >= 7.0.0, < 7.23.2 | 6.18.34, 7.23.2 |
References
- Weakness (CWE)
CWE-20- Platform
- Composer
- Package
laravel/framework- Disclosed
- 15.05.2024
- Updated
- 11.10.2026 10:22
Sources and licenses
OSV / GitHub Advisory Database - GHSA-44pg-c29v-hp6r - CC BY 4.0
Vulnerability history: laravel/framework
All published vulnerabilities of this package (Composer package), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 26
- First → latest
- 01.2021 09.2026
- Without a fix
- 0
- Exploited in attacks
- 1
Severity breakdown
- Critical 2
- High 11
- Medium 12
- Low 1
Disclosures per year
- 2021: 5
- 2022: 5
- 2023: 0
- 2024: 10
- 2025: 3
- 2026: 3
-
Laravel Guard bypass in Eloquent models this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.