Get a Demo

Let's Patch It!

Book a short call with one our specialists, we'll walk you through how Endor Patches work, and ask you a few questions about your environment (like your primary programming languages and repository management). We'll also send you an email right after you fill out the form, feel free to reply with any questions you have in advance!

CVE

CVE-2026-39976

Laravel Passport: TokenGuard Authenticates Unrelated User for Client Credentials Tokens
Back to all
CVE

CVE-2026-39976

Laravel Passport: TokenGuard Authenticates Unrelated User for Client Credentials Tokens

Impact

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.

Usage of EnsureClientIsResourceOwner middleware together with Passport::$clientUuids set to false, can result in resolving the user instead, as stated in the documentation

The underlying OAuth2 server 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.

Patches

Patched in v13.7.1

Workarounds

Is there a way for users to fix or remediate the vulnerability without upgrading?

Disallow usage of client_credentials

References

  • https://github.com/laravel/passport/issues/1900
  • https://github.com/laravel/passport/pull/1901
  • https://github.com/laravel/passport/pull/1902
  • https://github.com/thephpleague/oauth2-server/issues/1456#issuecomment-2734989996

Package Versions Affected

Package Version
patch Availability
No items found.

Automatically patch vulnerabilities without upgrading

Fix Without Upgrading
Detect compatible fix
Apply safe remediation
Fix with a single pull request

CVSS Version

Severity
Base Score
CVSS Version
Score Vector
C
H
U
7.1
-
3.1
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:L/A:N
C
H
U
0
-
3.1
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:L/A:N
C
H
U
-

Related Resources

No items found.

References

https://github.com/laravel/passport/security/advisories/GHSA-349c-2h2f-mxf6, https://nvd.nist.gov/vuln/detail/CVE-2026-39976, https://github.com/laravel/passport/issues/1900, https://github.com/thephpleague/oauth2-server/issues/1456#issuecomment-2734989996, https://github.com/laravel/passport/pull/1901, https://github.com/laravel/passport/pull/1902, https://github.com/laravel/passport

Severity

7.1

CVSS Score
0
10

Basic Information

Ecosystem
Base CVSS
7.1
EPSS Probability
0.00112%
EPSS Percentile
0.29357%
Introduced Version
13.0.0
Fix Available
13.7.1

Fix Critical Vulnerabilities Instantly

Secure your app without upgrading.
Fix Without Upgrading