GHSA-4hv6-xc92-j86g: Vikunja WebSocket Authentication Ignores Server-side Session Vulnerability
MODERATEGHSA-4hv6-xc92-j86g is a MODERATE (CVSS 6.5) websocket authentication ignores server-side session vulnerability (CWE-613: Insufficient Session Expiration) affecting Vikunja libraries in the Go ecosystem. The issue involves websocket authentication ignores server-side session state, so revoked sessions keep receiving live pushes. Remediation is available in the latest vendor maintenance releases.
GHSA-4hv6-xc92-j86g at a Glance
Security Impact
CVSS: 6.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N).
How to Fix GHSA-4hv6-xc92-j86g
To remediate this vulnerability, upgrade all affected Vikunja dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade code.vikunja.io/api to Latest secure release
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 GHSA-4hv6-xc92-j86g, inspect your project dependencies for Vikunja:
inspect dependencies for code.vikunja.io/api
Analyze the terminal output to locate any version of Vikunja 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-613: Insufficient Session Expiration, where according to wasc, "insufficient session expiration is when a web site permits an attacker to reuse old session credentials or session ids for authorization.". In Vikunja, 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
GHSA-4hv6-xc92-j86g Affected Vikunja Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
code.vikunja.io/api
|
Go |
≥ 2.3.0
≤ 2.6.0
|
|
References
Frequently Asked Questions
What is GHSA-4hv6-xc92-j86g?
Which Vikunja versions are affected?
What version fixes GHSA-4hv6-xc92-j86g?
Is code.vikunja.io/api affected?
What is the CVSS score of GHSA-4hv6-xc92-j86g?
What CWE is associated with GHSA-4hv6-xc92-j86g?
How can I check Go dependencies for GHSA-4hv6-xc92-j86g?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-4hv6-xc92-j86g",
"modified" : "2026-10-09T20:57:35Z",
"published" : "2026-10-09T20:57:34Z",
"aliases" : [ ],
"summary" : "Vikunja: WebSocket authentication ignores server-side session state, so revoked sessions keep receiving live pushes",
"details" : "### Summary\n\nVikunja v2.6.0 introduced server-side sessions with revocation semantics: `DELETE /api/v2/user/sessions/{id}` documents \"Revokes a specific session by its UUID\", and enabling TOTP calls `DeleteAllUserSessions` to invalidate all sessions. The WebSocket endpoint accepts any cryptographically valid user JWT without ever resolving its `sid` (session id) claim against the sessions table. A connection authenticated before revocation stays authenticated and continues to receive live pushes indefinitely, and even brand-new WebSocket connections are accepted with a token whose session was deleted. The revocation feature therefore does not cover the WebSocket boundary at all.\n\n### Details\n\nUser access JWTs carry a session reference: `NewUserJWTAuthtoken` (`pkg/modules/auth/auth.go:188`) sets `claims[\"sid\"] = sessionID`, and the API login-session documentation describes the claim as tying the JWT to a server-side session. On the HTTP side nothing consumes the claim per request either (REST access tokens simply expire after their short TTL, a design the maintainers documented when fixing GHSA-96q5, and refresh tokens are correctly invalidated when the session row is deleted).\n\nThe WebSocket endpoint `GET /api/v2/ws` authenticates through the first client message. `Connection.handleAuth` (`pkg/websocket/connection.go:168`) validates the token exclusively with `auth.GetUserIDFromToken` (`pkg/modules/auth/auth.go:292`):\n\n```go\nfunc GetUserIDFromToken(tokenString string) (int64, error) {\n\ttoken, err := jwt.Parse(tokenString, func(_ *jwt.Token) (any, error) {\n\t\treturn []byte(config.ServiceSecret.GetString()), nil\n\t})\n\t...\n\ttyp, ok := claims[\"type\"].(float64)\n\tif !ok || int(typ) != AuthTypeUser {\n\t\treturn 0, jwt.ErrTokenInvalidClaims\n\t}\n\t...\n}\n```\n\nThe function verifies signature and token type only. No session lookup occurs anywhere in the WebSocket path, and no re-validation happens after the initial auth. Consequently:\n\n1. A connection authenticated before `DELETE /api/v2/user/sessions/{id}` (or before TOTP enable, which runs `models.DeleteAllUserSessions`, `pkg/routes/api/v2/user_totp.go:208`) remains registered in the hub and keeps receiving every subscribed event, such as `notification.created` with the full notification object including comment, task and project content.\n2. A new connection opened after the deletion, using the same pre-revocation token, authenticates successfully.\n3. Session deletion is observable only in the REST surface. The user's session list empties, the refresh token dies on next use, but the WebSocket channel never notices.\n\nFor REST the exposure is bounded by the 10-minute access-token TTL. For WebSocket it is not: a connection lives until the client closes it, so a session the user believes revoked retains a live, server-pushed data channel with no time bound.\n\n### PoC\n\n> [vikunja-ws-auth-ignores-session-revocation-PoC.zip](https://github.com/user-attachments/files/32741065/vikunja-ws-auth-ignores-session-revocation-PoC.zip)\n\nThe attached archive contains `deployment/deploy.sh` (local Vikunja v2.6.0 on loopback with SQLite) and `poc/poc.sh` running `poc/poc.py`:\n\n1. Victim registers and logs in. Second user registers for later interaction.\n2. Control: the victim's WebSocket authenticates and subscribes to `notification.created`. Negative control: a garbage token is rejected with `invalid_token`.\n3. Every victim session is deleted via `DELETE /api/v2/user/sessions/{id}` (the list afterwards reports 0 remaining).\n4. Exploit A: a brand-new WebSocket connection authenticates successfully with the deleted-session token.\n5. Exploit B: the second user comments on a task mentioning the victim. The victim's pre-revocation WebSocket connection receives the `notification.created` push with the full notification payload.\n\nResult: 10 checks passed on two consecutive runs, each from a wiped database.\n\n### Impact\n\nSession revocation, the mechanism a user relies on when a device is lost or a token is suspected stolen, silently excludes the WebSocket channel. A stolen or leaked access token can be converted into a push channel that survives every revocation action available to the user, including TOTP enrollment whose documented purpose is invalidating all sessions, and keeps delivering the victim's notifications (comment mentions, task and project metadata) until the attacker chooses to disconnect. The fix is to resolve the `sid` claim against the sessions table during `handleAuth` and to re-validate or drop hub connections when their session is deleted.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "code.vikunja.io/api"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.3.0"
}, {
"last_affected" : "2.6.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/go-vikunja/vikunja/security/advisories/GHSA-4hv6-xc92-j86g"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/go-vikunja/vikunja"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-613" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-10-09T20:57:34Z",
"nvd_published_at" : null
}
}