Laravel Passport is widely recognized as an OAuth2 server and API authentication package that is both simple and enjoyable for developers to implement. However, a newly disclosed security flaw has introduced a significant complication for certain configurations.
The vulnerability, tracked as CVE-2026-39976 with a CVSS score of 7.1, centers on how the system handles machine-to-machine tokens. Under specific conditions, an automated “client” can inadvertently be authenticated as a real, unrelated user.
The root of the issue lies in the TokenGuard component and its interaction with the underlying league/oauth2-server library.
When a client_credentials token is generated, the library sets the JWT sub (subject) claim to the client’s unique identifier since no actual user is involved in the transaction. The TokenGuard then takes this value and passes it to the retrieveById() function.
Because the guard does not verify whether the identifier actually belongs to a user or a client, it may resolve an unrelated real user whose ID happens to match the client’s identifier.
By default, Laravel Passport uses UUIDs (Universally Unique Identifiers) for clients. This default setting provides a layer of protection because a complex UUID string cannot collide with a user’s standard integer-based primary key.
The vulnerability is triggered when a developer manually sets Passport::$clientUuids to false. In this scenario, both clients and users may use simple integers for their IDs, making a collision—and a subsequent authentication bypass—highly likely.
This flaw also weakens the effectiveness of specific security layers. Even if an application uses the EnsureClientIsResourceOwner middleware, the system cannot guarantee that an incoming token is strictly a machine-to-machine (client credentials) token if the IDs match. This effectively allows a machine-to-machine token to bypass intended restrictions and act with the authority of a human user.
The Laravel team has released a formal fix to address this authentication bypass.
| Solution Type | Recommendation |
| Primary Patch |
Upgrade Laravel Passport to v13.7.1 or later. |
| Immediate Workaround |
Disallow the usage of the |
Support Our Threat Intelligence
If you find our CVE report and cybersecurity news helpful, consider supporting our work.