CVE-2026-28513: Pocket ID OIDC Authorization Code Validation Uses Vulnerability
HIGHCVE-2026-28513 is a HIGH (CVSS 8.5) oidc authorization code validation uses vulnerability (CWE-863: Incorrect Authorization) affecting Pocket ID libraries in the Go ecosystem. The issue involves oidc authorization code validation uses and instead of or, allowing cross-client token exchange. Remediation is available by upgrading affected packages to version 0.0.0-20260307173642-b59e35cb59ae.
CVE-2026-28513 at a Glance
Security Impact
CVSS: 8.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:L/A:N).
How to Fix CVE-2026-28513
To remediate this vulnerability, upgrade all affected Pocket ID dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/pocket-id/pocket-id/backend to 0.0.0-20260307173642-b59e35cb59ae
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/pocket-id/pocket-id/backend
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-28513, inspect your project dependencies for Pocket ID:
inspect dependencies for github.com/pocket-id/pocket-id/backend
Analyze the terminal output to locate any version of Pocket ID in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.0.0-20260307173642-b59e35cb59ae), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-863: Incorrect Authorization, where the product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. In Pocket ID, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-28513 Affected Pocket ID Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/pocket-id/pocket-id/backend
|
Go |
< 0.0.0-20260307173642-b59e35cb59ae
|
0.0.0-20260307173642-b59e35cb59ae
|
References
Frequently Asked Questions
What is CVE-2026-28513?
Which Pocket ID versions are affected?
What version fixes CVE-2026-28513?
Is github.com/pocket-id/pocket-id/backend affected?
What is the CVSS score of CVE-2026-28513?
What CWE is associated with CVE-2026-28513?
How can I check Go dependencies for CVE-2026-28513?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-qh6q-598w-w6m2",
"modified" : "2026-03-10T18:43:07Z",
"published" : "2026-03-09T17:24:49Z",
"aliases" : [ "CVE-2026-28513" ],
"summary" : "Pocket ID: OIDC authorization code validation uses AND instead of OR, allowing cross-client token exchange",
"details" : "### Summary\n\nThe 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.\n\n### Details\n\n`backend/internal/service/oidc_service.go:407`\n\n```go\nif authorizationCodeMetaData.ClientID != input.ClientID && authorizationCodeMetaData.ExpiresAt.ToTime().Before(time.Now()) {\n return CreatedTokens{}, &common.OidcInvalidAuthorizationCodeError{}\n}\n```\n\n`&&` should be `||`. Current behavior:\n\n| Condition | Expected | Actual |\n|-----------|----------|--------|\n| Wrong client + valid code | Reject | **Accept** |\n| Correct client + expired code | Reject | **Accept** |\n\n### PoC\n\n**Prerequisite:** pocket-id running with `APP_ENV=test` and `BUILD_TAGS=e2etest`. The test user (Tim Cook) must have authorized both Nextcloud and Immich OIDC clients (i.e., `user_authorized_oidc_clients` records exist for both). The seed data includes an authorization code `auth-code` issued for the Nextcloud client.\n\n```bash\n# 1. Seed test data\ncurl -X POST \"http://localhost:1411/api/test/reset?skip-ldap=true\"\n\n# 2. Exchange Nextcloud's auth code using Immich's credentials\ncurl -X POST http://localhost:1411/api/oidc/token \\\n -H \"Content-Type: application/x-www-form-urlencoded\" \\\n -d \"grant_type=authorization_code\" \\\n -d \"code=auth-code\" \\\n -d \"client_id=606c7782-f2b1-49e5-8ea9-26eb1b06d018\" \\\n -d \"client_secret=PYjrE9u4v9GVqXKi52eur0eb2Ci4kc0x\" \\\n -d \"redirect_uri=http://immich/auth/callback\"\n# Expected: 400 (wrong client)\n# Actual: 200 with tokens — access_token.aud = Immich client ID\n```\n\n**Verified result:** HTTP 200 with tokens. The `access_token` audience is `606c7782-...` (Immich), despite the authorization code being issued for `3654a746-...` (Nextcloud).\n\n### Impact\n\nAny OIDC client operator can exchange authorization codes issued for other clients, obtaining tokens for users who never authorized that client. Expired authorization codes can also be reused with the correct client until the 24-hour cleanup job runs.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/pocket-id/pocket-id/backend"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.0.0-20260307173642-b59e35cb59ae"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/pocket-id/pocket-id/security/advisories/GHSA-qh6q-598w-w6m2"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-28513"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/pocket-id/pocket-id"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-863" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-03-09T17:24:49Z",
"nvd_published_at" : "2026-03-10T17:38:50Z"
}
}