Skip to content
Putting technology to work.
Insights to guide decisions and action.

Search articles

Laravel 13.43.0 fixes mass assignment and file validation bypasses

Table of contents · 10 items

On member registration and edit screens, you pass input to a model in bulk, as in User::create($request->all()), and protect only the admin flag with $guarded. For image uploads, you validate with nullable|image, and in Blade components you merge attributes with $attributes->merge(). Laravel's November 17 update fixes cases where these three safeguards did not work.

Laravel released 13.43.0 and 12.73.0 on November 17. Mixed in with new features, the CHANGELOG lists fixes labeled "mass-assignment guard bypass," "file validation bypass," and "XSS." The next day, November 18, the laravel/framework repository published 17 security advisories, including these three. Three more were added on November 23 and 25, two of which are rated high severity, and both of those are fixed only in 13.44.1 and 12.74.0 (released November 24) and later.

As of November 30, none of these 20 advisories appear in the GitHub Advisory Database or in Packagist's list of advisories. Because composer audit checks that list, it will not tell you that an update is needed.

In this article, we read the advisories, fix commits and tests in the laravel/framework repository, and ran 13.42.0 and 13.43.0 in a test environment to confirm the differences. Based on those results, we summarize the conditions under which you are affected, which versions to update to, and how to check.

November fixes and the versions that include them

We checked whether the fixed lines are present in the source of each tag. The results were as follows.

