Laravel: Sanctum guard can resolve the lowest-ID user when evaluated inside an eager-loaded Eloquent relation definition
受影响
| 软件包 | 受影响版本 | 修复版本 |
|---|---|---|
| composer:laravel/framework | < 12.73.0 | 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…
在 X 上接收快讯漏洞利用、重大泄露和故障,附应对措施。
关注 @vulnpulse_app2026/12/04 03:08,GitHub Advisory Database 发布了“Laravel: Sanctum guard can resolve the lowest-ID user when evaluated inside an eager-loaded Eloquent relation definition”(类型:漏洞公告)。严重程度为“中危”(medium)。相关技术:PHP、Laravel。CVE:CVE-2026-142636。