Laravel TokenGuard authentication bypass through non-string API credentials
Critical severity
GitHub Reviewed
Published
Oct 19, 2026
in
laravel/framework
•
Updated Oct 23, 2026
Package
Affected versions
>= 13.0.0, < 13.29.0
< 12.68.0
Patched versions
13.29.0
12.68.0
Description
Published by the National Vulnerability Database
Oct 21, 2026
Published to the GitHub Advisory Database
Oct 23, 2026
Reviewed
Oct 23, 2026
Last updated
Oct 23, 2026
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.
References