CVE-2026-142636
Laravel: Sanctum guard can resolve the lowest- ID user when evaluated inside an eager- loaded Eloquent relation definition
- Severity
- 6.8MediumNetwork attack, low privileges, no user interactionCVSS 3.1, CVE List
- Exploitation
- UnknownNo source reports exploitation yet.
- Exploit chance
- 0.42% in 30 daysPercentile38thEPSS, scored
- Listed fix
12.73.0for laravel/framework From GitHub Advisories and OSV4 other affected packages
Overview
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.
CVSS 3.1 vector
Exploitability
- Attack vector
- Network
- Complexity
- High
- Privileges needed
- Low
- User interaction
- None
Impact
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- High
- Availability
- None
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:NExploit chance over time
Affected
Packages 5
| Package | Affected | Fixed |
|---|---|---|
laravel/frameworkPackagist | before 12.73.0, plus listed versions 10.50.25.0.305.2.41v10.0.0v10.0.1 Show 45 more versionsShow lessv10.0.2v10.0.3v10.1.0v10.1.1v10.1.2v10.1.3v10.1.4v10.1.5v10.10.0v10.10.1v10.11.0v10.12.0v10.13.0v10.13.1v10.13.2v10.13.3v10.13.5v10.14.0v10.14.1v10.15.0v10.16.0v10.16.1v10.17.0v10.17.1v10.18.0v10.19.0v10.2.0v10.20.0v10.21.0v10.21.1v10.22.0v10.23.0v10.23.1v10.24.0v10.25.0v10.25.1v10.25.2v10.26.0v10.26.1v10.26.2v10.27.0v10.28.0v10.29.0v10.3.0v10.3.1 | 12.73.0 |
snipe-it-8Docker Hardened Images:Alpine:3.23 | 8.8.0-r0 and later, plus listed versions 8.8.1-r08.8.3-r18.8.3-r28.8.3-r38.8.3-r4 Show 5 more versionsShow less8.8.3-r58.8.3-r68.8.4-r08.8.4-r18.8.4-r2 | None listed |
snipe-it-8Docker Hardened Images:Alpine:3.24 | 8.8.0-r0 and later, plus listed versions 8.8.1-r08.8.3-r18.8.3-r28.8.3-r38.8.3-r4 Show 5 more versionsShow less8.8.3-r58.8.3-r68.8.4-r08.8.4-r18.8.4-r2 | None listed |
snipe-it-8-php-extDocker Hardened Images:Debian:13 | 8.8.4-0 and later | None listed |
snipe-it-8Docker Hardened Images:Debian:13 | 8.8.0-0 and later, plus listed versions 8.8.1-08.8.3-18.8.3-28.8.3-38.8.3-4 Show 5 more versionsShow less8.8.3-58.8.3-68.8.4-08.8.4-18.8.4-2 | None listed |
The JSON record also has 1,215 more versions.
Products 2
Sources
CVE List Score usedCVSS 3.16.8
Laravel: Sanctum guard can resolve the lowest-ID user when evaluated inside an eager-loaded Eloquent relation definition
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.
- Record
CVE-2026-142636- CVSS 3.1
- 6.8 Medium
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N - Weakness
- CWE-863
- Updated
- 2026-12-05
EUVDEUVD-2026-141965CVSS 3.16.8
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.
- Record
EUVD-2026-141965- CVSS 3.1
- 6.8 Medium
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N - Updated
- 2026-12-05
GitHub AdvisoriesGHSA-vfxr-r8f8-gfmpCVSS 3.16.8
Laravel: Sanctum guard can resolve the lowest-ID user when evaluated inside an eager-loaded Eloquent relation definition
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.
- Record
GHSA-vfxr-r8f8-gfmp- CVSS 3.1
- 6.8 Medium
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N - Weakness
- CWE-863
- Updated
- 2026-12-03
NVDCVSS 3.16.8
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.
- Record
CVE-2026-142636- CVSS 3.1
- 6.8 Medium
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N - Weakness
- CWE-863
- Updated
- 2026-12-05
OSVCVSS 3.16.8
Laravel: Sanctum guard can resolve the lowest-ID user when evaluated inside an eager-loaded Eloquent relation definition
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.
- Record
CVE-2026-142636- CVSS 3.1
- 6.8 Medium
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N - Weakness
- CWE-863
- Updated
- 2026-12-03
OSVDHI-epnw-oqkk-i4g7-vbrlCVSS 3.16.8
Laravel is a web application framework. Prior to 12.73.0, When an authenticated user is first resolved while Eloquent…
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.
- Record
DHI-epnw-oqkk-i4g7-vbrl- CVSS 3.1
- 6.8 Medium
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N - Updated
- 2026-12-03
OSVGHSA-vfxr-r8f8-gfmpCVSS 3.16.8
Laravel: Sanctum guard can resolve the lowest-ID user when evaluated inside an eager-loaded Eloquent relation definition
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.
- Record
GHSA-vfxr-r8f8-gfmp- CVSS 3.1
- 6.8 Medium
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N - Weakness
- CWE-863
- Updated
- 2026-12-03
History
Recorded by Every CVE
| Day | Changed | Sources |
|---|---|---|
| Published date | CVE List, EUVD, NVD | |
| Affected packages, other IDs, references | OSV | |
| Published date | EUVD | |
| Affected packages, references | OSV | |
| Affected packages, key facts, references | GitHub Advisories | |
| Other IDs, references | OSV | |
| Other IDs, products, published date | EUVD, NVD | |
| First indexed | CVE List |
Upstream dates may differ.
References
github.com/laravel/framework/security/advisories/GHSA-vfxr-r8f8-gfmp
github.com/laravel/framework/pull/62483
github.com/laravel/framework/commit/6ea0fda8128e36e912e7fde755dac345bde9f5f7
github.com/laravel/framework/releases/tag/v12.73.0
nvd.nist.gov/vuln/detail/CVE-2026-142636
github.com/advisories/GHSA-vfxr-r8f8-gfmp
github.com/CVEProject/cvelistV5/tree/main/cves/2026/142xxx/CVE-2026-142636.json
scout.docker.com/v/DHI-epnw-oqkk-i4g7-vbrl
github.com/laravel/framework