Laravel 13.43: security fixes, JsonSchema::rules() and Reverb 1.14

Laravel 13.43 patches mass assignment, XSS and file validation bypasses, and adds JsonSchema::rules(), #[RetryFor] and RawTemplate. Plus Reverb 1.14 limits.

For your AI agent

Copies a prompt. Paste it into the AI agent you already have open.

Read https://laravel-vuejs.space/laravel-13-43-security-fixes-jsonschema-rules.md
Laravel 13.43 patches mass assignment, XSS and file validation bypasses, and adds JsonSchema::rules(), #[RetryFor] and RawTemplate. Plus Reverb 1.14 limits.
Show the diff. Do not commit.
On this page · 14 sections
  1. What’s new at a glance
  2. Security fixes: upgrade now
  3. Mass assignment through a different spelling
  4. XSS in component attributes and the debug page
  5. File validation bypass with an empty field
  6. Hardening in the same release
  7. JsonSchema::rules(): one schema, real validation
  8. #[RetryFor] instead of retryUntil()
  9. releaseUsingBackoff() for polling jobs
  10. RawTemplate: inline components that admit they’re Blade
  11. Smaller additions you’ll use
  12. Reverb 1.14: limits and a new default
  13. Upgrade notes
  14. Also out this week
  15. Recap
  16. FAQ
  17. Next steps
  18. Sources

Your $guarded list says is_admin can’t be mass assigned. On Laravel 13.42, a request that sent is-admin instead walked right past it. Laravel 13.43 closes that hole and a handful of XSS and validation bypasses, and adds JsonSchema::rules(), #[RetryFor], releaseUsingBackoff() and RawTemplate. Reverb 1.14 ships the same day with new limits you should know before you deploy.

TL;DR

  • 13.43.0 and 12.73.0 were released on November 17, 2026 (15:00 and 14:56 UTC). Both carry the same security fixes. Run composer update laravel/framework today.
  • Security: a guarded attribute with a mutator could be mass assigned through a different spelling (is-admin), Stringable values in component attributes weren’t escaped, an empty text field could hide an uploaded file from validation, and the debug page could run script from the URL. All fixed.
  • New: JsonSchema::rules() turns the schema you give an AI or MCP tool into Laravel validation rules. #[RetryFor(hours: 1)] replaces retryUntil(), and releaseUsingBackoff() reuses your job’s backoff.
  • Reverb 1.14: at most 1,000 channels per connection, channel names up to 164 characters, and old configs now only accept whispers from channel members.

What you'll learn

  • Which security fixes are in 13.43 / 12.73 and whether your app is exposed
  • JsonSchema::rules(): derive validation rules from one schema
  • #[RetryFor], releaseUsingBackoff(), RawTemplate, withoutAffectingStickiness() and Str::isBlank()
  • Reverb 1.14: the 1,000-channel limit and the new client-events default

Who it's for: Laravel 13 (and 12) developers who use $guarded, Blade components, file uploads or Reverb, and anyone building AI or MCP tools with JSON Schema

