Summary
Vikunja: Saved filter creation with an empty filter string recalculates task positions across all tenants
In Vikunja v2.6.0 the task position recalculation that runs when a saved filter view is created fails open when the requesting user has no accessible projects. Instead of aborting, the search that feeds the recalculation loses its project scope entirely and returns every task in the instance. The server then writes one task_positions row per task per view (four views per filter) into views owned by the requesting user, including rows that reference tasks of other tenants the user can never see. Any authenticated user can trigger this. The impact is a cross-tenant integrity violation, a single-request write amplification primitive that scales with instance size, and a violation of the invariant stated in the fix for GHSA-w39f-h553-h2mx that position writes are scoped by project read access.
Details
Vikunja computes kanban and list ordering in a shared task_positions table keyed by (task_id, project_view_id). When a saved filter is created, SavedFilter.Create (pkg/models/saved_filters.go:130) calls CreateDefaultViewsForProject (pkg/models/project_view.go:816) which, for every default view it creates, calls RecalculateTaskPositions with addExistingTasksToView = true (pkg/models/project_view.go:447).
RecalculateTaskPositions (pkg/models/task_position.go:312) builds a TaskCollection and, for filter views (view.ProjectID < -1), resets the project scope to zero and injects the saved filter's filter string. The scope of the subsequent search is derived from getRelevantProjectsFromCollection (pkg/models/task_collection.go:188), which for ProjectID == 0 returns exactly the projects the requesting user can access.
Inside dbTaskSearcher.Search (pkg/models/task_search.go), the WHERE clause is assembled at line 632:
cond := builder.And(builder.Or(projectIDCond, favoritesCond), where, filterCond)
projectIDCond is only set when len(opts.projectIDs) > 0 and favoritesCond only when the caller opted into the favorites arm, which RecalculateTaskPositions never does. With zero accessible projects, an empty filter string (which produces no filter condition in getTaskFiltersFromFilterString) and no search string, all four children of the builder.And are invalid. go-xorm's condition builders silently drop invalid children, so the query becomes SELECT ... FROM tasks with no WHERE clause at all.
The result is written back unconditionally: the function deletes the view's position rows and bulk-inserts one row per returned task per view. Because the filter creation path runs this for four default views, one request writes 4 x total_task_count rows, every one of them referencing tasks the requesting user has no relationship with, including tasks in other users' private projects.
Reaching the zero-project precondition does not require any bug beyond this one. UpdateUserGeneralSettings (pkg/models/user_settings.go:105) assigns default_project_id from the request body without validating that the referenced project exists or belongs to the caller. A user can therefore point their default project at any project id, which unblocks deleting their own Inbox (deletion is refused only while the Inbox is the default project, error 3012 in pkg/models/error.go:482). After the Inbox is gone, getRawProjectsForUser returns an empty list.
Two neighboring controls confirm the intended invariant exists elsewhere and is enforced in sibling paths. The event-driven filter update path gates candidate filters on the filter owner's access to each task's project (matchTasksToViewsOfFilter, introduced by commit b1ad4063e7), and the fix for GHSA-w39f-h553-h2mx validates position target views. The recalculation path on filter creation has no equivalent gate and contradicts the advisory statement that recalculation "aborts on its own project read-access check".
PoC
vikunja-filter-empty-scope-cross-tenant-positions-PoC.zip
The attached archive contains deployment/deploy.sh (local Vikunja v2.6.0 on loopback with SQLite) and poc/poc.sh, which performs the full sequence:
- Victim registers, creates a private project and a task.
- Attacker registers, sets
default_project_idto the victim's project viaPUT /api/v2/user/settings/general, deletes their own Inbox, and now has zero accessible projects. - Control:
GET /api/v2/projects/{victim}returns 403. - Attacker creates a saved filter with
{"filter":"","filter_include_nulls":true}. - Verification: direct SQLite inspection shows
task_positionsrows referencing the victim's task in all four of the attacker's filter views. - Control:
GET /api/v2/projects/{filter_pseudo_project}/tasksreturns 0 items, so the written rows are not readable back through collection endpoints.
Result: 10 checks passed on two consecutive runs, each from a wiped database.
Impact
An authenticated user, even one with no project access at all, causes the server to persist cross-tenant references: rows pointing at arbitrary other users' tasks are written into views the attacker controls. Task content is not exposed through the documented read paths (verified), so this is an integrity and availability issue rather than a direct disclosure:
- Cross-tenant integrity violation. The
task_positionsstate of the attacker's views now encodes other tenants' objects, against the access model the rest of the code enforces. - Write amplification and denial of service. One cheap request performs a full-table scan plus
4 x Ninserts, where N is the number of tasks in the instance. On an instance with 100,000 tasks that is 400,000 rows per request, and the request can be repeated without bound. CPU, IO and storage costs scale with instance size while attacker cost stays constant.
The application does not correctly enforce access controls, allowing a principal to access resources or operations beyond their granted permissions. Typical impact: unauthorized data access or execution of privileged operations.
GHSA-FPRF-R6RV-XG99 has a CVSS score of 5.4 (Medium). The vector is network-reachable, low privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (2.7.0); upgrading removes the vulnerable code path.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.
Frequently Asked Questions
- What is GHSA-FPRF-R6RV-XG99? GHSA-FPRF-R6RV-XG99 is a medium-severity incorrect authorization vulnerability in code.vikunja.io/api (go), affecting versions >= 1.0.0-rc0, <= 2.6.0. It is fixed in 2.7.0. The application does not correctly enforce access controls, allowing a principal to access resources or operations beyond their granted permissions.
- How severe is GHSA-FPRF-R6RV-XG99? GHSA-FPRF-R6RV-XG99 has a CVSS score of 5.4 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
- Which versions of code.vikunja.io/api are affected by GHSA-FPRF-R6RV-XG99? code.vikunja.io/api (go) versions >= 1.0.0-rc0, <= 2.6.0 is affected.
- Is there a fix for GHSA-FPRF-R6RV-XG99? Yes. GHSA-FPRF-R6RV-XG99 is fixed in 2.7.0. Upgrade to this version or later.
- Is GHSA-FPRF-R6RV-XG99 exploitable, and should I be worried? Whether GHSA-FPRF-R6RV-XG99 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether GHSA-FPRF-R6RV-XG99 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix GHSA-FPRF-R6RV-XG99? Upgrade
code.vikunja.io/apito 2.7.0 or later.