CVE-2026-62662

CVE-2026-62662 is a high-severity improper input validation vulnerability in github.com/pocket-id/pocket-id/backend (go), affecting versions < 0.0.0-20260622164202-8158452b3730. It is fixed in 0.0.0-20260622164202-8158452b3730.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

Summary

Pocket ID: The client credentials grant allows any OIDC client to obtain tokens for arbitrary audiences

The client credentials grant (grant_type=client_credentials) does not validate the resource parameter before embedding it as the aud claim in the issued JWT. Any authenticated OIDC client can obtain a Pocket ID-signed access token claiming authorization for any arbitrary audience, including other registered OIDC clients. There is no check that the requested audience is a registered resource server, and no check that the requesting client has been granted permission to access it.

Details

In backend/internal/service/oidc_service.go, createTokenFromClientCredentials accepts the resource parameter from the token request and places it directly into the aud claim of the issued JWT without validation:

  audClaim := client.ID
  if input.Resource != "" {
      audClaim = input.Resource  // no validation performed
  }
  accessToken, err := s.jwtService.GenerateOAuthAccessToken(dummyUser, audClaim)

The only guard in this function is verifyClientCredentialsInternal, which confirms the requesting client's credentials are valid. After that check passes, any value supplied as resource is accepted. There is no registry of permitted audiences, no per-client authorization policy controlling which resources a client may request tokens for, and no validation that the resource value corresponds to anything registered in Pocket ID.

The introspection endpoint (/api/oidc/introspect) does not mitigate this. It checks that the introspecting client's ID matches the token's aud claim, but since the attacker controls aud, a resource server calling introspection to validate an inbound token will receive "active": true. Pocket ID has no server-side record of which client requested the token or whether it was authorized to do so, so introspection cannot distinguish a legitimately issued token from one obtained through this vulnerability.

PoC

Given a Pocket ID instance with two registered OIDC clients, client-a (attacker-controlled) and client-b (target resource), the following request causes Pocket ID to issue a signed JWT with aud: ["client-b"], authenticated only as client-a:

curl -X POST https://<pocket-id-host>/api/oidc/token \
    -d "grant_type=client_credentials" \
    -d "client_id=client-a" \
    -d "client_secret=<client-a-secret>" \
    -d "resource=client-b"

The response is a valid, Pocket ID-signed JWT with:

{
    "sub": "client-client-a",
    "aud": ["client-b"],
    "iss": "https://<pocket-id-host>",
    "type": "oauth-access-token"
}

This token will pass signature and aud validation at any resource server that trusts Pocket ID's JWKS and accepts client-b as its audience identifier.

Impact

Any OIDC client registered in Pocket ID that has valid credentials (client secret or federated identity) can obtain a Pocket ID-signed access token scoped to any other registered client or arbitrary audience string. In deployments where services use the client credentials grant and validate incoming bearer tokens against Pocket ID's JWKS, this allows a compromised or malicious client to bypass audience-based access controls and present tokens to resource servers it should not be authorized to access.

The severity depends on deployment: if no resource servers validate Pocket ID-issued access tokens, there is no immediate exploitable impact. In deployments that do rely on the client credentials grant for service-to-service authorization, the isolation between services is entirely broken.

The application does not adequately validate input before processing it, allowing unexpected values to reach sensitive code paths. Typical impact: varies by context: data corruption, logic bypass, or denial of service.

CVE-2026-62662 has a CVSS score of 7.7 (High). The vector is network-reachable, high privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (0.0.0-20260622164202-8158452b3730); upgrading removes the vulnerable code path.

Affected versions

github.com/pocket-id/pocket-id/backend (< 0.0.0-20260622164202-8158452b3730)

Security releases

github.com/pocket-id/pocket-id/backend → 0.0.0-20260622164202-8158452b3730 (go)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

Upgrade github.com/pocket-id/pocket-id/backend to 0.0.0-20260622164202-8158452b3730 or later to resolve this vulnerability.

Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.

Frequently Asked Questions

  1. What is CVE-2026-62662? CVE-2026-62662 is a high-severity improper input validation vulnerability in github.com/pocket-id/pocket-id/backend (go), affecting versions < 0.0.0-20260622164202-8158452b3730. It is fixed in 0.0.0-20260622164202-8158452b3730. The application does not adequately validate input before processing it, allowing unexpected values to reach sensitive code paths.
  2. How severe is CVE-2026-62662? CVE-2026-62662 has a CVSS score of 7.7 (High). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which versions of github.com/pocket-id/pocket-id/backend are affected by CVE-2026-62662? github.com/pocket-id/pocket-id/backend (go) versions < 0.0.0-20260622164202-8158452b3730 is affected.
  4. Is there a fix for CVE-2026-62662? Yes. CVE-2026-62662 is fixed in 0.0.0-20260622164202-8158452b3730. Upgrade to this version or later.
  5. Is CVE-2026-62662 exploitable, and should I be worried? Whether CVE-2026-62662 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2026-62662 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2026-62662? Upgrade github.com/pocket-id/pocket-id/backend to 0.0.0-20260622164202-8158452b3730 or later.

Other vulnerabilities in github.com/pocket-id/pocket-id/backend

Stop the waste.
Protect your environment with Kodem.