Laravel shipped v13.43.0 and v12.73.0 on 17 November 2026. This is an important release for two reasons. It carries a long list of security and validation fixes that you should apply now, and Laravel 13 also gets some nice new features: a #[RetryFor] queue attribute, releaseUsingBackoff(), a safer RawTemplate for inline Blade components, and JsonSchema::rules(). This tutorial goes through what changed, shows the new APIs with working code, and ends with an upgrade checklist.
Sources: the official v13.43.0 and v12.73.0 release notes and the linked pull requests.
Part 1: The security and validation fixes
Both branches received fixes for issues that could let bad input get past your checks. Highlights from the release notes:
- Signed URL expiration bypasses: fixes for numeric query-fragment “parameter smuggling” (#62401) and array
expiresparameters (#62411). - XSS fixes: in component attributes (#62503 on 12.x) and in the debug page’s “copy request URL” button (#62418).
- Eloquent mass-assignment guard bypass through a mismatch in how mutator attribute names are normalised (#62499).
- File validation bypass with colliding empty input fields (#62504, #62521).
not_regexpassing when the pattern match fails (#62427, #62428).- Wildcard validation rules skipping empty array keys (#62409) and nested
sometimesrules being skipped (#62402). - Database rule fixes: fluent
where()values inexists/uniqueare now compared literally, integers and booleans are compared as strings in the presence verifier, and everywhereon the same column is kept (#62425, #62447, #62442). - Dynamic component, slot and attribute names are now validated (#62453).
- A DoS fix in
Illuminate\JsonSchema\Deserializer, which now bounds$refchain depth (#62498). - The
decimalvalidation rule uses possessive quantifiers to avoid costly backtracking (#62420).
If you can only do one thing today, update the framework:
composer update laravel/framework
php artisan --version # expect 13.43.0 (or 12.73.0 on Laravel 12)
php artisan test
Because several validation rules became stricter, run your test suite and pay attention to any tests that relied on the old, looser behaviour. That is a sign the fix is doing its job.
Part 2: #[RetryFor]: retry windows without a method
Laravel already had #[Tries], #[Backoff], #[Timeout] and #[UniqueFor]. The retry deadline still needed a retryUntil() method, because it is relative to when the job is queued. Laravel 13.43 adds #[RetryFor] (#62434):
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\Attributes\RetryFor;
#[RetryFor(hours: 1)]
class ProcessPodcast implements ShouldQueue
{
public function handle(): void
{
// ...
}
}
The first argument is in seconds, and minutes and hours can be passed by name:
#[RetryFor(90)]
#[RetryFor(minutes: 10)]
#[RetryFor(hours: 1, minutes: 30)]
It combines well with #[Backoff]: keep retrying for a while, with growing gaps, then give up:
#[Backoff(60, 300, 600)]
#[RetryFor(hours: 4)]
class ImportProducts implements ShouldQueue
{
// ...
}
The attribute works on jobs, queued mailables, queued notifications and queued listeners. It is inherited from parent classes, so you can set it once on an abstract base job. A retryUntil() method or $retryUntil property still takes precedence, so existing code keeps the same behaviour, and queue:retry recalculates the window for jobs that use the attribute.
Part 3: releaseUsingBackoff() for polling jobs
A job’s backoff was only applied when the job threw. Jobs that release themselves, such as “is the export ready yet?” polling jobs, had to calculate the delay by hand, and that often broke after the last array entry. The new releaseUsingBackoff() method on InteractsWithQueue (#62435) uses the job’s own backoff for the current attempt:
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Queue\Queueable;
use Illuminate\Queue\Attributes\Backoff;
#[Backoff(5, 15, 60, 300)]
class WaitForExport implements ShouldQueue
{
use Queueable;
public function __construct(public Export $export) {}
public function handle(): void
{
if (! $this->export->isReady()) {
$this->releaseUsingBackoff();
return;
}
$this->export->download();
}
}
It follows the same rules the worker uses after an exception. With a backoff of 10, 30, 60, attempt 1 waits 10 seconds, attempt 2 waits 30, and attempt 5 waits 60 (the last value repeats). It reads the backoff from the #[Backoff] attribute, the $backoff property or the backoff() method. One difference: if the job has no backoff at all, it is released with no delay, because the worker’s --backoff option isn’t visible inside the job.
It is also handy for retrying a webhook without throwing:
use Illuminate\Queue\Attributes\Tries;
use Illuminate\Support\Facades\Http;
#[Tries(5)]
#[Backoff(60, 300, 900)]
class SendWebhook implements ShouldQueue
{
use Queueable;
public function handle(): void
{
$response = Http::post($this->url, $this->payload);
if ($response->serverError()) {
$this->releaseUsingBackoff();
}
}
}
Part 4: RawTemplate: close a Blade remote-code-execution trap
This one matters for security. An inline component returns a string from render(). If that string isn’t a view name, Blade compiles it as a template. So code like this, which looks harmless, will execute Blade syntax that a user puts in their name:
// Dangerous: user-controlled text compiled as Blade
public function render(): string
{
return $this->user->firstname . ' ' . $this->user->lastname;
}
Laravel 13.43 adds RawTemplate (#62419) so that compiling a template becomes an explicit, visible choice. Its constructor takes a literal-string, so static analysis tools will flag user data being passed in:
use Illuminate\View\RawTemplate;
public function render(): RawTemplate
{
return new RawTemplate(<<<'BLADE'
<span class="badge">{{ $label }}</span>
BLADE);
}
For dynamic text, don’t build templates at all. Return a normal view and let {{ }} escape the data:
public function render(): \Illuminate\Contracts\View\View
{
return view('components.user-name', ['user' => $this->user]);
}
The change is backwards compatible. The PR author notes they intend to make strings returned from render() resolve only to views in Laravel 14, so now is a good time to audit inline components.
Part 5: One schema for AI tools and validation: JsonSchema::rules()
Tools in laravel/ai and laravel/mcp describe their input with Illuminate\JsonSchema, but developers had to repeat the same constraints as validation rules. JsonSchema::rules() (#62355, backported to 12.x) converts an object schema into Laravel rules:
use Illuminate\JsonSchema\JsonSchema;
use Illuminate\Support\Facades\Validator;
$schema = JsonSchema::object(fn ($s) => [
'name' => $s->string()->max(50)->required(),
'age' => $s->integer()->min(18),
'role' => $s->string()->enum(['admin', 'user'])->required(),
]);
$validator = Validator::make($request->all(), JsonSchema::rules($schema));
It accepts a raw schema array too, for example an MCP tool’s input schema:
JsonSchema::rules([
'type' => 'object',
'properties' => ['email' => ['type' => 'string', 'format' => 'email']],
'required' => ['email'],
]);
// ['email' => ['required', 'string', 'email']]
Remember that the output is Laravel rules, not a strict JSON Schema validator, so Laravel’s usual type coercion applies ("3" passes integer). Laravel 13.43 also adds support for exclusiveMinimum and exclusiveMaximum (#62496).
Part 6: Smaller additions worth knowing
Stringable::isBlank()andisNotBlank()(#62415):str($bio)->stripTags()->isBlank().- Idempotent Predis commands are retried after a lost connection (#62406).
withoutAffectingStickiness()on database connections (#62465).- Faster wildcard attribute lookups during validation (#62464) and pipelined tagged Redis cache reads (#62451).
laravel/horizonversions below 5.47.0 are marked as conflicting (#62449), so update Horizon alongside the framework.
Upgrade checklist
composer update laravel/framework(andlaravel/horizonif you use it).- Run your full test suite. Look closely at validation tests involving
not_regex, wildcard arrays,exists/uniqueand file uploads. - Search for inline components:
grep -rn "function render(): string" app/View. Move user data into real views. - Replace hand-written
retryUntil()methods with#[RetryFor]where it reads better. - Swap manual
release($this->backoff()[...])calls forreleaseUsingBackoff().
Takeaway
Treat Laravel 13.43 and 12.73 as security updates first: update, run your tests and audit inline components. Then enjoy the extras. #[RetryFor] and releaseUsingBackoff() remove queue boilerplate, and JsonSchema::rules() lets one schema drive both your AI tools and your validation.
