CVE-2026-28268: Code.vikunja.io/api Vikunja Vulnerable To Account Takeover Vulnerability

CRITICAL
Advisory Identifier: GHSA-rfjg-6m84-crj2
CVSS 9.8
CWE-640 CWE-459
Published
Advisory Summary

CVE-2026-28268 is a CRITICAL (CVSS 9.8) vikunja vulnerable to account takeover vulnerability (CWE-640: Weak Password Recovery Mechanism for Forgotten Password) affecting Code.vikunja.io/api libraries in the Go ecosystem. The issue involves vikunja vulnerable to account takeover via password reset token reuse. Remediation is available in the latest vendor maintenance releases.

CVE-2026-28268 at a Glance

CVE Identifier CVE-2026-28268
GHSA Identifier GHSA-rfjg-6m84-crj2
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-640: Weak Password Recovery Mechanism for Forgotten Password
Affected Product Code.vikunja.io/api
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 9.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).

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

How to Fix CVE-2026-28268

To remediate this vulnerability, upgrade all affected Code.vikunja.io/api dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

code.vikunja.io/api fixed: Latest secure release
Upgrade code.vikunja.io/api to Latest secure release
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for code.vikunja.io/api

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-28268, inspect your project dependencies for Code.vikunja.io/api:

inspect dependencies for code.vikunja.io/api

Analyze the terminal output to locate any version of Code.vikunja.io/api in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), 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-640: Weak Password Recovery Mechanism for Forgotten Password, where the product contains a mechanism for users to recover or change their passwords without knowing the original password, but the mechanism is weak. In Code.vikunja.io/api, 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

**Summary** A critical business logic vulnerability exists in the password reset mechanism of vikunja/api that allows password reset tokens to be reused indefinitely. Due to a failure to invalidate tokens upon use and a critical logic bug in the token cleanup cron job, reset tokens remain valid forever. This allows an attacker who intercepts a single reset token (via logs, browser history, or phishing) to perform a complete, persistent account takeover at any point in the future, bypassing standard authentication controls. **Technical Analysis** The vulnerability stems from two distinct logic errors in the pkg/user/ package that confirm the tokens are never removed. 1. Logic Error in Password Reset (No Invalidation) In pkg/user/user_password_reset.go, the ResetPassword function successfully updates the user's password but fails to delete the reset token used to authorize the request. Instead, it attempts to delete a TokenEmailConfirm token, leaving the TokenPasswordReset active. Vulnerable Code: pkg/user/user_password_reset.go (Lines 36-94) ``` func ResetPassword(s *xorm.Session, reset *PasswordReset) (userID int64, err error) { // ... [Validation and User Lookup] ... // Hash the password user.Password, err = HashPassword(reset.NewPassword) if err != nil { return } // FLAW: Deletes 'TokenEmailConfirm' instead of the current 'TokenPasswordReset' err = removeTokens(s, user, TokenEmailConfirm) if err != nil { return } // ... [Update User Status and Return] ... // The reset token is never removed and remains valid in the DB. } ``` 2. Logic Error in Token Cleanup (Inverted Expiry) The background cron job intended to expire old tokens contains an inverted comparison operator. It deletes tokens newer than 24 hours instead of older ones. Vulnerable Code: pkg/user/token.go (Lines 125-151) ``` func RegisterTokenCleanupCron() { // ... err := cron.Schedule("0 * * * *", func() { // ... // FLAW: "created > ?" selects tokens created AFTER 24 hours ago. // This deletes NEW valid tokens and keeps OLD expired tokens forever. deleted, err := s. Where("created > ? AND (kind = ? OR kind = ?)", time.Now().Add(time.Hour*24*-1), TokenPasswordReset, TokenAccountDeletion). Delete(&Token{}) // ... }) } ``` **Impact** Persistent Account Takeover: An attacker with a single valid token can reset the victim's password an unlimited number of times. Bypass of Remediation: Even if the victim notices suspicious activity and changes their password, the attacker can use the same old token to reset it again immediately. Infinite Attack Window: Because the cleanup cron is broken, the token effectively has a generic TTL of "forever," allowing exploitation months or years after the token was issued. **Remediation** 1. Invalidate Token on Use Update ResetPassword to delete the specific reset token upon successful completion. `// Recommended Fix err = removeTokens(s, user, TokenPasswordReset) // Correct TokenKind` 2. Fix Cleanup Logic Update the SQL query in RegisterTokenCleanupCron to target tokens created before the cutoff time. `// Recommended Fix Where("created < ? ...", time.Now().Add(time.Hour*24*-1), ...) // Use Less Than (<)` A fix is available at https://github.com/go-vikunja/vikunja/releases/tag/v2.1.0

CVE-2026-28268 Affected Code.vikunja.io/api Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
code.vikunja.io/api
Go
≤ 0.24.6

References

Frequently Asked Questions

