CVE-2026-142636: Laravel Sanctum Guard Can Resolve The Vulnerability
MODERATECVE-2026-142636 is a MODERATE (CVSS 6.8) sanctum guard can resolve the vulnerability (CWE-863: Incorrect Authorization) affecting Laravel libraries in the Packagist ecosystem. The issue involves sanctum guard can resolve the lowest-id user when evaluated inside an eager-loaded eloquent relation definition. Remediation is available by upgrading affected packages to version 12.73.0.
CVE-2026-142636 at a Glance
Security Impact
CVSS: 6.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N).
How to Fix CVE-2026-142636
To remediate this vulnerability, upgrade all affected Laravel dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade laravel/framework to 12.73.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for laravel/framework
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-142636, inspect your project dependencies for Laravel:
inspect dependencies for laravel/framework
Analyze the terminal output to locate any version of Laravel in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 12.73.0), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-863: Incorrect Authorization, where the product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. In Laravel, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-142636 Affected Laravel Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
laravel/framework
|
Packagist |
< 12.73.0
|
12.73.0
|
References
Frequently Asked Questions
What is CVE-2026-142636?
Which Laravel versions are affected?
What version fixes CVE-2026-142636?
Is laravel/framework affected?
What is the CVSS score of CVE-2026-142636?
What CWE is associated with CVE-2026-142636?
How can I check Packagist dependencies for CVE-2026-142636?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-vfxr-r8f8-gfmp",
"modified" : "2026-12-03T18:08:59Z",
"published" : "2026-12-03T18:08:58Z",
"aliases" : [ "CVE-2026-142636" ],
"summary" : "Laravel: Sanctum guard can resolve the lowest-ID user when evaluated inside an eager-loaded Eloquent relation definition",
"details" : "### Impact\n\nWhen 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.\n\n### Patches\n\nThe 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.\n\n### Workarounds\n\nAvoid resolving the authenticated user inside relation definitions. Resolve the user ID beforehand and pass it explicitly through an eager-load constraint closure.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "laravel/framework"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "12.73.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/laravel/framework/security/advisories/GHSA-vfxr-r8f8-gfmp"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-142636"
}, {
"type" : "WEB",
"url" : "https://github.com/laravel/framework/pull/62483"
}, {
"type" : "WEB",
"url" : "https://github.com/laravel/framework/commit/6ea0fda8128e36e912e7fde755dac345bde9f5f7"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/laravel/framework"
}, {
"type" : "WEB",
"url" : "https://github.com/laravel/framework/releases/tag/v12.73.0"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-863" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-12-03T18:08:58Z",
"nvd_published_at" : "2026-12-02T23:18:42Z"
}
}