CVE-2026-39976: Laravel Passport TokenGuard Authenticates Unrelated User For Vulnerability

HIGH
Advisory Identifier: GHSA-349c-2h2f-mxf6
CVSS 7.1
CWE-287
Published
Advisory Summary

CVE-2026-39976 is a HIGH (CVSS 7.1) tokenguard authenticates unrelated user for vulnerability (CWE-287: Improper Authentication) affecting Laravel Passport libraries in the Packagist ecosystem. The issue involves tokenguard authenticates unrelated user for client credentials tokens. Remediation is available by upgrading affected packages to version 13.7.1.

CVE-2026-39976 at a Glance

CVE Identifier CVE-2026-39976
GHSA Identifier GHSA-349c-2h2f-mxf6
Severity HIGH
CVSS v3.1 Base Score 7.1
CWE Classification CWE-287: Improper Authentication
Affected Product Laravel Passport
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 7.1

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:C/C:H/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2026-39976

To remediate this vulnerability, upgrade all affected Laravel Passport dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

laravel/passport fixed: 13.7.1
Upgrade laravel/passport to 13.7.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for laravel/passport

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-39976, inspect your project dependencies for Laravel Passport:

inspect dependencies for laravel/passport

Analyze the terminal output to locate any version of Laravel Passport in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 13.7.1), 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-287: Improper Authentication, where when an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct. In Laravel Passport, 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

### 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](https://laravel.com/docs/13.x/passport#:~:text=The%20underlying%20OAuth2,client%20credentials%20token). > 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. ### 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

CVE-2026-39976 Affected Laravel Passport Versions

1 component(s)
Fixed Versions:
13.7.1
Product / Package Ecosystem Affected Versions Fixed Version
laravel/passport
Packagist
≥ 13.0.0
< 13.7.1
13.7.1

References

Frequently Asked Questions

What is CVE-2026-39976?
CVE-2026-39976 is a security vulnerability in Laravel Passport involving TokenGuard Authenticates Unrelated User for Client Credentials Tokens under CWE-287: Improper Authentication.
Which Laravel Passport versions are affected?
Affected versions include releases prior to 13.7.1 across affected packages: laravel/passport.
What version fixes CVE-2026-39976?
Upgrading to 13.7.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is laravel/passport affected?
Yes, laravel/passport is affected in releases prior to 13.7.1. Upgrade your dependency to 13.7.1 or later.
What is the CVSS score of CVE-2026-39976?
CVE-2026-39976 has a CVSS v3.1 base score of 7.1 (HIGH) with vector string CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:L/A:N.
What CWE is associated with CVE-2026-39976?
CVE-2026-39976 is classified under CWE-287: Improper Authentication (When an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct.).
How can I check Packagist dependencies for CVE-2026-39976?
Run the dependency tree command: 'inspect dependencies for laravel/passport'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-349c-2h2f-mxf6",
  "modified" : "2026-04-13T17:48:46Z",
  "published" : "2026-04-08T19:57:55Z",
  "aliases" : [ "CVE-2026-39976" ],
  "summary" : "Laravel Passport: TokenGuard Authenticates Unrelated User for Client Credentials Tokens",
  "details" : "### 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",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "laravel/passport"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "13.0.0"
      }, {
        "fixed" : "13.7.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/laravel/passport/security/advisories/GHSA-349c-2h2f-mxf6"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-39976"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/laravel/passport/issues/1900"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/thephpleague/oauth2-server/issues/1456#issuecomment-2734989996"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/laravel/passport/pull/1901"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/laravel/passport/pull/1902"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/laravel/passport"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-287" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-04-08T19:57:55Z",
    "nvd_published_at" : "2026-04-09T17:16:31Z"
  }
}