PatchClock

PHP security digest · 23 Oct 2026

Laravel TokenGuard authentication bypass through non-string API credentials

Critical CVE-2026-114509

Package
laravel/framework
Fixed in
13.29.0, 12.68.0
Published
Fri 23 Oct 2026, 22:50 Lisbon
Installs on Packagist
603M

In plain words

An unauthenticated attacker may sign in as an existing user without knowing their valid API token, potentially taking over that account on routes protected by the affected guard. This affects Laravel's built-in TokenGuard when configured as a standard token-based API guard, under certain MySQL/MariaDB database configurations where a non-string credential is mishandled during authentication.

Affected versions

PackageAffectedFixed in
laravel/framework>= 13.0.0, < 13.29.013.29.0
laravel/framework< 12.68.012.68.0

Am I affected?

Look for laravel/framework in composer.lock. Affected versions are below 12.68.0, or at least 13.0.0 but below 13.29.0; the fixes are 12.68.0 and 13.29.0. Check whether your application uses the built-in TokenGuard as a standard token-based API guard with MySQL/MariaDB, and which routes it protects. The advisory does not specify which database configurations trigger the flaw.

What to do

Check which version you have, then update to a fixed release for your branch (13.29.0, 12.68.0):

composer show laravel/framework | grep versions
composer update laravel/framework

If your version constraint in composer.json keeps you below a fixed release, raise it first. Whether your configuration is affected, and the exact version ranges, are in the advisory itself.

The advisory's description

Laravel's built-in TokenGuard, when configured with a standard token-based API guard, may be bypassed to authenticate as an arbitrary existing user without knowledge of their valid API token.

Under certain database configurations (MySQL/MariaDB) an attacker can submit a specially crafted, non-string credential value that is mishandled during the authentication lookup, causing the underlying query to match an unintended user record rather than failing authentication as expected.

Impact

An unauthenticated attacker may authenticate as another user without possessing that user's API token, leading to authentication bypass and account takeover on any route protected by the affected guard.

Weakness: CWE-287 Improper Authentication; CWE-1287 Improper Validation of Specified Type of Input. Reported by KIKOmanasijev.

The advisory

From OSV.dev, which gathers the GitHub Advisory Database, FriendsOfPHP and Drupal security advisories; the summary is theirs. The description, affected versions, weakness and credits are from the GitHub Advisory Database (CC BY 4.0). "In plain words", "Am I affected?" and "If you cannot update yet" are based on that advisory, and checked to name no version it does not.