Skip to content

Path Traversal Arbitrary File Write in `/api/uploadChunked`

High
ShaneIsrael published GHSA-7q8r-vpq3-89m7 Mar 22, 2026

Package

fireshare

Affected versions

1.5.1

Patched versions

1.5.2

Description

Summary

An authenticated path traversal vulnerability in Fireshare’s chunked upload endpoint allows an attacker to write files outside the intended upload directory by supplying a crafted checkSum value. This can lead to arbitrary file creation in attacker-chosen writable locations, violating filesystem integrity and potentially enabling further compromise depending on the deployment.

Details

The issue is present in Fireshare’s chunked upload handler:

  • app/server/fireshare/api.py
  • Route: /api/uploadChunked

The handler accepts multipart form fields including checkSum, then uses that value directly to construct filesystem paths for chunk storage:

checkSum = request.form.get('checkSum')
tempPath = os.path.join(upload_directory, f"{checkSum}.part{chunkPart:04d}")
with open(tempPath, 'wb') as f:
    f.write(blob.read())

Relevant references:

  • app/server/fireshare/api.py:1525-1613 — full handler
  • app/server/fireshare/api.py:1563-1567 — file write sink
  • app/server/fireshare/api.py:1571-1573, 1592-1593 — subsequent path usage during re-read and reassembly

The root cause is that checkSum is fully attacker-controlled and is incorporated into file paths without sanitization or containment checks. In particular:

  • no normalization is applied to remove traversal sequences
  • no canonical path validation is performed
  • no verification ensures the resolved path remains within upload_directory

Because of this, path traversal sequences in checkSum can escape the intended upload directory and cause chunk files to be written to arbitrary filesystem locations writable by the Fireshare process.

Impact

  • Type: Path traversal leading to arbitrary file write
  • Who is impacted: Authenticated users of Fireshare deployments where the upload feature is enabled
  • Security impact: An attacker can create files outside the intended upload directory in arbitrary writable locations, which may enable data corruption, local persistence, or other follow-on attacks depending on the environment
  • Attack preconditions: Valid authenticated access is required

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
Low

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:L

CVE ID

CVE-2026-33645

Weaknesses

Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. Learn more on MITRE.

External Control of File Name or Path

The product allows user input to control or influence paths or file names that are used in filesystem operations. Learn more on MITRE.

Credits