← Vulnerability database

CVE-2026-114509

Critical

Laravel TokenGuard authentication bypass

9.2 CVSS v4.0
Published
Oct 21, 2026
Updated
Oct 28, 2026
Vendor
Laravel
Affected versions
laravel/framework < 12.68.0; 13.x < 13.29.0
Weakness
CWE-287, CWE-1287

Summary

Laravel is a web application framework. Prior to 12.68.0 and 13.29.0, TokenGuard configured as a standard token-based API guard does not reject a crafted non-string credential. Under affected MySQL or MariaDB configurations, the authentication lookup can match an unintended existing user, allowing an unauthenticated attacker to bypass authentication and take over an account on routes protected by TokenGuard. This issue is fixed in versions 12.68.0 and 13.29.0.

Severity

Critical (9.2)

CVSS vector

CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

Affected products

  • Laravel Framework (laravel/framework) < 12.68.0
  • Laravel Framework (laravel/framework) 13.0.0 – < 13.29.0

Exploitation status

Unknown

Technical details

What is affected

Laravel’s built-in TokenGuard — the simple token API guard configured in config/auth.php — in laravel/framework versions before 12.68.0 and, on the 13.x line, before 13.29.0. The advisory names MySQL and MariaDB as the affected database configurations. Laravel Sanctum and Laravel Passport use their own guards and are not named in the advisory.

How the bypass works

TokenGuard looks up the user whose stored API token matches the token sent with the request. Before the fix it did not insist that the submitted token was a plain string. A crafted value of another type is mishandled during the database lookup on affected MySQL/MariaDB setups, so the query matches an existing user it should not. The attacker is then signed in as that user without knowing their token.

Impact

An unauthenticated attacker can act as another user on every route protected by the affected guard — reading and changing that user’s data, and taking over the account. If the matched account has elevated rights, the attacker gets those too.

The fix

The patched TokenGuard requires a non-empty string token before it queries the user provider, and rejects missing or non-string credentials when validating. See the Laravel security advisory and the release notes for v12.68.0 and v13.29.0.

Read our full walkthrough of this Laravel TokenGuard bypass for the affected-or-not checklist, the upgrade commands, a temporary middleware and log checks.

Mitigation & remediation

  • Upgrade laravel/framework to 12.68.0 or 13.29.0 (or later): run "composer update laravel/framework", then confirm with "composer show laravel/framework".
  • Check whether you are exposed: search config/auth.php for a guard using 'driver' => 'token'. Apps that only use Sanctum or Passport for API auth do not use this guard.
  • Versions below 12 receive no fix for this issue: upgrade to Laravel 12 or 13, or move API authentication to Sanctum.
  • Until you can upgrade, reject requests whose api_token (query string, body or JSON) is not a plain string, before the auth middleware runs.
  • After patching, rotate API tokens and review logs for logins to accounts from unexpected IP addresses or with unusual api_token values.

References

Source NIST NVD
Last syncedOct 30, 2026 16:16 UTC
Reviewed Oct 30, 2026
Page updatedOct 30, 2026