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

Published Dec 2, 2026
·
Updated

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.

Affected Software

1 affected component
Laravel Laravel<12.73.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 12.73.0

Event History

Dec 2, 2026
CVE Published
via OSV·10:39 PM
Data Sourced
via OSV·10:39 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·11:18 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which applications are exposed to this issue?

Applications using Laravel before 12.73.0 are affected only when the Sanctum guard is first resolved from within an Eloquent relation definition that is being eager-loaded. Optional-authentication routes are an example; routes where authentication middleware resolves the user before relation initialization were not affected in testing.

2

What does an attacker need to exploit it?

An attacker needs a low-privilege Sanctum token and access to a route that triggers the vulnerable eager-loaded relation path before the guard has otherwise resolved the authenticated user. Under those conditions, the token owner lookup can return the lowest-ID user instead of the token owner.

3

What is the impact during an affected request?

The application can treat the lowest-ID user, often an administrator, as the authenticated user. That user identity remains cached for the rest of the request, potentially allowing the low-privilege token to read that user's data.

4

What can be done if upgrading is not immediately possible?

Avoid resolving the Sanctum guard inside relation definitions used with eager loading. Ensure authentication middleware resolves the user before those relations are initialized, as routes with that ordering were not affected in testing.

5

How can I determine whether a route is affected?

Review routes that use eager-loaded Eloquent relations and determine whether their relation definitions call or otherwise first resolve the Sanctum guard. A route is most concerning when it permits optional authentication and does not have authentication middleware that resolves the user first.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203