Oct 10, 2026·5 min read·13 visits
Vikunja's WebSocket authentication pipeline skips database session state validation, allowing revoked JWT tokens to establish new real-time event streams and permitting existing connections to leak data indefinitely post-revocation.
Vikunja versions 2.3.0 through 2.6.0 contain an insufficient session expiration vulnerability (CWE-613) within the WebSocket authentication handler. Although Vikunja enforces server-side session tracking and revocation for REST API routes, the WebSocket handshake handler validates cryptographic JWT signatures without querying the database session state. Consequently, revoked JWT tokens can establish new real-time WebSocket connections, and existing connections persist after session revocation.
Vikunja (code.vikunja.io/api) is an open-source project and task management platform. To provide real-time updates across multi-user workspaces, Vikunja exposes a WebSocket endpoint at GET /api/v2/ws. This endpoint streams live events including task modifications, comment notifications, and project metadata updates to connected clients.
Beginning in version 2.3.0 and refined through version 2.6.0, Vikunja implemented server-side session tracking and revocation capabilities. Users can view and delete active sessions via DELETE /api/v2/user/sessions/{id}. Furthermore, security actions such as enabling Two-Factor Authentication (TOTP) execute DeleteAllUserSessions (pkg/routes/api/v2/user_totp.go:208) to invalidate all active user sessions across devices.
However, a design mismatch exists between the HTTP REST middleware and the WebSocket authentication pipeline. While HTTP REST routes check the session database table before fulfilling requests, the WebSocket endpoint verifies only the cryptographic signature and claim types of the user JWT token. As a result, the WebSocket authentication pipeline fails to enforce session revocation, violating the expected security boundaries of CWE-613.
The root cause resides in the decoupled token validation mechanism used during the WebSocket authentication handshake in pkg/websocket/connection.go. When a client initiates a connection to /api/v2/ws, the server invokes Connection.handleAuth to process authentication claims.
During handleAuth, token extraction and parsing delegate to auth.GetUserIDFromToken in pkg/modules/auth/auth.go. The function parses the JWT token using the configured service secret and checks internal claim fields. Specifically, it confirms that claims["type"] corresponds to AuthTypeUser and extracts the target user ID.
func GetUserIDFromToken(tokenString string) (int64, error) {
token, err := jwt.Parse(tokenString, func(_ *jwt.Token) (any, error) {
return []byte(config.ServiceSecret.GetString()), nil
})
if err != nil {
return 0, err
}
claims, ok := token.Claims.(jwt.MapClaims)
if !ok || !token.Valid {
return 0, jwt.ErrTokenUnverifiable
}
typ, ok := claims["type"].(float64)
if !ok || int(typ) != AuthTypeUser {
return 0, jwt.ErrTokenInvalidClaims
}
// Session ID ("sid") claim present in claims["sid"] is ignored
return int64(claims["user_id"].(float64)), nil
}While NewUserJWTAuthtoken (pkg/modules/auth/auth.go:188) injects a session identifier claim (claims["sid"] = sessionID) into generated access tokens, GetUserIDFromToken does not evaluate the sid claim. No query is performed against the database session table to verify whether the session ID remains active.
The failure model involves both initial handshake authentication and post-connection session lifecycle management. The architectural divergence between REST endpoints and WebSocket channels creates an inconsistent security model across the application surface.
For standard REST HTTP endpoints, authentication middleware retrieves the sid claim from the JWT token and verifies its existence in the database sessions table. If an administrator or user revokes the session, subsequent REST requests fail with 401 Unauthorized regardless of the cryptographic validity of the JWT token.
In contrast, the WebSocket authentication pipeline relies exclusively on signature validity. Furthermore, when DeleteUserSession or DeleteAllUserSessions executes, no broadcast signal or cleanup event is dispatched to the WebSocket connection manager. Consequently, active sockets remain registered in the WebSocket hub, receiving real-time server events indefinitely.
Exploitation requires an attacker or unauthorized user to possess a signed, unexpired JWT token associated with a session that was deleted or revoked on the server. The workflow proceeds through four primary stages.
First, an authenticated user logs into Vikunja and obtains a valid JWT access token. The application embeds both the user ID (user_id) and session ID (sid) in the token payload.
Second, session revocation is triggered. This occurs when the user clicks 'Revoke Session' in the user settings UI, when an administrator revokes active sessions, or when TOTP two-factor authentication is configured, which executes DeleteAllUserSessions.
Third, the client attempts to use the revoked JWT token across both endpoints. An HTTP GET request to /api/v2/tasks is rejected with 401 Unauthorized because the session ID no longer exists in the database. However, a WebSocket connection request to /api/v2/ws using the same token succeeds, establishing a persistent channel.
Fourth, once connected to the WebSocket hub, the client automatically receives server-pushed notifications, including notification.created events. These payloads contain real-time updates on tasks, internal comments, and workspace project changes.
This vulnerability carries a CVSS v3.1 base score of 6.5 (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N). The primary impact is confidentiality loss due to unauthorized access to real-time project updates and user notification feeds.
Because WebSocket connections can remain active for long durations without re-authentication, an attacker who obtains a short-lived access token can retain long-term monitoring access even after the legitimate user revokes all sessions or resets their credentials.
Remediation requires maintainers to modify pkg/websocket/connection.go. During Connection.handleAuth, the handler must extract the sid claim from the incoming JWT and perform a database lookup against the active sessions table prior to upgrading the HTTP connection to a WebSocket protocol.
Additionally, the connection manager must implement a session invalidation listener. When a session row is deleted from the database, the server must push an internal termination signal to the WebSocket hub to forcibly close all open socket instances tied to the revoked sid or user_id.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N| Product | Affected Versions | Fixed Version |
|---|---|---|
Vikunja go-vikunja | >= 2.3.0, <= 2.6.0 | Not reported |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-613 |
| Attack Vector | Network (Authenticated WS Handshake with Revoked Token) |
| CVSS v3.1 Score | 6.5 (Medium) |
| Impact | Information Disclosure via Real-Time Server-Pushed Data Stream |
| Exploit Status | Proof of Concept Available |
| CISA KEV Status | Not Listed |
| Affected Component | pkg/websocket/connection.go & pkg/modules/auth/auth.go |
The software does not expire, or insufficiently expires, a session token, exposing an opportunity for attackers to reuse expired or revoked session tokens.
An uncontrolled memory allocation vulnerability exists in ag-psd versions prior to 31.0.0. When parsing Adobe Photoshop Document (PSD) files, the readPsd() function reads image dimensions and color depth directly from the file header and allocates off-heap typed arrays without validating whether the requested memory size is proportional to the input stream or bounded by operational thresholds. An unauthenticated attacker can supply a crafted 52-byte PSD payload that triggers an immediate 3.35 GB memory allocation, resulting in process termination via the operating system Out-Of-Memory (OOM) killer.
CVE-2026-126297 (GHSA-v8f3-6phw-6mh9) is an uncontrolled resource consumption and algorithmic complexity vulnerability in the Natural Language Toolkit (NLTK) prior to version 3.10.4. Located in the Semantic Role Labeling (SRL) parser within `nltk/corpus/reader/conll.py`, the flaw allows an attacker to trigger quadratic O(N^2) CPU processing overhead by providing crafted CoNLL-formatted corpus inputs containing decoy span columns or nested full-width verb spans. Applications parsing untrusted linguistic corpora can experience prolonged CPU exhaustion and application-level Denial of Service (DoS).
CVE-2026-126298 (also tracked as GHSA-r53h-rw34-8h97) is an algorithmic complexity Denial of Service (DoS) vulnerability in the Natural Language Toolkit (NLTK) Python library affecting all versions prior to 3.10.4. The vulnerability resides in the nltk.tree.transforms.chomsky_normal_form function and its corresponding public method Tree.chomsky_normal_form(). When transforming a parse tree into Chomsky Normal Form using the default right-factoring strategy, the function repeatedly invokes list.pop(0) inside a loop iterating over all children of a node. In CPython, removing the initial element of a standard list requires an O(N) memory shift operation, causing the overall binarization algorithm to degrade to O(N^2) quadratic time complexity relative to the width of a node. Furthermore, converting horizontal node width into vertical tree depth bypasses initial parsing depth bounds, triggering subsequent stack exhaustion (RecursionError) when recursive methods traverse the mutated structure. Unauthenticated remote attackers who can submit bracketed tree strings to applications invoking this transformation can exhaust single-threaded CPU resources or induce unhandled application exceptions.
An algorithmic complexity vulnerability (CWE-407) in the Natural Language Toolkit (NLTK) before version 3.10.4 allows remote unauthenticated attackers to cause a denial of service via crafted Combinatory Categorial Grammar (CCG) lexicon strings. The parser in nltk.ccg.lexicon.fromstring performs repeated immutable string slicing, concatenation, and regex tail capturing, resulting in O(n^2) CPU consumption when processing wide, flat category definitions.
CVE-2026-126295 (also tracked as GHSA-fg9w-wfp5-j933) is a path confinement bypass vulnerability in the Natural Language Toolkit (NLTK) affecting versions 3.10.0 prior to 3.10.4. The flaw resides in nltk/parse/bllip.py within the BllipParser class and its factory method BllipParser.from_unified_model_dir(). Unlike sibling tool wrappers in NLTK that enforce data-root confinement via the nltk.pathsec module, BllipParser passes caller-supplied filesystem paths directly into the third-party bllipparser native C extension without validation. When an application passes untrusted input as model paths or directories to BllipParser, an attacker can force the native extension to open arbitrary files on the local filesystem. This leads to information disclosure through parser diagnostic oracles, local model tampering via shared directories, and denial of service by hanging worker threads on blocking special files (such as FIFOs or device nodes) or exhausting memory via oversized files.
CVE-2026-126300 (GHSA-ffr9-mgrr-wcvr) is an inefficient algorithmic complexity vulnerability (CWE-407) in the Natural Language Toolkit (NLTK) Python library affecting versions 3.2.5 prior to 3.10.4. The flaw resides in the quote-restoration routine of TreebankWordTokenizer.span_tokenize and NLTKWordTokenizer.span_tokenize, where repeated calls to list.pop(0) over matched quote tokens introduce quadratic O(n^2) time complexity. An unauthenticated remote attacker who supplies input containing long sequences of double-quote characters can exhaust CPU resources and degrade service availability.