← Vulnerabilities

MediumAdvisoryPHPLaravel

Laravel: Sanctum guard can resolve the lowest-ID user when evaluated inside an eager-loaded Eloquent relation definition

Affected

PackageAffected versionsFixed in
composer:laravel/framework< 12.73.012.73.0

When an authenticated user is first resolved while Eloquent is initializing an eager-loaded relation, Eloquent's relation constraints are temporarily disabled. A lazy key-constrained lookup made during that window, such as Sanctum's token owner lookup, runs without its key restriction. The guard can then return the lowest-ID user (often an administrator) instead of the token's owner. This affects applications that call the guard inside a relation definition used with eager loading, for example…

Read on GitHub Advisory Database

On 12/04/2026, 03:08 AM, GitHub Advisory Database published "Laravel: Sanctum guard can resolve the lowest-ID user when evaluated inside an eager-loaded Eloquent relation definition" (type: Advisory). Severity is "Medium" (medium). Related technologies: PHP, Laravel. CVE: CVE-2026-142636.