Laravel: Sanctum guard can resolve the lowest-ID user when evaluated inside an eager-loaded Eloquent relation definition
- CVE-2026-142636
- GHSA-vfxr-r8f8-gfmp
- EUVD-2026-141965
Description
Laravel is a web application framework. Prior to 12.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 in optional-authentication routes. A low-privilege token could then read that user's data, and the wrong user remains cached for the rest of the request. Routes where authentication middleware resolves the user first were not affected in testing. This issue is fixed in version 12.73.0.
Text from the CVE.org record.
Recommendation
laravel/framework
- If you run a version before 12.73.0update to 12.73.0 or laterlaravel/framework 12.73.0 on its registry (opens in a new tab)
Taken from the version ranges the sources state. Check the vendor advisory: nothing is said about versions the ranges do not list. Breaking-change risk is read from the version numbers only.
Affected
laravel framework
Affected versions Fixed in < 12.73.0 none stated laravel/frameworkPackagist
Affected versions Fixed in before 12.73.0 12.73.0
Product versions from the CVE.org record.
Timeline
- Published
Related news
No article from the followed outlets names this vulnerability.