What is CVE-2026-28268?
CVE-2026-28268 is a security vulnerability in Code.vikunja.io/api involving Vikunja Vulnerable to Account Takeover via Password Reset Token Reuse under CWE-640: Weak Password Recovery Mechanism for Forgotten Password.
Which Code.vikunja.io/api versions are affected?
Affected versions include releases prior to current release patches across affected packages: code.vikunja.io/api.
What version fixes CVE-2026-28268?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is code.vikunja.io/api affected?
Yes, code.vikunja.io/api is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2026-28268?
CVE-2026-28268 has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2026-28268?
CVE-2026-28268 is classified under CWE-640: Weak Password Recovery Mechanism for Forgotten Password (The product contains a mechanism for users to recover or change their passwords without knowing the original password, but the mechanism is weak.).
How can I check Go dependencies for CVE-2026-28268?
Run the dependency tree command: 'inspect dependencies for code.vikunja.io/api'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-rfjg-6m84-crj2",
  "modified" : "2026-02-28T01:59:28Z",
  "published" : "2026-02-28T01:59:28Z",
  "aliases" : [ "CVE-2026-28268" ],
  "summary" : "Vikunja Vulnerable to Account Takeover via Password Reset Token Reuse",
  "details" : "**Summary**\nA critical business logic vulnerability exists in the password reset mechanism of vikunja/api that allows password reset tokens to be reused indefinitely. Due to a failure to invalidate tokens upon use and a critical logic bug in the token cleanup cron job, reset tokens remain valid forever.\n\nThis allows an attacker who intercepts a single reset token (via logs, browser history, or phishing) to perform a complete, persistent account takeover at any point in the future, bypassing standard authentication controls.\n\n**Technical Analysis**\nThe vulnerability stems from two distinct logic errors in the pkg/user/ package that confirm the tokens are never removed.\n\n1. Logic Error in Password Reset (No Invalidation)\nIn pkg/user/user_password_reset.go, the ResetPassword function successfully updates the user's password but fails to delete the reset token used to authorize the request. Instead, it attempts to delete a TokenEmailConfirm token, leaving the TokenPasswordReset active.\n\nVulnerable Code: pkg/user/user_password_reset.go (Lines 36-94)\n```\nfunc ResetPassword(s *xorm.Session, reset *PasswordReset) (userID int64, err error) {\n    // ... [Validation and User Lookup] ...\n\n    // Hash the password\n    user.Password, err = HashPassword(reset.NewPassword)\n    if err != nil {\n        return\n    }\n\n    // FLAW: Deletes 'TokenEmailConfirm' instead of the current 'TokenPasswordReset'\n    err = removeTokens(s, user, TokenEmailConfirm)\n    if err != nil {\n        return\n    }\n\n    // ... [Update User Status and Return] ...\n    // The reset token is never removed and remains valid in the DB.\n}\n```\n2. Logic Error in Token Cleanup (Inverted Expiry)\nThe background cron job intended to expire old tokens contains an inverted comparison operator. It deletes tokens newer than 24 hours instead of older ones.\n\nVulnerable Code: pkg/user/token.go (Lines 125-151)\n```\nfunc RegisterTokenCleanupCron() {\n    // ...\n    err := cron.Schedule(\"0 * * * *\", func() {\n        // ...\n        // FLAW: \"created > ?\" selects tokens created AFTER 24 hours ago.\n        // This deletes NEW valid tokens and keeps OLD expired tokens forever.\n        deleted, err := s.\n            Where(\"created > ? AND (kind = ? OR kind = ?)\", \n            time.Now().Add(time.Hour*24*-1), \n            TokenPasswordReset, TokenAccountDeletion).\n            Delete(&Token{})\n        // ...\n    })\n}\n\n```\n\n**Impact**\nPersistent Account Takeover: An attacker with a single valid token can reset the victim's password an unlimited number of times.\n\nBypass of Remediation: Even if the victim notices suspicious activity and changes their password, the attacker can use the same old token to reset it again immediately.\n\nInfinite Attack Window: Because the cleanup cron is broken, the token effectively has a generic TTL of \"forever,\" allowing exploitation months or years after the token was issued.\n\n**Remediation**\n1. Invalidate Token on Use\nUpdate ResetPassword to delete the specific reset token upon successful completion.\n`// Recommended Fix\nerr = removeTokens(s, user, TokenPasswordReset) // Correct TokenKind`\n2. Fix Cleanup Logic\nUpdate the SQL query in RegisterTokenCleanupCron to target tokens created before the cutoff time.\n`// Recommended Fix\nWhere(\"created < ? ...\", time.Now().Add(time.Hour*24*-1), ...) // Use Less Than (<)`\n\nA fix is available at https://github.com/go-vikunja/vikunja/releases/tag/v2.1.0",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "code.vikunja.io/api"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "0.24.6"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/go-vikunja/vikunja/security/advisories/GHSA-rfjg-6m84-crj2"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-28268"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/go-vikunja/vikunja/commit/5c2195f9fca9ad208477e865e6009c37889f87b2"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/go-vikunja/vikunja"
  }, {
    "type" : "WEB",
    "url" : "https://vikunja.io/changelog/vikunja-v2.1.0-was-released"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-459", "CWE-640" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-02-28T01:59:28Z",
    "nvd_published_at" : "2026-02-27T21:16:18Z"
  }
}