Fix (pull request and advisory)13.x12.x
Mass assignment protection bypassed with a spelling that uses a different separator (#62499, GHSA-6pxv-c29g-cc5h)13.43.012.73.0
File validation bypassed by adding an empty input field (#62504 and #62521, GHSA-hxc4-wvjf-r59p)13.43.012.73.0
Stringable values not escaped in component attributes (#62503, GHSA-hv67-wfqj-w9xv)13.43.012.73.0
Script execution via "Copy URL" on the debug screen (#62418, no advisory)13.43.012.73.0
Signed URL expiration can be removed with numbered parameters (#62401, GHSA-6rv8-qj5v-p8ch)13.41.012.72.0
Signed URLs do not expire when an array is passed to expires (#62411, no advisory)Already fixed as of 13.40.012.73.0

12.72.0, 13.41.0 and 13.42.0 were released on November 10, and 12.73.0 and 13.43.0 on November 17. 13.44.0 and 12.74.0, released on November 24, include all of these. 13.44.1, released the same day, differs from 13.44.0 only in the version number line. All three advisories above (published November 18) are rated medium severity.

Below, we explain the three issues above that we reproduced in the test environment, one by one. We installed laravel/framework 13.42.0 and 13.43.0 on PHP 8.3.6 and passed the same inputs as the tests attached to the fix commits.

Diagram comparing the results of the three November 17 fixes in Laravel 13.42.0 and 13.43.0. When filling with the spelling is-admin, is_admin became true in 13.42.0 but stayed false in 13.43.0. When an empty input field and a file were sent under the same name, the request passed nullable|image validation in 13.42.0 and was rejected in 13.43.0. When a Stringable value was merged into attributes, the double quotes were output as-is in 13.42.0 and escaped in 13.43.0

$guarded columns could be overwritten with a different spelling

The test model protects two columns with $guarded = ['is_admin', 'role'] and transforms values with setIsAdminAttribute() and role() (the set of Attribute). In 13.42.0, passing them with a spelling that uses a different separator, such as fill(['is-admin' => true, 'ro-le' => 'admin']), made is_admin true and role admin. In 13.43.0, neither was overwritten. When passed with the correct spelling, is_admin, they are rejected in both versions.

The comment on the fix commit explains the cause as "a mismatch between the name conversion (studly and camel) used when looking up methods that transform values and the check against the list of protected columns." is-admin does not match is_admin in the protected list, but when looking up methods it was converted to IsAdmin, and setIsAdminAttribute() was called.

You are affected when all three of the following conditions are met (summarized by the editorial team from the isFillable() source).

  • The model protects columns with $guarded and leaves $fillable empty. If you list the allowed columns in $fillable, is-admin is discarded because it is not in the list
  • A protected column has a method that transforms its value (set〇〇Attribute() or the set of Attribute)
  • User input is passed in bulk to fill(), create() or update()

Adding an empty input field let files pass validation

When an input field with an empty string and a file were sent at the same time under the same name, $request->all() in 13.42.0 returned the empty string. Because validation runs against this value, nullable|image results in "empty, so it passes." Meanwhile, $request->file('avatar') returns the file, so a file that was never validated can be saved.

In the test environment, we sent a PHP file that is not an image under the name avatar.jpg. 13.42.0 let it pass nullable|image, and 13.43.0 rejected it. After the fix, the file takes precedence when the input value is empty. When a non-empty string and a file conflict, the string still takes precedence, as before.

If the field is required, as in required|image, the empty string fails required, so this pattern likely does not get through. The screens affected are those where image upload is optional (nullable) (editorial team's analysis; we did not test the required case).

Stringable attributes were not escaped

$attributes->merge() in Blade components escapes values with e() before outputting them. In 13.42.0, values were escaped if they were strings but output as-is if they were objects. As a result, a Stringable value such as Str::of($input) was output into the attribute as-is, including the double quotes.

When we passed the same x" onmouseover=alert(1) data-x=" as the test, 13.42.0 output title="x\" onmouseover=alert(1) data-x=\"". There is a backslash before the double quote, but a backslash does not act as an escape in HTML attributes. The browser closes the attribute at title="x\" and reads onmouseover as a separate attribute. 13.43.0 escaped it to ". After the fix, only Htmlable values such as HtmlString are output without escaping.

Three issues we did not reproduce in the test environment

"Copy URL" on the debug screen (#62418): This fixes the escaping used when the request URL is embedded in a JavaScript string on the exception screen. This screen appears when APP_DEBUG=true. If APP_DEBUG is set to false in production, this screen does not appear.

Two signed URL issues (#62401 and #62411): One is an issue where passing numbered parameters built from user input to temporarySignedRoute() or signedRoute() made it possible to add a second expires and create a URL that never expires (GHSA-6rv8-qj5v-p8ch, published November 11, medium). The other is an issue where a URL was not judged as expired when expires was an array. The 13.42.0 in our test environment already included both fixes, so we did not confirm the behavior before the fix. In the 12.x series, 12.71.0 and earlier lack both fixes, and 12.72.0 lacks the array fix. Also on November 11, an advisory was published for an issue where a URL does not expire if expires is dropped due to the max_input_vars limit (GHSA-v5ch-g375-82r6, #62349, fixed in 13.41.0 and 12.72.0).

Advisories published in the repository from November 18 to 25

The laravel/framework repository published 17 advisories on November 18, 2 on November 23, and 1 on November 25. Neither of the two high-severity issues is fixed in 12.73.0. In 13.43.0, GHSA-8h64 is already fixed (it was fixed in 13.38.0), but GHSA-c25c remains.

Advisory (publication date)DetailsSeverityVersions with the fix
GHSA-c25c-x5r7-2v5m (November 25)Passing a number with an extreme exponent to multiple_of or to gt, gte, lt or lte validation that compares against another numeric field exhausts memory and CPUHigh (7.5)13.44.1 and 12.74.0
GHSA-8h64-cpq2-9h2g (November 23)A crafted JSON request of ordinary size exhausts CPU and memory. No authentication is requiredHigh (7.5)13.38.0 and 12.74.0
GHSA-cq3g-fj94-c8p3 (November 23)When an array element's key is an empty string, the items.* rule is not appliedMedium13.43.0 and 12.73.0

GHSA-c25c lists as a workaround narrowing the value range first with min, max and between and stopping with bail (for example, bail|numeric|min:0|max:100|multiple_of:2). Comparisons with literal numbers and the min, max, between and size rules are not affected. The GHSA-8h64 advisory does not describe the fix or any workaround.

In addition to the three in the table above (mass assignment, file validation and Stringable), the 17 advisories from November 18 include the following. Unless otherwise noted, the fixed versions are 13.43.0 and 12.73.0.

  • Validation rules: the where() value of Rule::exists() and Rule::unique() being interpreted as a condition such as NULL (GHSA-ch34-gjmh-c4hp), regular expression backtracking in decimal (GHSA-h84h-g58v-xg2h), exists passing with integer or boolean input on MySQL and MariaDB (GHSA-wwq3-m3j5-wv66), nested sometimes being skipped with the value __missing__ (GHSA-f3ph-5p6j-34xr; 12.72.0 for the 12.x series), and the load of email address validation (GHSA-cvfq-f547-rv2g; 12.72.0 for the 12.x series)
  • Blade: attributes bundled with <x-dynamic-component> not being escaped (GHSA-9966-43cq-4mpr)
  • Other: TrustProxies allowing the source IP to be spoofed in Forge and Vapor detection (GHSA-559m-v249-7qw2), Sanctum sometimes returning the user with the smallest ID (GHSA-vfxr-r8f8-gfmp; 12.73.0 for the 12.x series), chaining of $ref in JSON Schema (GHSA-cgwv-q695-mj8g), and escaping in Markdown emails (GHSA-5xc4-gpwg-p8wq, low)

We covered the Markdown email issue in our article on league/commonmark. The remaining four (SQL injection via JSON paths in PostgreSQL, loose comparison in the in rule, read and write permissions being swapped in storage signed URLs, and JSONP in broadcast authentication) had already been fixed in 13.26.0, 12.67.0 or earlier, and were published as advisories on this day.

Check the affected conditions for each advisory on the repository's advisory pages. In this article, we verified the behavior of only the three issues in the diagram above.

Not included in the 10.x and 11.x series

According to the table in the source of the official Laravel documentation (releases.md in laravel/docs), security fixes for 11.x ended on March 12, 2026, and for 10.x on February 4, 2025. 12.x is supported until February 24, 2027, and 13.x until March 17, 2028.

However, 11.57.2 and 10.50.5 were also released on November 24. Their changelogs cover things like sending logs to Laravel Cloud, and none of the fixed lines in the table above are in the source of either tag. Many of the advisories from November 18 to 25 describe the affected range as "before 12.73.0," which also covers 10.x and 11.x, but no fixed versions are listed for 10.x or 11.x. We have not checked whether the same bugs exist in the older series' code, but a new release does not necessarily mean the fix has reached it. Note that for GHSA-f9x3-7vq9-cph6, the most severe (critical) advisory from October, the GitHub Advisory Database also lists 10.50.4 and 11.56.1 as fixed versions, so whether fixes reach older series varies from issue to issue. For systems on 11.x or earlier, it is time to plan a migration to 12.x or later (editorial suggestion). We covered points to watch when updating PHP alongside the migration in our article on migrating to PHP 8.6.

Steps to check (editorial suggestion)

  1. Check your version. Use composer show laravel/framework to see whether you are on 13.44.1 or later for 13.x, or 12.74.0 or later for 12.x. In 12.73.0, both high-severity issues remain; in 13.43.0, one (GHSA-c25c) remains. As of November 30, composer audit does not show these advisories, so judge by the version number. You can get the update with composer update laravel/framework
  2. Find models protected only by $guarded. List candidates with the following expression, and check whether the protected columns have set〇〇Attribute() or the set of Attribute
grep -rln 'protected \$guarded' app/Models | xargs grep -L 'protected \$fillable'
grep -rnE 'function set[A-Za-z]+Attribute|Attribute::make\(' app/Models
  1. Find places that pass input in bulk. If you replace places that pass ->all() or ->input() to create(), update() or fill() with $request->validated() or $request->only([...]), extra columns will not get in, regardless of version
  2. Review optional file fields. For image and attachment fields accepted with nullable, check whether the value of $request->file() is verified again before saving
  3. Check whether you pass Str::of() values to attributes. Where you pass Stringable built from user input to merge() or prepends(), check the rendered output after updating
  4. If you cannot update right away, review your numeric validation. For fields that use multiple_of, gt, gte, lt or lte, add rules that narrow the range first with bail, min and max (the GHSA-c25c workaround)

We covered advisories for Laravel admin panel components in our article on Filament Curator.

Scope of verification

On November 29, 2026, we reviewed the changelogs (CHANGELOG.md) of the 12.x and 13.x branches of laravel/framework; the descriptions, diffs and tests of the fix commits (4b27e94, 4fbcd3b, 24f23f0, d214178, 8ed80f5, 6b58a9f, 9c4b57b, e515a8e); the source of tags 10.50.5, 11.57.2, 12.71.0 to 12.74.0 and 13.40.0 to 13.44.0; releases.md in laravel/docs; release dates and times on Packagist; and github/advisory-database (reviewed) (document research). On the same day, we installed laravel/framework 13.42.0 and 13.43.0 with PHP 8.3.6 and Composer 2.8.12, and compared the behavior of mass assignment, file validation, component attributes and signed URLs (hands-on testing; scripts and output are saved in the article's evidence records). On November 30, we checked the advisories in the laravel/framework repository (list and body via the GitHub API), whether they are listed in the GitHub Advisory Database and in Packagist's list of advisories, the 13.44.0, 13.44.1 and 12.74.0 releases on Packagist and GitHub, and the changelogs of the 12.x and 13.x branches since November 24 (document research). Issues we learned about only from advisories, such as GHSA-8h64 and GHSA-c25c, were not run in the test environment. We did not test the debug screen issue, the behavior in 12.x, the behavior of signed URLs before the fix, or whether the same bugs exist in 10.x and 11.x.

For updating business systems built with Laravel, or planning a migration from 10.x or 11.x, please contact us through consultation on development, AI, and automation.

References

Share this articleXFacebook
Kakeru Suzuki

Fascinated by the possibilities of technology, has had a deep interest in programming and digital art since student days

Turn this article's theme into your company's next step

Concrete steps forward for your organization.

We organize your desired architecture, legacy systems, and operational requirements to formulate your next steps toward execution.

  • Desired architecture
  • Integration with existing environments
  • Operational requirements
Consult on development & operations initiatives

You can consult with us from the initial conceptual stage. Details from this article will be carried over to the inquiry form.

Receive the latest articles by email