Résumé
Vikunja: TOTP secret is readable after enrollment, no step-up auth
Détails de l’avis
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.
- 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/..."}
- Paste that secret (or scan
/api/v1/user/settings/totp/qrcode) into any authenticator app. - 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.
Références
- https://github.com/advisories/GHSA-88f6-4rjv-x774
- https://github.com/go-vikunja/vikunja/security/advisories/GHSA-88f6-4rjv-x774
- https://nvd.nist.gov/vuln/detail/CVE-2026-91982
- https://github.com/go-vikunja/vikunja/pull/3688
- https://github.com/go-vikunja/vikunja/releases/tag/v2.6.0
- https://www.vulncheck.com/advisories/vikunja-before-2.6.0-totp-secret-disclosure-via-api
Vulnérabilités liées
Tout Supply chain →- HIGHSC-ARTIPACKED-2024
On August 13, 2024, Palo Alto Networks Unit 42 published ArtiPACKED, a widespread CI/CD misconfiguration class in which GitHub Actions build artifacts inadvertently leaked authentication tokens, affecting major open-source projects from Google, Microsoft, Red Hat, AWS, Canonical, and OWASP. The root cause is that actions/checkout persists credentials by default, writing the workflow's GITHUB_TOKEN into the checked-out .git/config for authenticated Git operations; when a later step uploaded the workspace (test results, build output, or the full checkout directory) via actions/upload-artifact, the .git directory and its embedded token, along with environment-derived secrets and cloud credentials, were packaged into the downloadable artifact. Because v4 artifacts can be downloaded while the run is still in progress and are readable by anyone for public repositories, an attacker could win a race condition: download the artifact, extract the still-valid GITHUB_TOKEN before the job completed and the token expired, and use it to push code, create branches, or pivot into connected cloud environments. Unit 42 identified numerous large projects leaking tokens this way and disclosed each responsibly for remediation.
- HIGHCVE-2026-62376
Vikunja: Plaintext storage of password-reset/email-confirm tokens in database enables account takeover on DB read access
- HIGHCVE-2026-107807
Nginx UI: Node Secret Credential Exposure via URL Query Parameter
- MEDIUMCVE-2026-107399
Mechanize sends credential headers to another origin after a meta refresh
- MEDIUMCVE-2026-107715
Mechanize sends credential headers to another host after an HTTP redirect
- MEDIUMCVE-2026-107285
AsyncHttpClient: WebSocket proxy credentials sent to the origin server over a CONNECT tunnel