# CVE-2026-28513: Pocket ID: OIDC authorization code validation uses AND instead of OR, allowing cross-client token exchange

> Attackers can exchange authorization codes across clients or reuse expired codes due to flawed validation logic, potentially leading to unauthorized access.

- **Severity:** High 8.5 (`CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:L/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 9 Mar 2026
- **Updated:** 10 Mar 2026
- **Also known as:** GHSA-qh6q-598w-w6m2, GO-2026-4656

## What is CVE-2026-28513?

CVE-2026-28513 is a high-severity authentication bypass vulnerability in pocket-id, published on 9 Mar 2026. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

Pocket ID is an OIDC provider that allows users to authenticate with their passkeys to your services. Prior to 2.4.0, the OIDC token endpoint rejects an authorization code only when both the client ID is wrong and the code is expired. This allows cross-client code exchange and expired code reuse. This vulnerability is fixed in 2.4.0.

Weakness: CWE-863 (Incorrect Authorization)

## Which versions are affected by CVE-2026-28513?

3 open source packages ship an affected version, including github.com/pocket-id/pocket-id/backend. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/pocket-id/pocket-id/backend` | Go | All versions | 0.0.0-20260307173642-b59e35cb59ae |
| `github.com/pocket-id/pocket-id/backend` | Go | All versions | 0.0.0-20260307173642-b59e35cb59ae |
| `github.com/pocket-id/pocket-id/backend` | Go | All versions | 0.0.0-20260307173642-b59e35cb59ae |

Products: Pocket-Id Pocket Id.

## How do I fix CVE-2026-28513?

Upgrade github.com/pocket-id/pocket-id/backend to 0.0.0-20260307173642-b59e35cb59ae or later.

## Is CVE-2026-28513 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-28513 exists.

## Other vulnerabilities in pocket-id

- [CVE-2026-43983](https://insights.sbomify.com/CVE-2026-43983/): Pocket ID: OIDC refresh token flow bypasses authorization revocation, account disabling, and group restrictions (high 8.5)
- [CVE-2026-28512](https://insights.sbomify.com/CVE-2026-28512/): Pocket ID: OAuth redirect_uri validation bypass via userinfo/host confusion (high 7.1)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-28513 and fix it if it is affected.

What it is: CVE-2026-28513 is a high-severity authentication bypass vulnerability in pocket-id, published on 9 Mar 2026. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-28513 exists.

Affected packages and fixed versions:
- github.com/pocket-id/pocket-id/backend (Go): affected all versions; fixed in 0.0.0-20260307173642-b59e35cb59ae
- github.com/pocket-id/pocket-id/backend (Go): affected all versions; fixed in 0.0.0-20260307173642-b59e35cb59ae
- github.com/pocket-id/pocket-id/backend (Go): affected all versions; fixed in 0.0.0-20260307173642-b59e35cb59ae

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-28513/ (Markdown: https://insights.sbomify.com/CVE-2026-28513/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-28513
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-28513
- OSV: https://osv.dev/vulnerability/CVE-2026-28513

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-28513/
Summaries are generated and may contain mistakes; the official description above is the record.
