/

CVE-2026-88392

Severity:

HIGH RISK

(7.5)

Directory Traversal (CWE-22) in Unimall v4 Upload Handler

CVE-2026-88392

Deferred

Vulnerability type

Category:

Directory Traversal

CWE:

CWE-22

Impact:

Arbitrary Code Execution

Severity:

HIGH RISK

(7.5)

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

A directory traversal vulnerability in Unimall v4's file upload handler may allow attackers to access or write files outside the intended upload directory.

If an attacker can reach the affected endpoint and control a path or filename, the weakness could enable arbitrary code execution when written content is later treated as executable.

A directory traversal vulnerability in Unimall v4's file upload handler may allow attackers to access or write files outside the intended upload directory.

If an attacker can reach the affected endpoint and control a path or filename, the weakness could enable arbitrary code execution when written content is later treated as executable.

Affected context

The vulnerability occurs in the FileUploadController.local() upload functionality when user-controlled path information is used without sufficiently restricting the destination directory. Risk depends on the endpoint being exposed, the upload operation accepting attacker-influenced paths, and the application or host permitting written files to be executed or loaded.

The vulnerability occurs in the FileUploadController.local() upload functionality when user-controlled path information is used without sufficiently restricting the destination directory. Risk depends on the endpoint being exposed, the upload operation accepting attacker-influenced paths, and the application or host permitting written files to be executed or loaded.

Exploit preconditions

  • Attack surface: The Unimall v4 local file upload endpoint
  • Required access: Network access to the endpoint, plus any authentication or authorization required by the deployment
  • Trigger point: Processing an upload request containing a path or filename that escapes the intended storage location
  • Why exploitation is possible: Insufficient path containment can allow attacker-controlled files to be placed in sensitive or executable locations
  • Attack surface: The Unimall v4 local file upload endpoint
  • Required access: Network access to the endpoint, plus any authentication or authorization required by the deployment
  • Trigger point: Processing an upload request containing a path or filename that escapes the intended storage location
  • Why exploitation is possible: Insufficient path containment can allow attacker-controlled files to be placed in sensitive or executable locations

Why this happens

The underlying bug is improper limitation of a user-controlled filesystem path. If path components are concatenated or resolved without canonicalization and verification that the final location remains within an approved directory, traversal sequences may escape the intended storage boundary.

This maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory, commonly known as directory traversal. When uploaded content can reach an executable location or influence application code, the resulting file placement may support arbitrary code execution.

The underlying bug is improper limitation of a user-controlled filesystem path. If path components are concatenated or resolved without canonicalization and verification that the final location remains within an approved directory, traversal sequences may escape the intended storage boundary.

This maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory, commonly known as directory traversal. When uploaded content can reach an executable location or influence application code, the resulting file placement may support arbitrary code execution.

Potential impact

  • An attacker may read or overwrite files outside the intended upload directory
  • Malicious files could be placed in locations processed or executed by the application
  • Application code execution could occur under the service account's privileges
  • Sensitive data, configuration, or credentials could be exposed or modified
  • The affected host or connected services could be compromised
  • An attacker may read or overwrite files outside the intended upload directory
  • Malicious files could be placed in locations processed or executed by the application
  • Application code execution could occur under the service account's privileges
  • Sensitive data, configuration, or credentials could be exposed or modified
  • The affected host or connected services could be compromised

General mitigation guidance

Mitigation typically focuses on enforcing a strict storage boundary and treating upload paths as untrusted input.

Common defensive patterns include:

  • Generate server-side filenames and ignore client-supplied directory components
  • Resolve and canonicalize paths, then verify containment within an approved upload directory
  • Allow only expected filename characters and reject traversal indicators
  • Store uploads outside executable or application-controlled directories
  • Apply strict file type, size, and content validation
  • Run the service with the minimum filesystem permissions required
  • Prevent uploaded content from being interpreted as executable code

Mitigation typically focuses on enforcing a strict storage boundary and treating upload paths as untrusted input.

Common defensive patterns include:

  • Generate server-side filenames and ignore client-supplied directory components
  • Resolve and canonicalize paths, then verify containment within an approved upload directory
  • Allow only expected filename characters and reject traversal indicators
  • Store uploads outside executable or application-controlled directories
  • Apply strict file type, size, and content validation
  • Run the service with the minimum filesystem permissions required
  • Prevent uploaded content from being interpreted as executable code

How teams detect issues like this

Organizations can detect directory traversal risks through:

  • Static analysis rules for path construction using request parameters
  • Code review checks for direct concatenation of upload paths and filenames
  • Tests that verify canonicalized paths remain inside the configured storage root
  • Runtime monitoring for uploads targeting unexpected directories or sensitive paths
  • Web application firewall and gateway policies that identify traversal patterns
  • Automated security scanning and code review tools configured for CWE-22 patterns

Organizations can detect directory traversal risks through:

  • Static analysis rules for path construction using request parameters
  • Code review checks for direct concatenation of upload paths and filenames
  • Tests that verify canonicalized paths remain inside the configured storage root
  • Runtime monitoring for uploads targeting unexpected directories or sensitive paths
  • Web application firewall and gateway policies that identify traversal patterns
  • Automated security scanning and code review tools configured for CWE-22 patterns

Sources

SourceLink
github.comgithub.com/fangtang7/CVE/blob/main/Unimall/file.md

Frequently asked

questions

It may be remotely exploitable when the affected upload endpoint is reachable by an attacker and accepts attacker-controlled path or filename data. Authentication and deployment exposure can limit the scope.

The attacker generally needs access to the file upload functionality, subject to the application's authentication and authorization controls.

Use server-controlled filenames and storage locations, validate canonical paths against a fixed upload directory, and ensure uploaded files cannot be executed.

Apply centralized secure file-handling utilities, perform negative and boundary-focused path tests, enforce least-privilege filesystem permissions, and monitor upload destinations for unexpected activity.

It may be remotely exploitable when the affected upload endpoint is reachable by an attacker and accepts attacker-controlled path or filename data. Authentication and deployment exposure can limit the scope.

The attacker generally needs access to the file upload functionality, subject to the application's authentication and authorization controls.

Use server-controlled filenames and storage locations, validate canonical paths against a fixed upload directory, and ensure uploaded files cannot be executed.

Apply centralized secure file-handling utilities, perform negative and boundary-focused path tests, enforce least-privilege filesystem permissions, and monitor upload destinations for unexpected activity.

Find out what's already
exploitable in your codebase.