All vulnerabilities
CVE-2026-91982GHSA-88f6-4rjv-x774GO-2026-6722

code.vikunja.io/api: Vikunja: TOTP secret is readable after enrollment, no step-up auth

go-vikunja code.vikunja.io/apigoLibraries & packages
CVSS
5.3Medium
ExploitationPublic exploit codeCISA's assessment says proof of concept code is public, assessed 17 Sep 2026. Not in the KEV catalogCISA via CVE List
Exploit odds (EPSS)0.35%Chance of exploitation activity in the next 30 days, higher than 26% of CVEs. Scored 23 Oct 2026FIRST EPSS
Fixed in2.6.0Fixed versionGitHub
Published15 Sep 2026Updated 19 Oct 2026CVE List

What fixes it

  • 2.6.0code.vikunja.io/api, goGitHubgo get code.vikunja.io/api@v2.6.0
  • 2.6.0vikunjaCVE List
  • 2.6.0code.vikunja.io/api, GoOSVgo get code.vikunja.io/api@v2.6.0

A fixed version on one release line is not the upgrade target for every line. Check your exact version and any vendor backports.

Description

Summary

Once a user has TOTP enabled, the API still hands back the raw shared secret to anyone holding that account's access token. Reading it doesn't ask for the password, even though disabling TOTP does. So a stolen token, an XSS, or a browser left open is enough to copy the second factor into your own authenticator and keep generating valid codes indefinitely.

Details

GET /api/v1/user/settings/totp returns the full TOTP object, including the secret field and the otpauth:// provisioning URL. GET /api/v1/user/settings/totp/qrcode renders the same secret as a QR image. Neither requires re-authentication, the access token alone is enough.

This is inconsistent with the rest of the flow: POST /api/v1/user/settings/totp/disable calls CheckUserPassword before it will turn TOTP off. So the destructive action is gated behind the password, but reading out the secret that backs the second factor isn't. There's also no reason for the secret to be readable at all once enrollment is finished, the client only needs it during setup.

The fix is to stop returning secret/url/the QR code once enabled is true (only expose them during the enrollment window). Requiring the password on the read, like disable already does, would also be reasonable.

PoC

The attacker needs the victim's access token, from an XSS, a leaked/stolen token, or an unlocked session. TOTP must already be enabled on the account.

  1. With the victim's bearer token, call:
GET /api/v1/user/settings/totp
Authorization: Bearer <victim_token>

The response contains the shared secret and the otpauth:// URL:

{"secret": "<base32 secret>", "enabled": true, "url": "otpauth://totp/..."}
  1. Paste that secret (or scan /api/v1/user/settings/totp/qrcode) into any authenticator app.
  2. It now produces the same 6-digit codes as the victim's device. Nothing is logged and the victim gets no notification.

Impact

This defeats the purpose of the second factor. 2FA is supposed to survive exactly this situation, a compromised password or a hijacked session, but a single read of the account's own settings hands over the shared secret with no step-up check and no trace. Combined with a known or later-recovered password, it's a durable account takeover that TOTP was meant to prevent.

Text from GitHub Advisory Database

Affected versions 4

  • code.vikunja.io/api, go<= 2.5.0GitHub
  • vikunjaaffected: all versions before 2.6.0CVE List
  • vikunjaunaffected: 2.6.0CVE List
  • code.vikunja.io/api, Gofrom first release, fixed in 2.6.0OSV

References 6