Laravel Guard bypass in Eloquent modelsGHSA-44pg-c29v-hp6r
GHSA-44pg-c29v-hp6r is a security vulnerability in laravel/framework. A fix is available for laravel/framework — see the affected versions and patch details below.
Real-World Exposure
laravel/framework🐘laravel/framework🐘laravel/frameworkReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Packagist packages — download data is not available via public APIs for these ecosystems.
Description
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 Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐘Packagist | laravel/framework | ≥ 5.5.0 | No fix |
| 🐘Packagist | laravel/framework | ≥ 6.0.0&&< 6.18.34 | 6.18.34composer require laravel/framework:^6.18.34 |
| 🐘Packagist | laravel/framework | ≥ 7.0.0&&< 7.23.2 | 7.23.2composer require laravel/framework:^7.23.2 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for laravel/framework, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
A fix is available for GHSA-44pg-c29v-hp6r; check the affected-versions list above or the advisory for the patched release of laravel/framework, then make sure no transitive dependency still pins the vulnerable range.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
Frequently Asked Questions
Is GHSA-44pg-c29v-hp6r in your dependencies?
Find it across Packagist, including transitive dependencies.