Source. This article is based on GHSA-f9x3-7vq9-cph6: Laravel TokenGuard authentication bypass through non-string API credentials. Details were checked against it on November 1, 2026; check the source for later changes.
In October 2026 a critical advisory was published for the Laravel framework (GitHub lists it as published on 19 October, and the OSV record is dated 23 October): GHSA-f9x3-7vq9-cph6, tracked as CVE-2026-114509 and titled "Laravel TokenGuard authentication bypass through non-string API credentials". The advisory rates it critical. Per the maintainers it affects laravel/framework before 12.68.0, and the 13.x line from 13.0.0 up to but not including 13.29.0. The fixed releases are 12.68.0 and 13.29.0.
If you run an API that authenticates with Laravel's built-in token guard, this is worth checking today, not at the next sprint.
What the advisory says
The advisory describes the problem in the built-in TokenGuard, when it is configured as a standard token-based API guard. Under certain database configurations, it names MySQL and MariaDB, an attacker can send a crafted credential that is not a string. That value is mishandled during the lookup, and the query can match an unintended user record instead of failing.
The stated impact is that an unauthenticated attacker may authenticate as another user without holding that user's API token, which the advisory describes as authentication bypass and account takeover on any route protected by the affected guard. The advisory classifies the weakness under CWE-287 (improper authentication) and CWE-1287 (improper validation of input of the wrong type).
We have not reproduced this, and we are not going to describe exploit details. The advisory does not give any, and they are not needed to fix it.
Who is affected, and how to check
You are in scope if all of the following are true, based on the advisory:
- the application uses
laravel/frameworkbelow 12.68.0, or a 13.x release below 13.29.0; - a guard in
config/auth.phpuses the built-intokendriver; - the database behind it is MySQL or MariaDB.
Start with the installed version. Run this on the server or in the deployed build, not on a developer laptop, because the lock file on a laptop may differ from production:
composer show laravel/framework | grep versions
Then look for the guard:
grep -n "'driver'" config/auth.php
A guard entry with 'driver' => 'token' is the built-in token guard. Applications that use Sanctum, Passport or a custom guard are a different code path. The advisory only talks about TokenGuard, so we cannot say from it whether those are affected, and we will not guess. If you are unsure which guard a route uses, check the auth: middleware on your API routes against the guards defined in config/auth.php.
The fix
The vendor fix is a framework upgrade. The advisory references the release tags v12.68.0 and v13.29.0, along with two commits.
- Read the release notes for the tag that matches your major version, so you know what else changed in that release.
- Update the constraint. On the 12.x line:
On the 13.x line:composer require "laravel/framework:^12.68.0" --update-with-dependenciescomposer require "laravel/framework:^13.29.0" --update-with-dependencies - Run your test suite, especially anything that exercises authenticated API routes, before the release.
- Deploy with your normal process and clear cached configuration if your deploy does not already do it:
php artisan config:clear
If you are on an older Laravel
This is the part that matters for legacy systems. The OSV record for this advisory lists the 12.x range as affected from version 0 up to 12.68.0, and its list of affected versions includes 10.x and 11.x releases such as v10.48.29 and v11.44.x. The only fixed versions the advisory names are 12.68.0 and 13.29.0. We found no fixed release for the 10.x or 11.x lines in the source we read.
So if you are on Laravel 10 or 11, you should check the Laravel security policy and release pages for any later backport before assuming anything. Based on what we read, the route that is documented is moving to 12.68.0 or later. That is a major-version upgrade, and for an older application it may also mean a PHP version bump. Our recent articles on upgrading legacy PHP to PHP 8 and adding tests to legacy PHP code cover the groundwork that makes a jump like this less risky.
If you cannot upgrade today
The advisory as we read it does not state a workaround. We are not going to invent one. What you can do without claiming it fixes the flaw is reduce exposure while you schedule the upgrade:
- find which routes use the token guard and decide whether any of them can be taken offline or restricted by network rules in the meantime;
- review access logs for those routes for requests that look unusual, such as authenticated calls from users who normally do not use the API;
- rotate any secrets that the affected routes expose access to, once you have upgraded.
These are general hygiene steps, not measures from the advisory. Treat the upgrade as the actual fix.
Confirming the fix
After deployment, confirm the version on the running server:
composer show laravel/framework | grep versions
php artisan --version
You should see 12.68.0 or higher on the 12.x line, or 13.29.0 or higher on 13.x. Then run your authenticated API tests against the deployed environment, and check that a request with an invalid token still returns a 401. Note that confirming the version is what tells you the patched code is present; whether a given request is blocked is something the maintainers' patch determines, and we have not tested it ourselves.
Also run composer audit in the project. It reads the same advisory data and will flag the package if a vulnerable version remains in your lock file:
composer audit
When this points to a bigger problem
A critical advisory is a good test of how an application is maintained. If the fix is a one-line version bump, a test run and a deploy, you are in good shape. If instead nobody knows which Laravel version production runs, the lock file is not committed, the PHP version blocks the upgrade, or there are no tests to say whether the upgrade broke anything, then the advisory has exposed a maintenance gap that will cost more each time. That is the situation where we do staged upgrades: inventory first, tests around the risky paths, then a version-by-version move. Our PHP platform development work covers this kind of Laravel and framework upgrade, and our modernisation roadmap describes the order we usually follow.
Frequently asked questions
Which Laravel versions are affected by CVE-2026-114509?
Per the advisory, laravel/framework before 12.68.0 and the 13.x line from 13.0.0 before 13.29.0. The fixed releases are 12.68.0 and 13.29.0.
Does this affect Sanctum or Passport?
The advisory only describes the built-in TokenGuard, so it does not say. Check the advisory and your guard configuration rather than assuming.
Is there a workaround if I cannot upgrade?
The advisory we read does not state one. Upgrading to 12.68.0 or 13.29.0 or later is the documented fix.
Need a Laravel upgrade done safely?
We inventory your versions, add tests around the risky paths and move your application to a patched, supported release in stages.
See our PHP Platform Development