{"id":"CVE-2026-39976","aliases":["CVE-2026-39976","GHSA-349c-2h2f-mxf6"],"related":[],"kind":"vulnerability","state":"published","title":"Laravel Passport's TokenGuard Authenticates Unrelated User for Client Credentials Tokens","summary":"Laravel Passport provides OAuth2 server support to Laravel. From 13.0.0 to before 13.7.1, there is an Authentication Bypass for client_credentials tokens. the league/oauth2-server library sets the JWT sub claim to the client identifier (since there's no user). The token guard then passes this value to retrieveById() without validating it's actually a user identifier, potentially resolving an unrelated real user. Any machine-to-machine token can inadvertently authenticate as an actual user. This vulnerability is fixed in 13.7.1.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Laravel Passport provides OAuth2 server support to Laravel. From 13.0.0 to before 13.7.1, there is an Authentication Bypass for client_credentials tokens. the league/oauth2-server library sets the JWT sub claim to the client identifier (since there's no user). The token guard then passes this value to retrieveById() without validating it's actually a user identifier, potentially resolving an unrelated real user. Any machine-to-machine token can inadvertently authenticate as an actual user. This vulnerability is fixed in 13.7.1.","source":"cvelist"},{"lang":"en","text":"### Impact\nAuthentication Bypass for `client_credentials` tokens. the league/oauth2-server library sets the JWT sub claim to the client identifier (since there's no user). The token guard then passes this value to retrieveById() without validating it's actually a user identifier, potentially resolving an unrelated real user. Any machine-to-machine token can inadvertently authenticate as an actual user.\n\n\nUsage of `EnsureClientIsResourceOwner` middleware together with `Passport::$clientUuids` set to `false`, can result in resolving the user instead, as stated in the [documentation](https://laravel.com/docs/13.x/passport#:~:text=The%20underlying%20OAuth2,client%20credentials%20token). \n\n> The [underlying OAuth2 server](https://oauth2.thephpleague.com/database-setup/#:~:text=Please%20note%20that,the%20bearer%20token.) sets the token's sub claim to the client's identifier for client credentials tokens. By default, Passport uses UUIDs for clients, so this cannot collide with a user's integer primary key. However, if you have set Passport::$clientUuids to false, a client credentials token may inadvertently resolve a user whose ID matches the client's ID. In such cases, using this middleware cannot guarantee that the incoming token is a client credentials token.\n\n### Patches\nPatched in v13.7.1\n\n### Workarounds\n_Is there a way for users to fix or remediate the vulnerability without upgrading?_\nDisallow usage of `client_credentials`. \n\n\n### References\n- https://github.com/laravel/passport/issues/1900\n- https://github.com/laravel/passport/pull/1901\n- https://github.com/laravel/passport/pull/1902\n- https://github.com/thephpleague/oauth2-server/issues/1456#issuecomment-2734989996","format":"markdown","source":"ghsa"},{"lang":"es","text":"Laravel Passport proporciona soporte de servidor OAuth2 a Laravel. Desde la 13.0.0 hasta antes de la 13.7.1, existe una omisión de autenticación para los tokens de client_credentials. La biblioteca league/oauth2-server establece la declaración sub de JWT al identificador del cliente (ya que no hay usuario). El token guard luego pasa este valor a retrieveById() sin validar que es realmente un identificador de usuario, resolviendo potencialmente un usuario real no relacionado. Cualquier token de máquina a máquina puede autenticarse inadvertidamente como un usuario real. Esta vulnerabilidad está corregida en la 13.7.1.","source":"nvd"}],"published":"2026-04-08T19:57:55.000Z","modified":"2026-10-26T21:10:00.170Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:L/A:N","score":7.1,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:L/A:N","score":7.1,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:L/A:N","score":7.1,"rating":"HIGH"}],"cwes":["CWE-287"],"affected":[{"ranges":[{"version":">= 13.0.0, < 13.7.1","status":"affected"}],"vendor":"laravel","product":"passport","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"13.0.0","status":"affected","fixed":"13.7.1"}],"ecosystem":"Packagist","package":"laravel/passport","purl":"pkg:composer/laravel/passport","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"13.0.0","fixed":"13.7.1"}],"vendor":"laravel","product":"passport","cpe":"cpe:2.3:a:laravel:passport:*:*:*:*:*:laravel:*:*","source":"nvd"}],"references":[{"url":"https://github.com/laravel/passport/security/advisories/GHSA-349c-2h2f-mxf6","tags":["mitigation","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/laravel/passport/issues/1900","tags":["exploit","issue-tracking","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/thephpleague/oauth2-server/issues/1456#issuecomment-2734989996","tags":["issue-tracking","patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/laravel/passport/pull/1901","tags":["issue-tracking","patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/laravel/passport/pull/1902","tags":["issue-tracking","patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-39976","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/laravel/passport","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-04-09T17:38:00.854Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-39976","url":"https://www.cve.org/CVERecord?id=CVE-2026-39976","licence":"CVE Terms of Use","modified":"2026-04-09T19:31:53.801Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-349c-2h2f-mxf6","url":"https://github.com/advisories/GHSA-349c-2h2f-mxf6","licence":"CC-BY-4.0","modified":"2026-04-13T18:11:23.408Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-39976","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-39976","licence":"Public domain","modified":"2026-10-26T21:10:00.170Z"}],"updatedAt":"2026-11-25T22:59:18.387Z","epss":{"score":0.00301,"percentile":0.24551,"date":"2026-12-01T12:00:22.000Z"}}