/

CVE-2026-68899

Severity:

HIGH RISK

(8.7)

MIME Type Validation Bypass (CWE-434) in Wekan Attachments

CVE-2026-68899

Deferred

Vulnerability type

Category:

Unrestricted File Upload

CWE:

CWE-434

Impact:

Stored Cross-Site Scripting and Active Content Execution

Severity:

HIGH RISK

(8.7)

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 validation could trust an attacker-controlled MIME type when the system file utility was unavailable. An authenticated board member could upload HTML containing JavaScript while labeling it as an image, potentially causing stored active content to execute when another user opened the attachment.

Affected context

The issue affects Wekan deployments that enable the API attachment path, have WITH_API=true, and run without the Unix file binary available for content-based MIME detection. In that condition, MIME detection may return no result and validation can fall back to the client-supplied fileObj.type, allowing content to be stored under the Wekan origin without reliable inspection.

Exploit preconditions

  • Attack surface: Attachment upload functionality exposed through the Wekan API
  • Required access: Authenticated membership in a board with permission to add attachments
  • Deployment condition: The Unix file utility is unavailable or content-based detection otherwise produces no result
  • Trigger point: Upload validation and later opening of the stored attachment
  • Why exploitation is possible: The fallback trusts a MIME label supplied by the requester instead of validating the file bytes, allowing active markup to be treated as benign image content

Why this happens

The vulnerability is an unrestricted file upload caused by a failure in MIME-validation fallback handling. When the preferred content-based detector could not run, the application accepted attacker-controlled metadata as the authoritative file type. This maps to CWE-434, where uploaded content is insufficiently restricted or validated, and can also create a stored cross-site scripting condition when active markup is served from the application origin.

Potential impact

  • Stored JavaScript execution in another user's browser
  • Theft of accessible session data or application information
  • Actions performed in the context of a targeted user's account
  • Phishing or interface spoofing under the trusted Wekan origin
  • Exposure of other users to malicious attachments

General mitigation guidance

Mitigation typically focuses on validating uploaded content independently of user-supplied metadata and ensuring active content cannot execute from trusted application origins.

Common defensive patterns include:

  • Treating client-provided MIME types and file extensions as untrusted hints
  • Inspecting file signatures and bytes with a dependable, fail-closed validation path
  • Scanning for dangerous markup whenever MIME detection is unavailable or uncertain
  • Allowlisting permitted formats and rejecting ambiguous or mismatched content
  • Serving user uploads from an isolated origin with restrictive content-disposition and browser security headers
  • Applying least-privilege access controls to upload and retrieval operations
  • Preventing uploaded files from being interpreted as executable web content

How teams detect issues like this

Organizations commonly detect this class of issue through:

  • Static analysis checks for fallbacks from failed content inspection to client-controlled MIME metadata
  • Code review searches for upload validators that rely only on extensions, declared content types, or optional external binaries
  • Tests that remove or disable content-detection dependencies and verify that uploads fail closed
  • Dynamic testing with mismatched extensions, MIME labels, file signatures, and active markup
  • Policy enforcement requiring uploaded content to be served from an isolated origin and with non-executable response handling
  • Automated application-security review tools that flag unrestricted upload and stored-XSS patterns

Sources

SourceLink
github.comgithub.com/wekan/wekan/commit/f6ba472f6738bcd3763f133d3d9970f216df2263
github.comgithub.com/wekan/wekan/releases/tag/v9.90
github.comgithub.com/wekan/wekan/security/advisories/GHSA-jhph-whx8-wq6p

Frequently asked

questions

It can be exploited through the application's attachment upload functionality when the affected deployment conditions are present. The attacker still needs authenticated board-level access.

An attacker generally needs to be an authenticated board member who can add attachments. Anonymous exploitation is not implied by the described behavior.

Validate file bytes independently of attacker-controlled metadata, fail closed when detection is unavailable, and prevent uploaded content from executing under the application's trusted origin.

Combine allowlisted formats, signature-based inspection, dangerous-markup scanning, isolated upload origins, restrictive response headers, and regression tests for missing or failed detection dependencies.

Find out what's already
exploitable in your codebase.