Skip to content

Commit d1cdf01

Browse files
1 parent 94bb1e7 commit d1cdf01

File tree

1 file changed

+71
-0
lines changed

1 file changed

+71
-0
lines changed
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-349c-2h2f-mxf6",
4+
"modified": "2026-04-08T19:57:55Z",
5+
"published": "2026-04-08T19:57:55Z",
6+
"aliases": [],
7+
"summary": "Laravel Passport: TokenGuard Authenticates Unrelated User for Client Credentials Tokens",
8+
"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",
9+
"severity": [
10+
{
11+
"type": "CVSS_V3",
12+
"score": "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:L/A:N"
13+
}
14+
],
15+
"affected": [
16+
{
17+
"package": {
18+
"ecosystem": "Packagist",
19+
"name": "laravel/passport"
20+
},
21+
"ranges": [
22+
{
23+
"type": "ECOSYSTEM",
24+
"events": [
25+
{
26+
"introduced": "0"
27+
},
28+
{
29+
"fixed": "13.7.1"
30+
}
31+
]
32+
}
33+
]
34+
}
35+
],
36+
"references": [
37+
{
38+
"type": "WEB",
39+
"url": "https://github.com/laravel/passport/security/advisories/GHSA-349c-2h2f-mxf6"
40+
},
41+
{
42+
"type": "WEB",
43+
"url": "https://github.com/laravel/passport/issues/1900"
44+
},
45+
{
46+
"type": "WEB",
47+
"url": "https://github.com/thephpleague/oauth2-server/issues/1456#issuecomment-2734989996"
48+
},
49+
{
50+
"type": "WEB",
51+
"url": "https://github.com/laravel/passport/pull/1901"
52+
},
53+
{
54+
"type": "WEB",
55+
"url": "https://github.com/laravel/passport/pull/1902"
56+
},
57+
{
58+
"type": "PACKAGE",
59+
"url": "https://github.com/laravel/passport"
60+
}
61+
],
62+
"database_specific": {
63+
"cwe_ids": [
64+
"CWE-287"
65+
],
66+
"severity": "HIGH",
67+
"github_reviewed": true,
68+
"github_reviewed_at": "2026-04-08T19:57:55Z",
69+
"nvd_published_at": null
70+
}
71+
}

0 commit comments

Comments
 (0)