Laravel: Sanctum guard can resolve the lowest-ID user when evaluated inside an eager-loaded Eloquent relation definition
CVE-2026-142636
Impact 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. Patches The fix for the 12.x branch has been merged in https://github.com/laravel/framework/pull/62483, which keeps constraints enabled when nested relation attributes are resolved during eager-load relation initialization. Workarounds Avoid resolving the authenticated user inside relation definitions. Resolve the user ID beforehand and pass it explicitly through an eager-load constraint closure.
Assessment
- CVSS
- 6.8 (v3.1)
- Severity
- Medium
- EPSS
- 0.00424% chance of exploitation in the next 30 days
- Known exploited
- Not listed in CISA KEV
- Exploit availability
- Nothing found in Exploit-DB, Metasploit, Nuclei or public PoC repositories
- Published
- 3 December 2026
- Last updated
- 3 December 2026
- Affected
- laravel · framework · laravel/framework
- Weakness
- CWE-863
- Assigner
- security-advisories@github.com
CVSS vectorCVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N
At the source
References
- https://github.com/laravel/framework/security/advisories/GHSA-vfxr-r8f8-gfmp
- https://nvd.nist.gov/vuln/detail/CVE-2026-142636
- https://github.com/laravel/framework/pull/62483
- https://github.com/laravel/framework/commit/6ea0fda8128e36e912e7fde755dac345bde9f5f7
- https://github.com/laravel/framework/releases/tag/v12.73.0
- https://github.com/advisories/GHSA-vfxr-r8f8-gfmp
Community proofs of concept
No community proof of concept yet. If you have one for a published vulnerability and the right to share it, add it below — it will appear here once reviewed.
Submit a proof of concept
Only for publicly disclosed vulnerabilities, and only material from testing you were authorised to perform. This platform does not buy, sell, or broker exploits — see earning from vulnerability research for legitimate bounty programs. Submissions are reviewed before they appear. Text only; do not include live credentials, personal data, or anything targeting systems you are not permitted to test.
Query this programmatically
Agents can read this through the MCP endpoint, or over HTTP:
curl https://cve.zerocrew.in/api/cve/CVE-2026-142636