/

CVE-2026-52890

Severity:

HIGH RISK

(7.1)

Path Traversal & DoS (CWE-22) in Wekan Attachments

CVE-2026-52890

Deferred

Vulnerability type

Category:

Path Traversal / Resource Exhaustion

CWE:

CWE-22, CWE-400

Impact:

Arbitrary File Read and Denial of Service

Severity:

HIGH RISK

(7.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Wekan's attachment handling previously allowed authenticated board members to supply arbitrary filesystem paths and storage backends for attachment documents. Because the server streamed files directly from these paths without containment checks, attackers could read arbitrary files or cause denial of service by referencing special devices like /dev/zero.

The vulnerability becomes risky wherever board members are not fully trusted and the application runs with access to sensitive filesystem locations or system devices.

Affected context

This vulnerability arises in Wekan deployments where:

  • Board members can upload or attach files via the /attachments/insert DDP method
  • The server persists attacker-controlled versions.original.path and versions.original.storage fields
  • The filesystem storage strategy streams files directly from the provided path

It is most problematic when the Wekan process has access to sensitive directories (e.g., configuration, logs, backups) or special device files that can be used to consume CPU, memory, or I/O.

Exploit preconditions

  • Attack surface: Application-layer API, specifically the /attachments/insert DDP method for file attachments
  • Required access: Authenticated user with board write permissions (board member able to add or modify attachments)
  • Trigger point: Creation of an attachment record with crafted versions.original.path and versions.original.storage values, followed by any operation that reads or streams the attachment
  • Why exploitation is possible: The insert rule only checks board write access and does not validate or constrain the path fields, and FileStoreStrategyFilesystem.getReadStream() uses the stored path without enforcing a storage-root or path containment check. This combination allows both arbitrary path access and unbounded streaming from special files.

Why this happens

The core issue maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory and CWE-400: Uncontrolled Resource Consumption.

The attachment insertion logic treats user-controlled metadata as trusted, allowing absolute or traversing paths to be stored without validation. The filesystem strategy then resolves these paths directly, ignoring any root directory enforcement or normalization to a safe base. This insecure pattern lets attackers escape the intended attachment directory and target arbitrary files or device nodes. Because the streaming operation also lacks safeguards such as size limits, rate limiting, or content-type checks, reading from special files like /dev/zero can lead to resource exhaustion and denial of service.

Potential impact

  • Arbitrary file reads from the server filesystem that the Wekan process can access
  • Exposure of configuration files, application secrets, or system logs
  • Denial of service by streaming from special device files (e.g., /dev/zero) causing excessive CPU, memory, or I/O usage
  • Increased risk of lateral movement if sensitive credentials or tokens are stored in readable files
  • Degradation of service for all users due to process or host instability

General mitigation guidance

Effective mitigation centers on strictly controlling how file paths and storage backends are derived and used.

Recommended defensive patterns include:

  • Treat all attachment path inputs as untrusted and derive filesystem locations server-side from validated identifiers rather than client-provided paths
  • Enforce a dedicated storage root and perform path normalization plus containment checks to ensure resolved paths stay within that root
  • Reject absolute paths and sequences that imply traversal (e.g., ..) in attachment metadata
  • Implement resource consumption safeguards around streaming operations, such as maximum file size limits, timeouts, and rate limiting
  • Run the application under least-privilege accounts with access only to the required attachment directory, avoiding permissions on sensitive system files or device nodes

How teams detect issues like this

Organizations can detect similar issues using a combination of static analysis, review practices, and runtime monitoring:

  • Static analysis rules that flag use of user-controlled path fields passed into file I/O APIs without normalization or root enforcement
  • Code review checklists that require verification of path containment logic and ensure attachment paths are derived from server-managed identifiers
  • Security-focused tests that attempt to access files outside the intended storage directory or stream from known device paths, validating that such requests are rejected
  • Runtime monitoring and logging for anomalous attachment reads, unusually large or long-running streams, or access attempts to sensitive directories and device files
  • Optional use of automated security scanners or SAST tools configured to highlight CWE-22 and CWE-400 patterns in file handling components

Sources

SourceLink
github.comgithub.com/wekan/wekan/commit/fc92b342ceedcf38dbd614a0f7b50d6dc2b22eb8
github.comgithub.com/wekan/wekan/releases/tag/v9.31
github.comgithub.com/wekan/wekan/security/advisories/GHSA-g6vm-7757-pr88

Frequently asked

questions

Exploitation is limited to authenticated users with board write access, but in multi-user or shared environments where board members are not fully trusted, this is effectively a powerful local attack on the server's filesystem and availability.

An attacker needs to be logged in as a user with permission to modify attachments on a board. They do not need administrative rights, only the ability to invoke the /attachments/insert method with crafted metadata.

The safest pattern is to stop trusting client-supplied paths entirely: store only server-managed identifiers, resolve them to files within a predefined storage root, and apply strict path normalization and containment checks. Combine this with resource limits around streaming operations to prevent abuse.

Establish a standard file-handling abstraction that enforces root directories and path validation, integrate security-focused code review for any filesystem access logic, and adopt static analysis rules for path traversal and resource exhaustion. Additionally, run services with minimal filesystem privileges and regularly test file-related APIs for attempts to escape their designated storage areas.

Find out what's already
exploitable in your codebase.