{"vuln_id":"GHSA-vfxr-r8f8-gfmp","aliases":[],"description":"Sanctum guard can resolve the lowest-ID user when evaluated inside an eager-loaded Eloquent relation definition","published_at":"2026-11-18T12:40:46Z","modified_at":"2026-11-18T12:40:46Z","first_seen_at":"2026-11-21T19:15:07.355235Z","severity":"medium","severity_source":"ghsa","cvss_score":6.8,"cvss_vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N","cwe":["CWE-863"],"vendor":null,"product":null,"kev":{"is_kev":false,"date_added":null,"due_date":null,"ransomware":false},"epss":null,"epss_percentile":null,"nvd_status":null,"enriched_at":null,"links":{"nvd":"https://github.com/advisories/GHSA-vfxr-r8f8-gfmp"},"matched_alias":null,"items":[{"id":579,"source":{"id":"gh-laravel","name":"Laravel framework releases (GitHub laravel/framework)"},"title":"GHSA-vfxr-r8f8-gfmp: Sanctum guard can resolve the lowest-ID user when evaluated inside an eager-loaded Eloquent relation definition","summary":"Sanctum guard can resolve the lowest-ID user when evaluated inside an eager-loaded Eloquent relation definition\n\n### Impact\r\n\r\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.\r\n\r\n### Patches\r\n\r\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.\r\n\r\n### Workarounds\r\n\r\nAvoid resolving the authenticated user inside relation definitions. Resolve the user ID beforehand and pass it explicitly through an eager-load constraint closure.\n\nAffected packages: composer:laravel/framework\nPatched: laravel/framework >=12.73.0","url":"https://github.com/laravel/framework/security/advisories/GHSA-vfxr-r8f8-gfmp","published_at":"2026-11-18T12:40:46Z","updated_at":"2026-11-18T12:40:46Z","fetched_at":"2026-11-21T19:15:07.232351Z","severity":"medium","cvss_score":6.8,"epss":null,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":"laravel","product":"laravel/framework","vuln_id":"GHSA-vfxr-r8f8-gfmp","vuln_ids":["GHSA-VFXR-R8F8-GFMP"],"tags":["repo-advisory","composer","CWE-863","security","repo:laravel/framework"],"cluster_id":419,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/579","html":"https://vulnwatch.ve1ve2.com/item/579"}},{"id":594,"source":{"id":"gh-laravel","name":"Laravel framework releases (GitHub laravel/framework)"},"title":"[SECURITY RELEASE] laravel/framework v12.73.0","summary":"Fixes advisories: GHSA-ch34-gjmh-c4hp, GHSA-h84h-g58v-xg2h, GHSA-wwq3-m3j5-wv66, GHSA-cgwv-q695-mj8g, GHSA-hv67-wfqj-w9xv, GHSA-hxc4-wvjf-r59p, GHSA-9966-43cq-4mpr, GHSA-559m-v249-7qw2, GHSA-5xc4-gpwg-p8wq, GHSA-6pxv-c29g-cc5h, GHSA-vfxr-r8f8-gfmp\n\nSecurity keywords: xss\n\n[12.x] Fix not_regex passing when the pattern match fails by\n@pushpak1300\nin\n#62428\n\n[12.x] Compare fluent database rule\nwhere()\nvalues literally by\n@pushpak1300\nin\n#62426\n\n[12.x] Use possessive quantifiers in decimal validation rule by\n@pushpak1300\nin\n#62421\n\n[12.x] Fix XSS in debug page's \"copy request URL\" by\n@crynobone\nin\n#62418\n\n[12.x] Fix EncodedParameter being encoded again in numeric query parameters by\n@ghabriel25\nin\n#62417\n\n[12.x] Prevent array\nexpires\nparameters from bypassing signed URL expiration by\n@GrahamCampbell\nin\n#62411\n\n[12.x] Fix\nArr::forget()\nremoving the wrong element by\n@GrahamCampbell\nin\n#62410\n\n[12.x] Fix wildcard validation rules skipping empty array keys by\n@GrahamCampbell\nin\n#62409\n\n[12.x] Compare integers and booleans as strings in the database presence verifier by\n@pushpak1300\nin\n#62448\n\n[12.x] Keep every where on the same column in exists and unique rules by\n@raghavji2050\nin\n#62463\n\n[12.x] Render bound attributes of dynamic class components like the component tag by\n@pushpak1300\nin\n#62456\n\n[12.x] Ignore extension-owned tables when dropping all tables on PostgreSQL by\n@raghavji2050\nin\n#62477\n\n[12.x] Keep every condition on the same column in string exists and unique rules by\n@raghavji2050\nin\n#62476\n\n[12.x] Validate dynamic component, slot, and attribute names by\n@pushpak1300\nin\n#62454\n\n[12.x] Fix deprecation when calling from() with a subquery and no alias by\n@raghavji2050\nin\n#62482\n\n[12.x] Add JsonSchema::rules() to derive validation rules from a schema by\n@pushpak1300\nin\n#62501\n\n[12.x] Fix Eloquent mass-assignment guard bypass via mutator attribute-name normalization mismatch by\n@crynobone\nin\n#62499\n\n[12.x] Prevent DoS in\nIlluminate\\JsonSchema\\Deserializer\nby bounding\n$ref\nchain depth by\n@crynobone\nin\n#62498\n\n[12.x] Splitter workflow by\n@joetannenbaum\nin\n#62507\n\n[12.x] Disconnect database connections when the test environment is torn down by\n@raghavji2050\nin\n#62494\n\n[12.x] Log dropped Cloud events to stderr by\n@jradtilbrook\nin\n#62493\n\n[12.x] Check Forge and Vapor environment variables instead of just\nHost\nvalues by\n@crynobone\nin\n#62484\n\n[12.x] Preserve relation constraints when resolving attributes during noConstraints by\n@crynobone\nin\n#62483\n\n[12.x] Fix XSS in component attributes by\n@crynobone\nin\n#62503\n\n[12.x] Updated split/release workflows by\n@joetannenbaum\nin\n#62513\n\n[12.x] Fix file validation bypass with empty input field collisions by\n@crynobone\nin\n#62504","url":"https://github.com/laravel/framework/releases/tag/v12.73.0","published_at":"2026-11-17T14:56:30Z","updated_at":null,"fetched_at":"2026-11-21T19:15:07.232376Z","severity":"medium","cvss_score":6.8,"epss":null,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":"laravel","product":"framework","vuln_id":"GHSA-ch34-gjmh-c4hp","vuln_ids":["GHSA-559M-V249-7QW2","GHSA-5XC4-GPWG-P8WQ","GHSA-6PXV-C29G-CC5H","GHSA-9966-43CQ-4MPR","GHSA-CGWV-Q695-MJ8G","GHSA-CH34-GJMH-C4HP","GHSA-H84H-G58V-XG2H","GHSA-HV67-WFQJ-W9XV","GHSA-HXC4-WVJF-R59P","GHSA-VFXR-R8F8-GFMP","GHSA-WWQ3-M3J5-WV66"],"tags":["release","repo:laravel/framework","security"],"cluster_id":404,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/594","html":"https://vulnwatch.ve1ve2.com/item/594"}}]}