# GHSA-44pg-c29v-hp6r: Laravel Guard bypass in Eloquent models

> GHSA-44pg-c29v-hp6r is a medium-severity vulnerability, classed as Improper Input Validation (CWE-20), in laravel/framework (Packagist). Affected versions: >= 5.5.0, <= 5.5.49; >= 6.0.0, < 6.18.34; >= 7.0.0, < 7.23.2. It is fixed in 6.18.34 or 7.23.2, depending on the release line.

Canonical page: https://cveminer.com/vulnerabilities/GHSA-44pg-c29v-hp6r

| Field | Value |
| --- | --- |
| GHSA | GHSA-44pg-c29v-hp6r |
| Severity | Medium |
| CWE | CWE-20 Improper Input Validation |
| CISA KEV | Not listed |
| Published | 15 May 2024 |
| Modified | 15 May 2024 |

## 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

| Package | Ecosystem | PURL | Vulnerable versions | Fixed in |
| --- | --- | --- | --- | --- |
| laravel/framework | Packagist | `pkg:composer/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 |

## Questions

**Does GHSA-44pg-c29v-hp6r have a CVE ID?**

No CVE ID has been assigned to GHSA-44pg-c29v-hp6r yet. It is tracked only as a GitHub advisory.

**Which versions are affected by GHSA-44pg-c29v-hp6r?**

laravel/framework (Packagist): >= 5.5.0, <= 5.5.49; >= 6.0.0, < 6.18.34; >= 7.0.0, < 7.23.2.

**How do I fix GHSA-44pg-c29v-hp6r?**

Upgrade to 6.18.34 or 7.23.2, depending on the release line.

**What is the Package URL (PURL) for GHSA-44pg-c29v-hp6r?**

The affected package's PURL is pkg:composer/laravel/framework.

## References

- https://github.com/FriendsOfPHP/security-advisories/blob/master/laravel/framework/2020-08-06-1.yaml (advisory)
- https://github.com/advisories/GHSA-44pg-c29v-hp6r (advisory)
- https://github.com/laravel/framework (package)
- https://blog.laravel.com/security-release-laravel-61834-7232

---

Source: CVEminer (https://cveminer.com/vulnerabilities/GHSA-44pg-c29v-hp6r), compiled from OSV (GitHub advisory), GitHub Advisory Database. OSV and GitHub Advisory Database content is licensed CC BY 4.0.
