GIVE YOUR AGENT THE EVIDENCE

Set up in your agent.

One prompt to get started. Paste it into your coding agent to connect cve.new through MCP and bring vulnerability context into your workflow.

Your agent needs remote MCP support and access to https://cve.new/mcp.

Read the setup guide

GIVE YOUR AGENT THE EVIDENCE

Investigate in your agent.

Turn this advisory into a focused investigation. Ask your agent to check your project’s versions, explain the evidence, and suggest a compatible fix.

Your agent needs remote MCP support and access to https://cve.new/mcp.

Read the setup guide

GHSA-349c-2h2f-mxf6high7.1

Laravel Passport: TokenGuard Authenticates Unrelated User for Client Credentials Tokens

Check your stack

The advisory, in context

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

Affected packages

Start with the recorded fix for your release branch. Check your installed version and test compatibility before upgrading. Fixing this advisory does not rule out other vulnerabilities in the release.

Ecosystem versions

From 13.0.0 before 13.7.1

Fixed in 13.7.1

20 explicitly affected versions

v13.0.0, v13.0.1, v13.0.2, v13.0.3, v13.0.4, v13.0.5, v13.0.6, v13.1.0, v13.2.0, v13.2.1, v13.2.2, v13.3.0, v13.4.0, v13.4.1, v13.4.2, v13.4.3, v13.4.4, v13.5.0, v13.6.0, v13.7.0

View affected-version evidence
{
  "ranges": [
    {
      "events": [
        {
          "introduced": "13.0.0"
        },
        {
          "fixed": "13.7.1"
        }
      ],
      "type": "ECOSYSTEM"
    }
  ],
  "versions": [
    "v13.0.0",
    "v13.0.1",
    "v13.0.2",
    "v13.0.3",
    "v13.0.4",
    "v13.0.5",
    "v13.0.6",
    "v13.1.0",
    "v13.2.0",
    "v13.2.1",
    "v13.2.2",
    "v13.3.0",
    "v13.4.0",
    "v13.4.1",
    "v13.4.2",
    "v13.4.3",
    "v13.4.4",
    "v13.5.0",
    "v13.6.0",
    "v13.7.0"
  ]
}

References