Tested with: Laravel 13.43.0 · Reverb 1.14.0 · PHP 8.4 · Pest 4 · SQLite (20 tests / 51 assertions: isBlank, releaseUsingBackoff on the database queue, #[RetryFor] payload, RawTemplate, withoutAffectingStickiness, JsonSchema::rules + exclusive bounds, mass-assignment alias, Stringable attribute XSS, empty-field file bypass, dynamic component names, debug-page URL, $ref depth, not_regex, 254-char email, literal exists where(), Reverb channel limit, name length and client-event default). 16 of the 17 framework tests fail on 13.42.0.

What’s new at a glance#

ChangePRWhat it replaces
Mass-assignment guard checks normalised names (security)#62499is-admin filling a guarded is_admin
Stringable attribute values escaped (security)#62503Raw " breaking out of an HTML attribute
File wins over an empty input of the same name (security)#62521An unvalidated upload behind avatar=
Debug page “copy URL” JSON-encoded (security)#62418A URL that ran script on the error page
Dynamic component, slot and attribute names validated#62453Runtime templates built from any string
$ref chains capped at 64 levels#62498Unbounded schema resolution (DoS)
JsonSchema::rules()#62355, #62496The same constraints written twice
#[RetryFor] queue attribute#62434A retryUntil() method
releaseUsingBackoff()#62435$this->release($this->backoff()[...])
RawTemplate for inline components#62419Returning a Blade string from render()
DB::withoutAffectingStickiness()#62465Saving and restoring sticky state by hand
Str::of()->isBlank() / isNotBlank()#62415blank(str(...)->stripTags())

Security fixes: upgrade now#

Most of the security work landed on both branches, so the advice is the same everywhere: 13.x apps go to 13.43.0, 12.x apps go to 12.73.0. Here is what each fix closes and how to tell if you were exposed.

Mass assignment through a different spelling#

Eloquent resolves setIsAdminAttribute() (and Attribute mutators) with Str::studly(), so is_admin, is-admin and IsAdmin all hit the same mutator. The $guarded check compared names literally. A request with is-admin was “not guarded”, found the mutator, and set is_admin.

Laravel 13.42, then Laravel 13.43:

app/Models/Member.phpphp
class Member extends Model
{
    protected $guarded = ['is_admin'];

    public function setIsAdminAttribute($value): void
    {
        $this->attributes['is_admin'] = (bool) $value;
    }
}

// POST /members  { "name": "Eve", "is-admin": true }
Member::create($request->all());
// is_admin === true  😬
app/Models/Member.phpphp
class Member extends Model
{
    protected $guarded = ['is_admin'];

    public function setIsAdminAttribute($value): void
    {
        $this->attributes['is_admin'] = (bool) $value;
    }
}

// POST /members  { "name": "Eve", "is-admin": true }
Member::create($request->all());
// is_admin === false, name === 'Eve'

You were exposed if a model uses $guarded (not $fillable), the guarded column has a set mutator or an Attribute with set:, and you pass raw input such as $request->all() to create(), fill() or update(). Passing $request->validated() was already safe, because only keys you listed get through.

XSS in component attributes and the debug page#

Two escaping gaps in Blade:

  • Component attributes (#62503): $attributes->merge() escaped strings but skipped every object, including Stringable. A str($request->title) passed as an attribute could close the quote and add onmouseover=.... Now only Htmlable values (like HtmlString) skip escaping, and prepends() values are escaped too.
  • Debug page (#62418): the “copy request URL” button put the raw URL inside a JavaScript string. A crafted link to a page that throws could run script on the error page. It only matters with APP_DEBUG=true, which should never be the case in production, but staging servers often have it on.
tests/Feature/AttributeEscapingTest.phpphp
use Illuminate\Support\Stringable;
use Illuminate\View\ComponentAttributeBag;

$bag = (new ComponentAttributeBag)->merge(['title' => new Stringable('x" onmouseover=alert(1) data-x="')]);

(string) $bag;
// 13.42: title="x" onmouseover=alert(1) data-x=""
// 13.43: title="x" onmouseover=alert(1) data-x=""

File validation bypass with an empty field#

$request->all() merged files into input, but input always won. Send a multipart request with avatar= (empty) and an avatar file, and the validator saw an empty string. nullable|image passed, then $request->file('avatar') handed you the file nobody checked.

tests/Feature/UploadBypassTest.phpphp
$file = UploadedFile::fake()->create('shell.php', 1, 'application/x-php');
$request = Request::create('/', 'POST', ['avatar' => ''], [], ['avatar' => $file]);

Validator::make($request->all(), ['avatar' => ['nullable', 'image']])->fails();
// 13.42: false (validated an empty string)
// 13.43: true  (the file wins over the blank field and fails "image")

A normal Inertia useForm() upload never sends both, so your users won’t notice. The fix matters against crafted requests, especially if you store $request->file() somewhere public.

Hardening in the same release#

  • Dynamic components (#62453, #62455): <x-dynamic-component> builds a Blade template at runtime. Component, slot and attribute names with characters outside the tag syntax (quotes, braces, <?) now throw InvalidArgumentException instead of being pasted into that template. Bound attributes are sanitised like on a normal component tag.
  • JSON Schema $ref depth (#62498): JsonSchema::fromArray() stops at 64 nested $ref hops. Relevant if you deserialise schemas you didn’t write.
  • not_regex (#62427): when preg_match() errors (for example invalid UTF-8 with the u flag), not_regex used to pass. It now fails, like regex already did.
  • decimal rule (#62420): possessive quantifiers stop slow backtracking on long digit strings.
  • Fluent exists/unique where() (#62425): ->where('status', 'NULL') used to run whereNull() and '!abc' meant “not abc”. Values are now compared literally.
  • Presence verifier (#62447): JSON integers and booleans are compared as strings. On MySQL, exists:invites,code with 7 no longer matches the row 007, and false no longer matches alpha.
  • TrustProxies on Forge and Vapor (#62484): the automatic “trust all proxies” for *.on-forge.com and *.on-vapor.com hosts now also requires the platform’s own server variable, so a spoofed Host header isn’t enough.
  • Broadcasting stub (#62500): see the upgrade notes. If your users have UUID or ULID keys, this one needs a manual edit.

JsonSchema::rules(): one schema, real validation#

The AI SDK and Laravel MCP describe tool input with Illuminate\JsonSchema. Until now you wrote those constraints twice: once as a schema for the model and once as validation rules, and the two copies drifted. JsonSchema::rules() derives the rules from the schema.

Laravel 13.42, then Laravel 13.43:

app/Http/Requests/StoreMemberRequest.phpphp
public function rules(): array
{
    // Copied by hand from the tool's schema...
    return [
        'name' => ['required', 'string', 'max:50'],
        'age' => ['sometimes', 'integer', 'min:18'],
        'role' => ['required', 'string', Rule::in(['admin', 'user'])],
        'tags' => ['sometimes', 'list', 'max:3'],
        'tags.*' => ['string'],
    ];
}
app/Http/Requests/StoreMemberRequest.phpphp
use App\Ai\Schemas\MemberSchema;
use Illuminate\JsonSchema\JsonSchema;

public function rules(): array
{
    return JsonSchema::rules(MemberSchema::make()); 
}
app/Ai/Schemas/MemberSchema.phpphp
namespace App\Ai\Schemas;

use Illuminate\JsonSchema\JsonSchema;
use Illuminate\JsonSchema\Types\ObjectType;

class MemberSchema
{
    public static function make(): ObjectType
    {
        return JsonSchema::object(fn ($s) => [
            'name' => $s->string()->max(50)->required(),
            'age' => $s->integer()->min(18),
            'role' => $s->string()->enum(['admin', 'user'])->required(),
            'tags' => $s->array()->items($s->string())->max(3),
        ]);
    }
}
One JsonSchema object (name: string, max 50, required; age: integer, min 18) feeds two places: the AI SDK or MCP tool, which sends the schema to the model, and JsonSchema::rules() in Laravel 13.43, which turns it into validation rules (name: required|string|max:50, age: sometimes|integer|min:18) used by Validator::make() or a FormRequest.
Write the schema once; the model and the validator read the same thing.

In our lab the schema above produced required|string|max:50 for name and sometimes plus integer|min:18 for age, with dot keys like tags.* for nested items. It also takes a raw array, such as an MCP tool’s inputSchema:

routes/console.phpphp
JsonSchema::rules([
    'type' => 'object',
    'properties' => ['email' => ['type' => 'string', 'format' => 'email']],
    'required' => ['email'],
]);
// ['email' => ['required', 'string', 'email']]

exclusiveMinimum and exclusiveMaximum map to gt: and lt:, pattern to regex with the u flag, and format covers email, uri/url, uuid, date and date-time. Other formats add no rule.

Gotcha: These are Laravel rules, not a JSON Schema validator

Laravel’s usual coercion applies, so the string "19" passes integer (we checked). If a tool must reject strings where the schema says integer, add 'integer:strict' (or Rule::numeric(strict: true)) yourself; in our lab integer:strict rejected "19" and accepted 19. Nested required keys are enforced by the parent’s required_array_keys, so an absent parent object still passes.

On the Vue side nothing changes: the 422 errors land in form.errors like any FormRequest.

resources/js/pages/members/Create.vuevue
<script setup lang="ts">
import { useForm } from '@inertiajs/vue3'
import { store } from '@/routes/members'

const form = useForm({ name: '', age: null as number | null, role: 'user', tags: [] as string[] })
</script>

<template>
  <form @submit.prevent="form.submit(store())">
    <input v-model="form.name" />
    <p v-if="form.errors.name">{{ form.errors.name }}</p>
    <button :disabled="form.processing">Save</button>
  </form>
</template>

#[RetryFor] instead of retryUntil()#

#[Tries], #[Backoff] and #[Timeout] were already attributes. The retry window still needed a method, because it’s relative to when the job is queued. Now it’s an attribute too.

Laravel 13.42, then Laravel 13.43:

app/Jobs/ImportProducts.phpphp
class ImportProducts implements ShouldQueue
{
    use Queueable;

    public function retryUntil(): DateTime
    {
        return now()->plus(hours: 1, minutes: 30);
    }
}
app/Jobs/ImportProducts.phpphp
use Illuminate\Queue\Attributes\Backoff;
use Illuminate\Queue\Attributes\RetryFor;

#[Backoff(60, 300, 600)]
#[RetryFor(hours: 1, minutes: 30)] 
class ImportProducts implements ShouldQueue
{
    use Queueable;
}

The first argument is seconds; minutes and hours are named. In our lab the queued payload’s retryUntil was exactly 90 minutes after dispatch. It works on jobs, queued mailables, notifications and listeners, and a retryUntil() method or property still wins if both exist.

releaseUsingBackoff() for polling jobs#

Backoff only kicked in when a job threw. A job that releases itself (“payment still pending, check again later”) had to index into its own backoff array, and crashed once attempts outran the list.

Laravel 13.42, then Laravel 13.43:

app/Jobs/CheckPaymentStatus.phpphp
public function handle(): void
{
    if ($this->payment->isPending()) {
        $this->release($this->backoff()[$this->attempts() - 1]); // undefined index on attempt 4
    }
}

public function backoff(): array
{
    return [10, 30, 60];
}
app/Jobs/CheckPaymentStatus.phpphp
public function handle(): void
{
    if ($this->payment->isPending()) {
        $this->releaseUsingBackoff(); 
    }
}

public function backoff(): array
{
    return [10, 30, 60];
}

On the database queue our job was released after 10, 30, 60 and 60 seconds over four attempts, with no exception events. With no backoff defined it releases immediately, because the worker’s --backoff option isn’t visible inside the job.

RawTemplate: inline components that admit they’re Blade#

When render() returns a string that isn’t a view name, Blade compiles it. So this innocent-looking component executes whatever the user typed as their name:

app/View/Components/UserBadge.phpphp
public function render(): string
{
    return '<span>'.$this->user->name.'</span>'; // name "{{ 6 * 7 }}" renders "42"
}

We confirmed that on 13.43: it still renders 42. 13.43 doesn’t change that behaviour yet; it adds RawTemplate so intent is explicit, and the PR author plans to make plain strings resolve only to view names in Laravel 14.

app/View/Components/Alert.phpphp
use Illuminate\View\Component;
use Illuminate\View\RawTemplate;

class Alert extends Component
{
    public function __construct(public string $type = 'info') {}

    public function render(): RawTemplate
    {
        return new RawTemplate(<<<'blade'
            <div {{ $attributes->class(['alert', "alert-{$type}"]) }}>{{ $slot }}</div>
        blade);
    }
}

Data goes in through properties and {{ }}, never into the template string. Our lab rendered <x-alert type="success"> with a slot of {{ 6 * 7 }} as literal text. The constructor is typed literal-string, so PHPStan and Psalm flag concatenated input.

Smaller additions you’ll use#

Stop one write from pinning a job to the primary. With sticky read/write connections, any write sends every later read to the write PDO. Wrap bookkeeping writes:

app/Jobs/RunReport.phpphp
DB::withoutAffectingStickiness(fn () => $this->report->update(['started_at' => now()]));

$this->report->run(); // reads still go to the replica

A write that happened before the call keeps the connection sticky. Our lab checked both cases with hasModifiedRecords().

isBlank() in a string chain. str($bio)->stripTags()->isBlank() is true for <p> </p>, and str('0')->isBlank() is false, same as blank().

Also in 13.43: Predis retries idempotent commands (now including DEL) after a dropped connection, like PhpRedis already did (#62406, #62502). Tagged cache reads on Redis are pipelined (#62451). autocomplete() prompts get a fallback, so they work on Windows and in $this->artisan() tests (#62522). db:wipe on PostgreSQL skips extension-owned tables (#62460), queue:work reports jobs you fail manually with $this->fail() as failed (#62377), and withCasts() on a relation now applies to create() (#62517).

Reverb 1.14: limits and a new default#

Reverb 1.14.0 (November 17, 15:19 UTC) is a hardening release. Three changes reach your app:

ChangePRWhat you’ll see
Max channels per connection, default 1,000#423pusher:subscription_error with type LimitReached
Channel names capped at 164 characters#423pusher:subscription_error with type InvalidChannelName
accept_client_events_from defaults to members#424Whispers from non-members get error 4009
Rejected connections are closed#419Over-limit or bad-origin sockets drop after the error
Connection registry#422Ping, prune and shutdown see connections with no channels

The connection stays open on a subscription error, and Echo routes it to that channel’s .error() callback. Raise the limit per app with REVERB_APP_MAX_CHANNELS_PER_CONNECTION (or max_channels_per_connection in config/reverb.php). Configs published without the key use 1,000, which we confirmed: with a limit of 2, the third subscribe got LimitReached, and a 165-character name got InvalidChannelName.

Heads up: Whispers can stop working on old configs

If your config/reverb.php was published before Reverb 1.8 it has no accept_client_events_from key, and until now that meant all. From 1.14 it means members: a client must be subscribed to the channel to whisper on it. Echo only whispers on channels it joined, so most apps are fine. If you relied on the old behaviour, add 'accept_client_events_from' => env('REVERB_APP_ACCEPT_CLIENT_EVENTS_FROM', 'all') to each app.

A typing indicator from Vue keeps working, because useEcho subscribes before it whispers:

resources/js/composables/useTyping.tstypescript
import { useEcho } from '@laravel/echo-vue'

export function useTyping(roomId: number) {
  const { channel } = useEcho(`rooms.${roomId}`)

  return () => channel().whisper('typing', { at: Date.now() })
}

Reverb 1.14 also requires Laravel 12 or 13: Laravel 10 and 11 stay on 1.13. Restart reverb:start after composer update laravel/reverb.

Upgrade notes#

  • composer update laravel/framework puts you on 13.43.0. On 12.x you get 12.73.0 with the security fixes (including JsonSchema::rules(), backported in #62501). #[RetryFor], releaseUsingBackoff(), RawTemplate, withoutAffectingStickiness() and isBlank() are 13.x only.
  • Horizon below 5.47.0 now conflicts (#62449). If Composer refuses the update, run composer update laravel/framework laravel/horizon.
  • UUID/ULID users and private channels: the install:broadcasting stub compared (int) $user->id === (int) $id. With UUIDs, (int) '1a2b...' and (int) '1f9e...' are both 1, so different users could pass. The stub now compares strings, but your published routes/channels.php is not updated for you. Fix it by hand:
routes/channels.phpdiff
 Broadcast::channel('App.Models.User.{id}', function ($user, $id) {
-    return (int) $user->id === (int) $id;
+    return (string) $user->id === (string) $id;
 });
  • Dynamic components now throw on names with characters the tag syntax rejects. Check anything that feeds user input into <x-dynamic-component :component="...">; you should be mapping to an allow-list anyway.
  • Rule::exists()/unique() with ->where('col', 'NULL') now matches the string NULL. Use ->whereNull('col') if that’s what you meant.
  • exists/unique with JSON numbers on MySQL compare as strings now, so 7 stops matching 007.
  • The email rule now rejects addresses longer than 254 characters on 13.x too (#62347, merged up from 12.x).

Check your models for the guarded-mutator pattern

tests/Feature/GuardedAliasTest.phpphp
use App\Models\User;

it('does not mass assign guarded mutators through aliases', function () {
    $user = (new User)->fill(['name' => 'Eve', 'is-admin' => true, 'IsAdmin' => true]);

    expect($user->is_admin ?? false)->toBeFalse();
});

Swap in your own model and guarded column. On 13.42 this fails whenever the column has a set mutator; on 13.43 it passes.

Also out this week#

Laravel AI SDK 1.4.1 (November 17) is a patch with a few real additions: Gemini Decisions API support, Anthropic web search results as citations, a clearer error on 401s, and a pile of streaming and tool fixes. We’ll cover it in Monday’s roundup.

Recap#

  • Upgrade to 13.43.0 (or 12.73.0) now: mass assignment via alias spellings, Stringable attribute XSS, the empty-field file bypass and the debug-page XSS are fixed.
  • Fix routes/channels.php by hand if your user IDs are UUIDs or ULIDs.
  • JsonSchema::rules() lets one schema drive both your AI/MCP tool and your validation.
  • #[RetryFor], releaseUsingBackoff() and RawTemplate remove boilerplate and one footgun.
  • Reverb 1.14 caps channels per connection at 1,000 and makes old configs whisper to members only.

FAQ#

Is Laravel 13.43 a security release?

Yes. It is a normal minor with features, but it carries several security fixes (mass assignment, XSS, file validation). 12.73.0 ships the same fixes for Laravel 12. Update this week.

Was my app exposed to the mass-assignment bypass?

Only if a model uses $guarded, the guarded column has a set mutator or Attribute setter, and you pass raw input like $request->all() to fill(), create() or update(). $fillable models and $request->validated() were safe.

Does JsonSchema::rules() validate strictly like a JSON Schema validator?

No. It returns normal Laravel rules, so the string "19" passes an integer field. Add strict rules yourself where types must be exact.

Will Reverb 1.14 break my whispers?

Only if your config/reverb.php predates Reverb 1.8 and you relied on clients whispering to channels they had not joined. Set accept_client_events_from to all to keep the old behaviour.

Do I need to change inline components to RawTemplate now?

Not yet: strings still work in 13.43. Switch when you touch them, and never build the template from user input. The PR author plans to propose that Laravel 14 stops compiling plain strings.

Next steps#

Sources#

Found this useful?

Ask questions, share what you built.

Join thousands of Laravel and Vue developers in our Facebook group, or get new posts in your Telegram feed. Sharing this article helps too.

Keep reading

Newsletter

Get the best of Laravel & Vue, once a month.

One short email with new guides, release notes worth reading and hand-picked community links. No spam, unsubscribe any time.