Skip to content
RCE Write-up Intermediate

$14,200 for a Filename With Too Many Characters: Command Injection in a Video Processing Pipeline

The video transcoding pipeline built a shell command by concatenating the user-supplied filename without escaping, so shell metacharacters in the filename were executed as commands. An attacker could run arbitrary commands on the transcoding server with the privileges of the transcoding process.

T4nv1 Follow

Published on medium.com

The vulnerability here had nothing to do with the video file itself. It lived entirely in how its filename got handled three processing steps downstream from the upload, in a shell command someone had built by gluing strings together instead of passing arguments the way the underlying tool actually supported.

T4nv1, on medium.com

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 write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

The transcoding step concatenated the user-editable filename into a shell command string without escaping shell metacharacters or using a parameterised argument array.

Impact

Any user able to upload and rename a file could execute arbitrary commands on the transcoding server with the privileges of the transcoding process.

What the attacker needed

Ability to upload a file; ability to rename the file

The fix

The filename was replaced with a server-generated identifier within 48 hours, and the pipeline was later migrated to parameterised subprocess calls.

How it was found

  1. Upload a valid video file but rename it to include a shell command substitution that triggers an out-of-band callback.
  2. Wait for the platform's normal processing delay.
  3. Observe the callback request arriving from the backend infrastructure, confirming command execution.

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 write-up has not been written yet. The Original tab links to the source.

When a program builds a command for the operating system by joining text pieces together, any special characters in that text can be treated as instructions rather than plain text. Here, the filename was placed directly into such a command, so a filename containing special characters could make the server run extra commands. This is called command injection.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

More by T4nv1

View all

113 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.