Skip to content

GHSA-fprf-r6rv-xg99 CVE-2026-111918 GO-2026-6731

Vikunja: Saved filter creation with an empty filter string recalculates task positions across all tenants

Medium Go
Severity
5.3 / 10
Medium · CVSS 4.0
Exploit chance (EPSS)
0.18%
Chance of exploitation in the next 30 days. Higher than 7.13% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-863 Incorrect Authorization
Fix
2.7.0
Upgrade code.vikunja.io/api to this version or later

Description

Summary

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:

  1. Victim registers, creates a private project and a task.
  2. Attacker registers, sets default_project_id to the victim's project via PUT /api/v2/user/settings/general, deletes their own Inbox, and now has zero accessible projects.
  3. Control: GET /api/v2/projects/{victim} returns 403.
  4. Attacker creates a saved filter with {"filter":"","filter_include_nulls":true}.
  5. Verification: direct SQLite inspection shows task_positions rows referencing the victim's task in all four of the attacker's filter views.
  6. Control: GET /api/v2/projects/{filter_pseudo_project}/tasks returns 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_positions state 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 N inserts, 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.

Affected versions

Go

PackageVulnerableFixed in
code.vikunja.io/api
>= 1.0.0-rc0, < 2.7.0
2.7.0
code.vikunja.io/api
all versions
No fix yet

How to fix

Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.

code.vikunja.io/api Go → 2.7.0

go
go get code.vikunja.io/api@v2.7.0 && go mod tidy

Severity breakdown

CVSS 4.0 5.3

CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:L/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

Attack vector
Network
Attack complexity
Low
Attack requirements
None
Privileges required
Low
User interaction
None
Confidentiality (vulnerable system)
None
Integrity (vulnerable system)
Low
Availability (vulnerable system)
Low
Confidentiality (subsequent systems)
None
Integrity (subsequent systems)
None
Availability (subsequent systems)
None
Exploit maturity
Not defined
Scope
X

CVSS 3.1 5.4

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L

Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
Low
Availability
Low

Weakness

CWE-863: Incorrect Authorization

The product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check.

How to prevent it
  • Architecture and Design: Divide the product into anonymous, normal, privileged, and administrative areas. Reduce the attack surface by carefully mapping roles with data and functionality. Use role-based access control (RBAC) [REF-229] to enforce the roles at the appropriate boundaries. Note that this approach may not protect against horizontal authorization, i.e., it will not protect a user from attacking others with the same role.
  • Architecture and Design: Ensure that access control checks are performed related to the business logic. These checks may be different than the access control checks that are applied to more generic resources such as files, connections, processes, memory, and database records. For example, a database may restrict access for medical records to a specific database user, but each record might only be intended to be accessible to the patient and the patient's doctor [REF-7].
  • Architecture and Design: Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. For example, consider using authorization frameworks such as the JAAS Authorization Framework [REF-233] and the OWASP ESAPI Access Control feature [REF-45].
  • Architecture and Design: For web applications, make sure that the access control mechanism is enforced correctly at the server side on every page. Users should not be able to access any unauthorized functionality or information by simply requesting direct access to that page. One way to do this is to ensure that all pages containing sensitive information are not cached, and that all such pages restrict access to requests that are accompanied by an active and authenticated session token associated with a user who has the required permissions to access that page.
  • System Configuration, Installation: Use the access control capabilities of your operating system and server environment and define your access control lists accordingly. Use a "default deny" policy when defining these ACLs.

References

Timeline

  1. Published
  2. Last updated by the source
  3. Latest EPSS score
AdvisorySeverityWhy it's related
GHSA-m687-p538-r5hp
Vikunja: Permissive Cross-domain Security Policy trusts every localhost origin which should not be trusted
Medium Also affects code.vikunja.io/api
GHSA-fmmf-xq98-g327
Vikunja: Write-level project members can delete admin-tier link shares through an unloaded permission check
Medium Also affects code.vikunja.io/api
GHSA-pjr3-86v4-5p7w
Vikunja: Explicit lower-permission share on a sub-project is silently overridden by an inherited parent permission (broken access control / privilege-management regression in v2.6.0)
Medium Also affects code.vikunja.io/api
GHSA-hjx8-qv73-f7cm
Vikunja: Webhooks and link shares survive every revocation path, so a removed collaborator keeps a live feed
High Also affects code.vikunja.io/api
GHSA-4hv6-xc92-j86g
Vikunja: WebSocket authentication ignores server-side session state, so revoked sessions keep receiving live pushes
High Also affects code.vikunja.io/api
GHSA-w2ch-4xgr-22ww
Vikunja: Task relation deletion does not check read access to the other task, allowing cross-project relation removal
Low Also affects code.vikunja.io/api
GHSA-8wvg-r2j4-3737
Vikunja: Assignee email addresses disclosed to read-only project members via the task assignees endpoint
Medium Also affects code.vikunja.io/api
GHSA-3hc7-r24j-rpwc
Vikunja: Cross-project task disclosure through subtask expansion
Medium Also affects code.vikunja.io/api
Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor