Fireshare Unauthenticated Arbitrary File Write/Overwrite — CVE-2026-54337
by 4qu4r1um (GitHub) · 2026-07-05
- Severity
- Not disclosed
- CVE
- CVE-2026-54337 (see [GHSA-hmh2-6g84-q8jx](https://github.com/ShaneIsrael/fireshare/security/advisories/GHSA-hmh2-6g84-q8jx))
- Category
- web
- Affected product
- Fireshare (self-hosted video sharing app), <= 1.16.3
- Affected versions
- <= 1.16.3 (per GHSA advisory referenced in the source repo)
- Disclosed
- 2026-07-05
- Patch status
- unpatched
Tags
References
Archive entry
intelseclab/poc-archiveMetadata
| Field | Value |
|---|---|
| Date Added | 2026-07-05 |
| Last Updated | 2026-07-05 |
| Author / Researcher | 4qu4r1um (GitHub) |
| CVE / Advisory | CVE-2026-54337 (see GHSA-hmh2-6g84-q8jx) |
| Category | web |
| Severity | Not disclosed |
| CVSS Score | Not disclosed |
| Status | PoC |
| Tags | fireshare, unauthenticated, arbitrary-file-write, argument-injection, ffmpeg, file-upload, cwe-73, docker |
| Related | N/A |
Affected Target
| Field | Value |
|---|---|
| Software / System | Fireshare (self-hosted video sharing app), <= 1.16.3 |
| Versions Affected | <= 1.16.3 (per GHSA advisory referenced in the source repo) |
| Language / Platform | Server-side app running under nginx user in Docker; exploited purely via curl/HTTP multipart upload |
| Authentication Required | No |
| Network Access Required | Yes |
Summary
Fireshare’s public upload endpoint (/api/upload/public) accepts multipart form fields (file, filename, folder) that are passed largely unsanitized into a downstream ffmpeg invocation used to process the uploaded video. By embedding extra ffmpeg-style arguments (e.g. -select_streams, -o <dir>) inside the filename and folder field values, an unauthenticated attacker can control the output filename and output directory of the processing step, resulting in arbitrary file write/overwrite anywhere the nginx process has write access (/data, /processed, /images, /videos). Overwriting /data/db.sqlite in particular renders the entire application unusable.
Vulnerability Details
Root Cause
The upload handler behind /api/upload/public builds a file-processing command using attacker-controlled filename and folder form field values without adequately sanitizing or validating them, allowing argument/parameter injection into the underlying media-processing (ffmpeg-style) invocation (CWE-73: External Control of File Name or Path).
Attack Vector
- Create any local file with a
.mp4extension (e.g.echo 123 > test.mp4) — its content becomes the data written to the target path. - Send a multipart POST to
http://<target>/api/upload/publicwith thefilefield’sfilename=value set to the desired target filename plus injected ffmpeg flags (e.g.db.sqlite -select_streams v.mp4). - Set the
folderfield to the desired target directory plus an injected output-directory flag (e.g.testfolder -o data). - The server processes the upload and writes/overwrites the target file inside a directory writable by the
nginxservice user (/data,/processed,/images,/videos).
Impact
Unauthenticated arbitrary file write/overwrite within any directory writable by the service user. Overwriting /data/db.sqlite corrupts the application database and renders the Fireshare instance unusable (denial of service); other targeted overwrites could have further impact depending on what the application reads from those directories.
Environment / Lab Setup
Target: shaneisrael/fireshare:1.6.13-lite Docker container, port 8082, tmpfs-backed /data /processed /videos /images
Attacker: curl (no additional tooling required)
Proof of Concept
PoC Script
No standalone script is provided upstream — see
upstream-README.mdanddocker-compose.ymlin this folder for the exact functionalcurlcommands and lab setup.
| |
The command uploads a locally-created test.mp4 while smuggling extra ffmpeg-style arguments into the filename and folder multipart fields, causing the server to write the uploaded content to /data/db.sqlite, overwriting the application’s database.
Detection & IOCs
Signs of compromise:
- Unexpected corruption or truncation of
/data/db.sqliteor other application data files - Fireshare instance suddenly becoming non-functional after an unauthenticated upload request
- Upload requests to
/api/upload/publicwithfilename=/folder=values containing spaces, dashes, or ffmpeg CLI flags rather than plain filenames
Remediation
| Action | Detail |
|---|---|
| Primary fix | Upgrade Fireshare beyond the vulnerable <= 1.16.3 line per the vendor’s GHSA advisory (GHSA-hmh2-6g84-q8jx) |
| Interim mitigation | Strictly validate/allowlist filename and folder upload field values server-side (reject whitespace/flag-like characters), run the service under a user with write access restricted only to a dedicated uploads scratch directory, and do not expose /api/upload/public without authentication |
References
Notes
Mirrored from https://github.com/4qu4r1um/CVE-2026-54337-PoC on 2026-07-05. This repo contains no standalone exploit script — only a README with the exact functional curl commands and a docker-compose.yml lab target, both preserved in this folder (upstream-README.md).