/

CVE-2026-71805

Severity:

CRITICAL RISK

(9.8)

Arbitrary File Upload (CWE-434) in LZ-litchi API Endpoint

CVE-2026-71805

Deferred

Vulnerability type

Category:

Arbitrary File Upload

CWE:

CWE-434

Impact:

Unauthorized File Upload and Arbitrary File Write

Severity:

CRITICAL RISK

(9.8)

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

LZ-litchi contains an arbitrary file upload vulnerability in its file-upload API, allowing unauthenticated remote attackers to upload files and write them outside the intended storage directory. The issue becomes especially risky when the supplied directory value is not safely constrained and uploaded content can affect application behavior or executable locations.

Affected context

The vulnerability affects deployments exposing the file-upload functionality at POST /app-api/infra/file/upload. It occurs when the endpoint accepts attacker-controlled directory information and does not reliably constrain resolved paths to the designated storage location. Because the endpoint is described as unauthenticated, external access to the service may be sufficient for exploitation.

Exploit preconditions

  • Attack surface: The HTTP file-upload endpoint at POST /app-api/infra/file/upload
  • Required access: No authentication is required according to the vulnerability description
  • Trigger point: Processing an upload request containing a crafted directory parameter
  • Why exploitation is possible: The application may use attacker-controlled path information when selecting the destination, allowing uploaded data to escape the intended storage directory

Why this happens

The underlying bug is an unrestricted file-upload design combined with insufficient destination-path validation. The application appears to trust a client-supplied directory value without consistently canonicalizing the resulting path and enforcing that it remains beneath an approved storage root. This behavior maps to CWE-434: Unrestricted Upload of File with Dangerous Type, with path traversal serving as the mechanism that expands the write location beyond the intended boundary.

Potential impact

  • Attackers may place arbitrary files in locations writable by the application
  • Uploaded content could overwrite or interfere with application data and configuration
  • A malicious file may be served to users, enabling content injection or stored client-side attacks
  • If executable content reaches an interpreted or executable location, the attacker could achieve code execution
  • The application or host could experience data loss, defacement, or service disruption

General mitigation guidance

Mitigation generally focuses on treating uploaded files and destination paths as untrusted input.

Common defensive patterns include:

  • Resolve and canonicalize the destination path, then verify it remains within a fixed storage root
  • Avoid accepting arbitrary client-controlled directories; use server-selected identifiers or approved storage buckets
  • Apply strict allowlists for file types, names, extensions, and content formats based on business requirements
  • Store uploads outside executable and publicly served locations where possible
  • Generate server-side filenames and separate metadata from filesystem paths
  • Enforce authentication, authorization, quotas, and rate limits appropriate to the upload operation
  • Run the service with the least filesystem privileges needed for its function
  • Treat uploaded content as untrusted during downstream processing and scanning

How teams detect issues like this

Organizations can look for:

  • Static-analysis findings involving direct concatenation of request parameters with filesystem paths
  • Missing canonicalization and containment checks around upload destinations
  • Code-review signals such as client-selected directories, preserved user filenames, or unrestricted extensions
  • Web logs showing repeated upload requests, unusual directory values, encoded traversal sequences, or writes to unexpected locations
  • File-integrity monitoring for new or modified files outside the approved upload directory
  • Policy enforcement requiring authenticated upload workflows, storage isolation, and non-executable upload locations

Automated security testing and code-review tools may help identify path handling and unrestricted upload patterns before deployment.

Sources

SourceLink
github.comgithub.com/W000i/vuln/issues/9

Frequently asked

questions

Yes. The described upload endpoint is remotely reachable, and exploitation does not require authentication when the endpoint is exposed to an attacker.

The attacker needs network access to the file-upload API and the ability to submit a request containing a maliciously selected directory value.

Use server-controlled upload destinations, canonicalize paths, enforce storage-root containment, validate file content, and keep uploaded files outside executable or public application directories.

Combine strict upload policies with authorization, filename and type allowlists, filesystem isolation, least-privilege service accounts, logging, and file-integrity monitoring.

Find out what's already
exploitable in your codebase.