Skip to main content
CVE-2026-142636VulnerabilityPublished

laravel/framework · Laravel: Sanctum guard can resolve the lowest-ID user when evaluated inside an eager-loaded Eloquent relation

Affects laravel/frameworkSource GCVE Database

0
Compare
Authoritative record:CVE-2026-142636· Medium 6.8

Not known to be exploited · CVSS 6.8 Medium : upgrade to 12.73.0 when convenient.

Data as of 3 Dec 2026, 19:16 UTC

CVSS 3.1 base score
6.8Medium
How severe the flaw is on the 0–10 CVSS scale.

Thin evidence

One scorer or none
CVSS scores by source
CNA (GitHub_M)CVSS 3.16.8
Patch
Available – fixed in 12.73.0
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 2 Dec 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 3 Dec 2026.

What to do

Upgrade laravel/framework to 12.73.0.

Affected software

ProductAffectedFixed in
Packagistlaravel/frameworkAffected
  • <12.73.0
Fixed in
  • 12.73.0

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

Description

### 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.

References

Community reviews

Loading reviews…