GHSA-32r8-5843-4qw2 CVE-2026-76216 GO-2026-6711
Vikunja: Link-share principal-type confusion enables cross-account team removal, bot takeover, and roster disclosure
- Severity
- 7.7 / 10
- High · CVSS 4.0
- Exploit chance (EPSS)
- 0.36%
- Chance of exploitation in the next 30 days. Higher than 30.13% of scored vulnerabilities.
- Known exploited
- No
- Not in CISA's catalog
- Weakness
- CWE-639 Authorization Bypass Through User-Controlled Key
- CWE-843 Access of Resource Using Incompatible Type ('Type Confusion')
- CWE-863 Incorrect Authorization
- Fix
2.5.0- Upgrade code.vikunja.io/api to this version or later
Description
Summary
Vikunja's web.Auth interface (pkg/web/web.go, single method GetID() int64) is satisfied by BOTH *user.User and *models.LinkSharing. A link-share's GetID() returns the raw positive share.ID (pkg/models/link_sharing.go:83-85), which lives in the same positive autoincrement ID space as users.id. The safe negated form getUserID() = share.ID * -1 (link_sharing.go:126-128) exists but is NOT used at three permission sinks. As a result, a link-share principal with id N — which should have zero authority over teams or bot users — is treated as the user whose users.id == N at three permission checks that lack the a.(*LinkSharing) guard their sibling methods have. This is the same principal-type-confusion class as CVE-2026-68581 (GHSA-vvcv-vpph-h844), but at three code paths that advisory/fix never touched.
Root Cause
web.Auth is a one-method interface (GetID() int64). *LinkSharing.GetID() returns the raw positive share id. Three permission methods compare this raw id directly and omit the link-share type guard used elsewhere in the same files:
TeamMember.CanDelete(pkg/models/team_members_permissions.go:31-40): the self-removal fast pathif u.ID == a.GetID() { return true }(:36) executes beforeIsAdmin.IsAdmin(:48-51) is the ONLY place that rejects link shares (if _, is := a.(*LinkSharing); is { return false }, :50) — and it is never reached when the fast path returns true.BotUser.isOwner(pkg/models/bot_users_permissions.go:47-56):return u.BotOwnerID == a.GetID()(:55), used byCanRead/CanUpdate/CanDelete(:36-45). UnlikeCanCreate(:27-30) which type-assertsa.(*user.User), these three paths have no principal guard.Team.CanRead(pkg/models/teams_permissions.go:68-78): matches membership onAnd("user_id = ?", a.GetID())(:76) with no link-share guard, unlike siblingIsAdmin(:45-49, guard at :47).
Link-share JWTs reach these routes: SetupTokenMiddleware validates the signature only, GetAuthFromClaims returns *models.LinkSharing, and the /user//teams route groups add no link-share rejection. Link sharing is enabled by default (config.go ServiceEnableLinkSharing.setDefault(true)).
Impact
A link-share principal (obtainable from any public share link, or self-registered via a share on the attacker's own project) whose id N collides with a victim's users.id == N can, without being that user or any user:
- Integrity (I:H): remove the victim from any team they belong to (
DELETE /api/v1/teams/{T}/members/{username}) → revokes all project permissions the victim inherited through that team. - Availability/Integrity (A:H, I:H): enumerate the victim's bot users (
GET /api/v1/user/bots→bot_owner_id = a.GetID()), then disable/rename or permanently delete them (DELETE /api/v1/user/bots/{id}→DeleteUser), destroying data owned solely by those bots. - Confidentiality (C:H): read the roster + metadata (name, description, full member list) of any team the colliding user belongs to (
GET /api/v1/teams/{T}), plus read bot-user records viaisOwner-gated reads.
Attack Chain
Sink 1 — TeamMember.CanDelete (integrity)
- Entry:
POST /api/v1/shares/{hash}/auth→ link-share JWT withid = N. Guard: JWT middleware — signature only. Bypass proof:GetAuthFromClaimsreturns*models.LinkSharing; no route-group link-share rejection on the/teamsgroup. - Action:
DELETE /api/v1/teams/{T}/members/{usernameOfUserN}with the link-share bearer, targeting a teamT(≥2 members) that userNbelongs to. Guard:CanDelete→GetUserByUsername(tm.Username)returns user N, thenu.ID == a.GetID()(team_members_permissions.go:36). Bypass proof:a.GetID()returnsN(raw positiveshare.ID,link_sharing.go:84) == user N's id →true. Noa.(*LinkSharing)check on this branch (onlyIsAdminat :50 has it, never reached). - Sink:
Delete(team_members.go) removes user N from team T (last-member check passes when team has ≥2 members). Impact: victim loses all project access inherited through team T.
Sink 2 — BotUser.isOwner (bot takeover / destruction)
- Entry: link-share JWT id N (as above). Guard: signature-only;
/usergroup adds no link-share reject. - Enumerate:
GET /api/v1/user/bots→ReadAllrunsWhere("bot_owner_id = ?", a.GetID())= bots owned by user N. Bypass proof:a.GetID()= N; returns victim's bot ids self-contained (removes the id-guessing barrier). - Sink:
DELETE /api/v1/user/bots/{botId}→CanDelete→isOwner→u.BotOwnerID == a.GetID()(bot_users_permissions.go:55) → true;DeletecallsDeleteUser. Bypass proof: noa.(*LinkSharing)guard here (Create-only, :28). Impact: disable/rename/permanently delete victim's bot automation identities.
Sink 3 — Team.CanRead (info disclosure)
- Entry: link-share JWT id N. Guard: signature-only; no reject on
GET /teams/:team. - Sink:
GET /api/v1/teams/{T}→CanReadrunsWhere("team_id=?", t.ID).And("user_id=?", a.GetID()).Get(tm)(teams_permissions.go:74-77). Bypass proof:a.GetID()= N matches user N'steam_membersrow →can = true; noa.(*LinkSharing)check (contrastIsAdminat :47). Impact: read roster + metadata of a team the link share is not part of.
Bypass Evidence
link_sharing.go:83-85GetID()returns raw positiveshare.ID(NOT the negatedgetUserID()at :126-128).team_members_permissions.go:36rawu.ID == a.GetID()beforeIsAdmin; the LinkSharing guard sits at :50 on a branch never reached when the fast path returns true.bot_users_permissions.go:55rawu.BotOwnerID == a.GetID(); thea.(*user.User)guard at :28 is Create-only and NOT replicated onisOwner.teams_permissions.go:76rawa.GetID()inCanRead; siblingIsAdminhas the guard at :47,CanReadomits it.- All three sinks verified present on latest release tag
v2.4.0(git show v2.4.0:<file>). No fix commits touch these files between v2.4.0 and HEAD (the only post-tag commit to link_sharing.go,c580d51, merely shadows an embedded Update method).
Affected Versions
<= 2.4.0 (latest release; also present on HEAD of main). Requires default-enabled link sharing.
Exploitability Constraint (reflected in AC:H)
The attacker cannot freely choose the colliding id — link_shares.id is autoincrement. Exploitation is (a) opportunistic (a guest holding a share with id N attacks the user whose users.id == N) or (b) targeted (self-register and walk the autoincrement toward a chosen id; low-numbered shares collide with low-numbered/early/admin accounts). This is the identical constraint the accepted CVE-2026-68581 had; it affects target selection (AC), not reachability of the boundary crossing.
Suggested Fix
Add the link-share principal guard (if _, is := a.(*LinkSharing); is { return false }) — which IsAdmin/CanCreate already use — to all three sinks: the TeamMember.CanDelete self-removal fast path (before the u.ID == a.GetID() check), BotUser.isOwner, and Team.CanRead. Alternatively, resolve principals through getUserID() (negated id space) at every permission check so link-share ids can never collide with user ids.
Reported by zx (Jace) — GitHub: @manus-use
Affected versions
Go
| Package | Vulnerable | Fixed in |
|---|---|---|
| code.vikunja.io/api | < 2.5.0 |
2.5.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.5.0
- go
go get code.vikunja.io/api@v2.5.0 && go mod tidy
Severity breakdown
CVSS 4.0 7.7
CVSS:4.0/AV:N/AC:H/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/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
- High
- Attack requirements
- Present
- Privileges required
- Low
- User interaction
- None
- Confidentiality (vulnerable system)
- High
- Integrity (vulnerable system)
- High
- Availability (vulnerable system)
- High
- Confidentiality (subsequent systems)
- None
- Integrity (subsequent systems)
- None
- Availability (subsequent systems)
- None
- Exploit maturity
- Not defined
- Scope
- X
CVSS 3.1 7.5
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
- Attack vector
- Network
- Attack complexity
- High
- Privileges required
- Low
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Weakness
CWE-639: Authorization Bypass Through User-Controlled Key
The system's authorization functionality does not prevent one user from gaining access to another user's data or record by modifying the key value identifying the data.
How to prevent it
- Architecture and Design: For each and every data access, ensure that the user has sufficient privilege to access the record that is being requested.
- Architecture and Design, Implementation: Make sure that the key that is used in the lookup of a specific user's record is not controllable externally by the user or that any tampering can be detected.
- Architecture and Design: Use encryption in order to make it more difficult to guess other legitimate values of the key or associate a digital signature with the key so that the server can verify that there has been no tampering.
CWE-843: Access of Resource Using Incompatible Type ('Type Confusion')
The product allocates or initializes a resource such as a pointer, object, or variable using one type, but it later accesses that resource using a type that is incompatible with the original type.
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
Advisories
Packages
Other links
Timeline
- Published
- Last updated by the source
- Latest EPSS score
Related advisories
| Advisory | Severity | Why 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-fprf-r6rv-xg99 Vikunja: Saved filter creation with an empty filter string recalculates task positions across all tenants | Medium | 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 |
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