Description
Punk::OAuth2::Server versions through 0.03 for Perl issue access tokens outside a client's registered scopes and grant types because no authorization path reads them.

Punk::OAuth2::Server::Store registers scopes and grant_types per client and documents both as client registration. token dispatches on the grant_type in the request body, so a client registered for authorization_code alone can ask for client_credentials, and that arm passes the requested scope straight to the minter, which signs it into the at+jwt access token. authorize copies the query scope into the authorization code record without comparing it against the registration, leaving the optional consent hook as the only check between an arbitrary scope and the issued code. redirect_uris on the same client row is read and enforced.

A registered client can obtain a correctly signed token carrying any scope it names, and a resource server running Punk::OAuth2::Checker accepts that token and honours the scope. A client registered without a secret authenticates on its client_id alone, so anyone who knows that identifier can request one.
Published: 2026-08-22
Score: n/a
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The vulnerability arises because Punk::OAuth2::Server fails to validate the grant_type and scope in the token request against the client registration. As a result, a client registered with only the authorization_code grant can request client_credentials and obtain a signed access token that carries any scope it names. The server then signs the token and returns it without checking that the requested scope is permitted. This allows an attacker who knows a client identifier to request an access token with arbitrary scopes, yielding full access to a protected resource if the resource server trusts the token.

Affected Systems

The affected product is the Perl module Punk::OAuth2::Server, versions through 0.03. The library is maintained on CPAN under the umbrella of LNATION. Clients using any version up to 0.03 are susceptible to the flaw, while upgrading to 0.04 or later removes the issue.

Risk and Exploitability

The risk is severe because the flaw permits scope escalation and unauthorized grant type usage without proper authorization checks, an omission classified as CWE‑862. No CVSS score is provided in the current data, but the vulnerability lends itself to remote exploitation: an attacker only needs to discover a valid client identifier, which may be public, to obtain a forged token. With EPSS not available and the issue not listed in the CISA KEV catalog, the objective exploitation probability remains unknown, though the attack vector is highly feasible over the network. An immediate patch is recommended to mitigate the risk.

Generated by OpenCVE AI on August 22, 2026 at 15:29 UTC.

Remediation

Vendor Solution

Upgrade to Punk-OAuth2 0.04 or later.


Vendor Workaround

In a proxy ahead of Punk::OAuth2::Server, reject a token or authorization request that asks for a grant type or scope the client is not registered for.


OpenCVE Recommended Actions

  • Upgrade Punk::OAuth2 to version 0.04 or later
  • If upgrading is not immediately possible, place a proxy in front of Punk::OAuth2::Server that rejects any token or authorization request containing a grant type or scope not registered for the client
  • Institute a hard requirement for a client secret, disabling client_credentials for clients lacking a secret
  • Configure the resource server to perform a strict scope validation against the client registration, even if the access token is signed

Generated by OpenCVE AI on August 22, 2026 at 15:29 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Sat, 22 Aug 2026 14:00:00 +0000

Type Values Removed Values Added
Description Punk::OAuth2::Server versions through 0.03 for Perl issue access tokens outside a client's registered scopes and grant types because no authorization path reads them. Punk::OAuth2::Server::Store registers scopes and grant_types per client and documents both as client registration. token dispatches on the grant_type in the request body, so a client registered for authorization_code alone can ask for client_credentials, and that arm passes the requested scope straight to the minter, which signs it into the at+jwt access token. authorize copies the query scope into the authorization code record without comparing it against the registration, leaving the optional consent hook as the only check between an arbitrary scope and the issued code. redirect_uris on the same client row is read and enforced. A registered client can obtain a correctly signed token carrying any scope it names, and a resource server running Punk::OAuth2::Checker accepts that token and honours the scope. A client registered without a secret authenticates on its client_id alone, so anyone who knows that identifier can request one.
Title Punk::OAuth2::Server versions through 0.03 for Perl issue access tokens outside a client's registered scopes and grant types because no authorization path reads them
Weaknesses CWE-862
References

Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: CPANSec

Published:

Updated: 2026-08-22T13:52:49.922Z

Reserved: 2026-08-18T11:17:09.339Z

Link: CVE-2026-75866

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-08-22T14:16:33.700

Modified: 2026-08-22T14:16:33.700

Link: CVE-2026-75866

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-22T15:30:05Z

Weaknesses