/

CVE-2026-38360

Severity:

CRITICAL RISK

(9.8)

Directory Traversal in fohrloop dash-uploader HTTP Request

CVE-2026-38360

Deferred

Vulnerability type

Category:

Directory Traversal

CWE:

CWE-22

Impact:

Remote Code Execution via Directory Traversal

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

A critical directory traversal vulnerability in fohrloop dash-uploader (v0.1.0 through v0.7.0a2) allows remote attackers to manipulate file paths processed by the HTTP request handler.

By abusing path handling in dash_uploader/httprequesthandler.py (notably aseHttpRequestHandler.get_temp_root() and BaseHttpRequestHandler._post()), an attacker may reach files or locations outside the intended upload directory, which can lead to arbitrary code execution under certain deployment conditions.

Affected context

This vulnerability affects applications that integrate the fohrloop dash-uploader component for handling file uploads in Dash-based web applications.

It is relevant when:

  • The vulnerable versions (0.1.0 through 0.7.0a2) are used in a network-accessible environment
  • User-controlled paths or filenames are accepted and passed into the HTTP request handler
  • Uploaded or temporary files can be written to locations that are later executed, imported, or otherwise trusted by the application or hosting platform

Exploit preconditions

  • Attack surface: Network-accessible dash-uploader endpoints that process file uploads or related POST requests
  • Required access: Ability to send crafted HTTP requests to the vulnerable upload handler (no local system access required)
  • Trigger point: Processing of POST requests in BaseHttpRequestHandler._post() that compute temporary root paths via aseHttpRequestHandler.get_temp_root() or similar logic
  • Why exploitation is possible: User-controlled path components are insufficiently validated or normalized, allowing ../-style traversal or equivalent constructs to escape the intended temporary or upload directory and write files to sensitive or executable locations

Why this happens

The underlying issue is improper restriction of file path construction when handling HTTP upload requests.

The request handler logic in dash_uploader/httprequesthandler.py appears to combine user-influenced input (such as file names, subdirectories, or identifiers) with server filesystem paths without robust canonicalization and enforcement of allowed directories.

This aligns with CWE-22: Improper Limitation of a Pathname to a Restricted Directory (Path Traversal), where path traversal sequences or untrusted path segments allow access outside a confined directory, and in this case may permit placement or manipulation of files in locations that can later be executed as code.

Potential impact

  • Remote attackers may write files outside the intended upload or temporary directory
  • Attackers could plant executable scripts or code files in web-accessible or application-loaded directories, leading to remote code execution
  • Modification or replacement of existing application or configuration files
  • Unauthorized access to sensitive data stored on the server filesystem
  • Escalation from a simple file upload feature to full application or server compromise, depending on deployment

General mitigation guidance

Effective mitigation focuses on strict path handling and isolation of uploaded content:

  • Constrain all upload and temporary paths to a fixed, server-controlled base directory and verify that the resolved canonical path never escapes this directory
  • Normalize and validate file paths after joining components (e.g., using realpath/canonicalization) and reject any request whose target path is outside the allowed root
  • Ignore or heavily sanitize client-supplied directory segments; treat only a server-generated identifier as the subdirectory name
  • Store uploaded files under randomized or opaque filenames, decoupled from user-supplied names, to reduce the risk of overwriting important resources
  • Ensure that upload directories are not executable by the application platform (for example, no automatic execution by the web server or runtime loader)
  • Apply least-privilege filesystem permissions so that the upload handler cannot write to configuration, code, or system directories

How teams detect issues like this

Detection typically relies on a combination of code-centric and behavior-based approaches:

  • Static analysis rules that flag joins of user-controlled strings with filesystem paths, especially when combined with inadequate checks for traversal patterns
  • Code review checklists that call out any use of ../ filtering, manual path string manipulation, or reliance on simple substring checks rather than canonical path validation
  • Runtime logging and monitoring of upload destinations, including alerts when writes occur outside the designated upload root or in unexpected directories
  • Web application firewalls or reverse proxies configured with rules to block suspicious path traversal patterns in upload-related requests, while recognizing that such controls are a defense-in-depth measure rather than a primary fix

Sources

SourceLink
github.comgithub.com/a1ohadance/CVE-2026-38360
github.comgithub.com/advisories/GHSA-3rf6-x59v-5jfv
github.comgithub.com/fohrloop/dash-uploader
github.comgithub.com/fohrloop/dash-uploader/blob/dev/dash_uploader/httprequesthandler.py
github.comgithub.com/fohrloop/dash-uploader/blob/stable/dash_uploader/httprequesthandler.py
github.comgithub.com/fohrloop/dash-uploader/issues/153
github.comgithub.com/github/advisory-database/pull/7635
pypi.orgpypi.org/project/dash-uploader/

Frequently asked

questions

Yes. Because the vulnerable code sits behind HTTP request handling for uploads, an attacker can exploit it remotely by sending crafted requests to the exposed dash-uploader endpoints, assuming the application is accessible over the network.

Typically, only the ability to interact with the web interface or directly send HTTP requests to the upload handler is required. No prior authentication may be necessary if the upload feature is publicly exposed, though some deployments could restrict access via authentication or network controls.

The most robust fix pattern is to strictly confine all file operations to a known, non-executable upload root directory and perform canonical path validation after combining any user input with server paths. Any request that would write outside this directory should be rejected, and file naming should rely on server-generated identifiers instead of client-controlled paths.

Future designs should treat all path components from clients as untrusted, avoid direct string concatenation for filesystem paths, use well-tested path normalization APIs, and enforce invariant checks that confirm final paths remain within allowed directories. Complementing this with secure upload directory configuration and least-privilege filesystem permissions significantly reduces the risk of path traversal leading to code execution.

Find out what's already
exploitable in your codebase.