/

CVE-2026-57458

Severity:

HIGH RISK

(8.1)

Authorization Scope Bypass (CWE-269) in Vikunja OAuth

CVE-2026-57458

Deferred

Vulnerability type

Category:

Authorization Scope Bypass

CWE:

CWE-269

Impact:

Privilege Escalation and Unauthorized Access

Severity:

HIGH RISK

(8.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Vikunja 2.3.0 can convert a narrowly scoped API token with only the oauth.authorize permission into a normal bearer JWT and refresh token. Because the resulting credentials do not retain the original scope, an attacker who can use such a token may access additional routes available to the same user.

Vikunja 2.3.0 can convert a narrowly scoped API token with only the oauth.authorize permission into a normal bearer JWT and refresh token. Because the resulting credentials do not retain the original scope, an attacker who can use such a token may access additional routes available to the same user.

Affected context

The issue occurs in Vikunja deployments where scoped API tokens can invoke the OAuth authorization and token-exchange flow. It becomes risky when a token restricted to oauth.authorize can obtain general bearer credentials whose permissions are evaluated independently of the originating token's scope.

The issue occurs in Vikunja deployments where scoped API tokens can invoke the OAuth authorization and token-exchange flow. It becomes risky when a token restricted to oauth.authorize can obtain general bearer credentials whose permissions are evaluated independently of the originating token's scope.

Exploit preconditions

  • Attack surface: Vikunja OAuth API endpoints
  • Required access: A valid scoped API token with the oauth.authorize permission
  • Trigger point: Authorization-code creation followed by token exchange at the OAuth token endpoint
  • Why exploitation is possible: The issued JWT and refresh token do not preserve or enforce the source token's narrower authorization scope
  • Attack surface: Vikunja OAuth API endpoints
  • Required access: A valid scoped API token with the oauth.authorize permission
  • Trigger point: Authorization-code creation followed by token exchange at the OAuth token endpoint
  • Why exploitation is possible: The issued JWT and refresh token do not preserve or enforce the source token's narrower authorization scope

Why this happens

The underlying flaw is an authorization-context transition that fails to preserve least-privilege constraints. A token limited to one OAuth operation can be exchanged for credentials evaluated as general user credentials, allowing access decisions to omit the restrictions attached to the original token. This behavior maps to CWE-269: Improper Privilege Management, because a lower-privileged authorization context can result in credentials with broader effective privileges.

The underlying flaw is an authorization-context transition that fails to preserve least-privilege constraints. A token limited to one OAuth operation can be exchanged for credentials evaluated as general user credentials, allowing access decisions to omit the restrictions attached to the original token. This behavior maps to CWE-269: Improper Privilege Management, because a lower-privileged authorization context can result in credentials with broader effective privileges.

Potential impact

  • An attacker may access API routes outside the declared scope of the original token.
  • The attacker could perform actions permitted to the associated user account.
  • Sensitive user or task-management data may be exposed or modified.
  • The resulting credentials may remain usable until expiration or revocation, depending on deployment controls.
  • An attacker may access API routes outside the declared scope of the original token.
  • The attacker could perform actions permitted to the associated user account.
  • Sensitive user or task-management data may be exposed or modified.
  • The resulting credentials may remain usable until expiration or revocation, depending on deployment controls.

General mitigation guidance

Mitigation generally focuses on preserving authorization context throughout token issuance and use.

Common defensive patterns include:

  • Bind exchanged access and refresh tokens to the effective scope of the originating token.
  • Revalidate scopes and user permissions at every authorization boundary.
  • Issue only the minimum credentials required for the requested OAuth operation.
  • Limit refresh-token privileges and support prompt revocation of suspicious credentials.
  • Apply least-privilege permissions to user accounts, service identities, and API tokens.
  • Monitor and restrict OAuth flows that produce credentials with broader privileges than their inputs.

These patterns reduce the risk of privilege expansion even when a scoped token is exposed.

Mitigation generally focuses on preserving authorization context throughout token issuance and use.

Common defensive patterns include:

  • Bind exchanged access and refresh tokens to the effective scope of the originating token.
  • Revalidate scopes and user permissions at every authorization boundary.
  • Issue only the minimum credentials required for the requested OAuth operation.
  • Limit refresh-token privileges and support prompt revocation of suspicious credentials.
  • Apply least-privilege permissions to user accounts, service identities, and API tokens.
  • Monitor and restrict OAuth flows that produce credentials with broader privileges than their inputs.

These patterns reduce the risk of privilege expansion even when a scoped token is exposed.

How teams detect issues like this

Organizations can look for authorization-context inconsistencies through:

  • Integration tests that compare source-token scopes with scopes on issued access and refresh tokens.
  • Static analysis and code review checks for token-exchange paths that construct credentials without copying or validating scope.
  • API policy tests covering every OAuth endpoint and protected route.
  • Audit-log correlation between scoped-token use, authorization-code issuance, and subsequent access to out-of-scope endpoints.
  • Automated security review tools that flag privilege expansion and missing authorization checks.

Organizations can look for authorization-context inconsistencies through:

  • Integration tests that compare source-token scopes with scopes on issued access and refresh tokens.
  • Static analysis and code review checks for token-exchange paths that construct credentials without copying or validating scope.
  • API policy tests covering every OAuth endpoint and protected route.
  • Audit-log correlation between scoped-token use, authorization-code issuance, and subsequent access to out-of-scope endpoints.
  • Automated security review tools that flag privilege expansion and missing authorization checks.

Sources

SourceLink
github.comgithub.com/go-vikunja/vikunja/commit/4ae2e093014881052ed8f8ecd8bcb9adf83dd276
github.comgithub.com/go-vikunja/vikunja/releases/tag/v2.4.0
github.comgithub.com/go-vikunja/vikunja/security/advisories/GHSA-v3p6-34mc-hj7v

Frequently asked

questions

It may be exploitable through the API when an attacker possesses a valid scoped API token and can reach the OAuth endpoints. Network exposure and deployment controls determine practical reachability.

The attacker needs a token that can invoke the oauth.authorize operation. The token does not necessarily need broad permissions for the issue to become relevant.

Preserve the originating token's scope throughout authorization-code exchange and ensure every issued credential is independently constrained and validated.

Test privilege transitions explicitly, apply least privilege to API tokens, enforce authorization at each route, and monitor for credentials whose effective permissions exceed their issuing context.

It may be exploitable through the API when an attacker possesses a valid scoped API token and can reach the OAuth endpoints. Network exposure and deployment controls determine practical reachability.

The attacker needs a token that can invoke the oauth.authorize operation. The token does not necessarily need broad permissions for the issue to become relevant.

Preserve the originating token's scope throughout authorization-code exchange and ensure every issued credential is independently constrained and validated.

Test privilege transitions explicitly, apply least privilege to API tokens, enforce authorization at each route, and monitor for credentials whose effective permissions exceed their issuing context.

Find out what's already
exploitable in your codebase.