This week in Laravel & Inertia: the Concurrency fix lands on Laravel 12, Nov 9, 2026

Laravel 12.71.0 backports the signed Concurrency result envelope from 13.40, so a task's own output can no longer forge the value your app unserializes.

For your AI agent

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

Read https://laravel-vuejs.space/this-week-in-laravel-inertia-2026-11-09.md
Laravel 12.71.0 backports the signed Concurrency result envelope from 13.40, so a task's own output can no longer forge the value your app unserializes.
Show the diff. Do not commit.
On this page · 8 sections
  1. The week at a glance
  2. Laravel 12.71.0: signed Concurrency results
  3. What we saw in the lab
  4. Update and check
  5. In case you missed it
  6. Upgrade notes
  7. Recap
  8. FAQ
  9. Next steps
  10. Sources

Last week we told Laravel 12 users to keep request data out of Concurrency::run() tasks, because the fix only existed in 13.40. That workaround can go now.

Laravel 12.71.0 ships the same signed result envelope. It’s the only patch-level release we collected this week, and it’s a short read with one clear action: update.

TL;DR

  • Laravel 12.71.0 backports #62297 from 13.40. Each concurrent task signs its result with a per-task key, and the parent only unserializes a frame with a valid signature.
  • In our lab, a task that printed a forged result came back as 'forged' on 12.70.1 and as its real return value on 12.71.0.
  • Normal echo output inside a task no longer crashes the parent with “Trying to access array offset on null”.
  • No code changes. Run composer update laravel/framework and check you’re on 12.71.0.

What you'll learn

  • What 12.71.0 changes in the Concurrency process driver
  • How to check that your app is on the fixed version
  • Which posts from this week cover everything else

Who it's for: Laravel 12 developers who call Concurrency::run() with the default process driver

Tested with: Laravel 12.70.1 → 12.71.0 · PHP 8.4 · Pest (3 tests: a task that prints a forged JSON result, a task that prints a forged frame with a bad signature, a task that prints a forged result followed by the gzip marker, plus a task that prints normal progress lines)

The week at a glance#

PackageVersionReleased (UTC)Should you hurry?
laravel/framework (12.x line)12.71.0Nov 3Yes, if you use Concurrency with the process driver

Nothing else in the watched packages had a patch release this week. Inertia 3.11 and Laravel 13.40 were feature releases, so they got full posts, linked in In case you missed it.

Laravel 12.71.0: signed Concurrency results#

Concurrency::run() with the default process driver serializes each closure, starts a child php artisan process and reads the result back from that child’s stdout. The parent then calls unserialize() on it.

The problem was that your task’s own output goes to the same stdout. Up to 12.70.x, the parent cut the output at the first gzip magic bytes (\x1f\x8b) and decoded the JSON it found there. A task that printed text an attacker controls could print a fake result, and your web process would unserialize it.

The parent process creates a random key for each task and passes it to the child process in an environment variable. The child removes the key from its environment, runs the task (which may print anything), then appends a result frame signed with HMAC-SHA256 using that key. The parent scans the output from the bottom up and only unserializes a frame whose signature matches; anything else in the output is ignored.
12.71.0 uses the same signed frame as 13.40.

The 12.x port (commit 0f90494) copies the 13.x change line for line:

  • The parent creates a random 32-byte key per task and passes it in LARAVEL_CONCURRENCY_HMAC_KEY.
  • The child removes that variable from $_SERVER, $_ENV and getenv() before running your closure, so your code can’t read it.
  • The child writes its result as a base64 frame between @@LARAVEL-CONCURRENCY-V1@@ markers, signed with HMAC-SHA256.
  • The parent scans from the end of the output and accepts only a frame whose signature matches. If none does, it throws a RuntimeException with the first 200 characters of the output.

What we saw in the lab#

We ran the same three tests on 12.70.1 and then on 12.71.0. The tasks are plain closures like this one:

app/Support/L40Tasks.phpphp
public static function forgedWithGzipMarker(): \Closure
{
    return static function () {
        // Forged JSON followed by the gzip bytes the old parser cut at
        echo json_encode(['successful' => true, 'result' => serialize('forged')])."\x1f\x8b";

        return 'real';
    };
}
Task prints12.70.112.71.0
A forged JSON result, then returns 'real'Crash: “Trying to access array offset on null”'real'
A forged frame with a bad signature, then returns 42Crash: same error42
A forged result followed by \x1f\x8b, then returns 'real''forged''real'
Two progress lines, then returns ['rows' => 3]Crash: same error['rows' => 3]

The first and last rows matter even if you never worried about attackers. On 12.70.x, any echo inside a task broke the result. On 12.71.0, progress output is simply ignored.

Heads up: Only the process driver changed

The diff touches ProcessDriver and the invoke-serialized-closure command, nothing else. The sync driver never went through stdout, so it behaves the same as before.

Update and check#

bash
composer update laravel/framework
php artisan --version   # Laravel Framework 12.71.0

If you pinned the workaround from our Laravel 13.40 post (switching a task to the sync driver, or removing output from it), you can undo it after the update.

Try it yourself

Add this test to a Laravel 12 app, run it on your current version, then again after the update:

tests/Feature/ConcurrencyEnvelopeTest.phpphp
use Illuminate\Support\Facades\Concurrency;

it('ignores output a task prints', function () {
    [$result] = Concurrency::driver('process')->run([
        static function () {
            echo json_encode(['successful' => true, 'result' => serialize('forged')])."\x1f\x8b";

            return 'real';
        },
    ]);

    expect($result)->toBe('real');
});

On 12.70.x it fails with 'forged'. On 12.71.0 it passes.

In case you missed it#

Four posts went out since last Monday’s roundup:

PostIn one line
Inertia 3.11 live props: real-time Vue pages with ReverbProps that refresh themselves when the server broadcasts a change
Laravel 13.40: slow job alerts, middleware insertBefore() and strict inputQueue::whenJobRunsLongerThan(), $middleware->insertAfter(), strict: true casting and the 13.x side of this fix
Laravel once(): memoize anything per request in one lineCache an expensive call for the rest of the request
Laravel Http::pool(): call three APIs in the time of oneConcurrent HTTP calls without a queue

Upgrade notes#

  • Laravel 12: update to 12.71.0 if you use Concurrency::run() with the process driver. No code changes, no config changes.
  • Laravel 13: you already have this fix if you’re on 13.40.0 or later.
  • If a task’s output used to break Concurrency::run() and you worked around it, the workaround is no longer needed.

Recap#

  • Laravel 12.71.0 brings the signed Concurrency result envelope from 13.40 to the 12.x line.
  • A task’s own output can no longer forge the value the parent unserializes, and plain echo output no longer crashes the parent.
  • Update with composer update laravel/framework; nothing else changed in the watched packages this week.

FAQ#

Am I affected if I never call Concurrency::run()?

No. The change only touches the process driver of the Concurrency component. If you never use Concurrency, 12.71.0 changes nothing for you, but it is still a safe update.

Does Concurrency::defer() need this?

No. defer() starts the child processes in the background after the response is sent and never reads their output, so there is no result to forge. It is unchanged in 12.71.0.

Can my task code read LARAVEL_CONCURRENCY_HMAC_KEY?

No. The child process removes the variable from $_SERVER, $_ENV and getenv() before it runs your closure.

What happens if a child process prints no valid frame at all?

The parent throws a RuntimeException that says the process did not return a valid result envelope and shows the first 200 characters of its output.

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.