Skip to content
File upload Advisory Advanced CVE-2023-49715

WWBN AVideo import.json.php temporary copy unrestricted php file upload vulnerability

The import.json.php endpoint copies an uploaded file to a temporary location without its extension, allowing an attacker to place a PHP file in /tmp. When chained with a local file inclusion vulnerability, this can lead to arbitrary code execution.

Claudio Bozzato Follow

Originally disclosed on Cisco Talos

Medium 4.3 View original

A unrestricted php file upload vulnerability exists in the import.json.php temporary copy functionality of WWBN AVideo dev master commit 15fed957fb. A specially crafted HTTP request can lead to arbitrary code execution when chained with an LFI vulnerability.

Claudio Bozzato, on Cisco Talos

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the import.json.php script copies a user-supplied file to a temporary directory using only the filename without its extension, allowing a .php file to be written to a predictable location.

Impact

An attacker could execute arbitrary code on the server if they can also exploit a local file inclusion vulnerability, though the temporary file is only available briefly.

What the attacker needed

Permission to upload videos; a local file inclusion vulnerability

How it was found

  1. Upload a video file with a crafted resolution parameter to create a file with a .php extension in the videos directory.
  2. Send a request to import.json.php with the fileURI pointing to the uploaded file.
  3. The script copies the file to /tmp without its extension, creating a .php file.
  4. Exploit a local file inclusion vulnerability to execute the PHP file before it is moved.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

This report describes a flaw in a video-sharing web app that lets someone upload a file and have it saved with a dangerous extension like .php. If another bug lets the attacker run that file, they could execute their own code on the server. The attack requires the attacker to already have permission to upload videos and to combine it with a separate file-inclusion bug.

What is File upload?

An upload feature accepts a file that the server or other users' browsers then treat as code or as something trusted.

More by Claudio Bozzato

View all

185 more disclosed reports, best first.

More from Cisco Talos

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Unrestricted file upload

The lesson behind this report.

An upload feature accepts a file that the server or other users' browsers then treat as code or as something trusted.