Intel

AIKIDO-2026-345389

plank/laravel-mediable is vulnerable to Unrestricted Upload of File with Dangerous Type

Unrestricted Upload of File with Dangerous TypeCVE-2026-49972 Published 4 days ago

88

High Risk

This Affects:

PHPplank/laravel-mediable
0.0.1 - 6.5.0
Fixed in 7.0.0
Are you affected? Scan for Free

TL;DR

MediaUploader accepts uploaded filenames containing an embedded dangerous extension such as shell.php.jpg, and File::sanitizeFileName() only strips characters outside a safe set without removing forbidden extensions nested inside the name. Extension, MIME type, and aggregate type checks all pass because the outer .jpg extension satisfies validation while the inner .php extension survives sanitization intact. On a server configured to execute any filename containing .php as PHP, the stored upload runs as executable code. The fix extends sanitizeFileName() to strip a dot immediately before any forbidden extension found anywhere in the filename.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and your web server executes files with an embedded .php extension as PHP, for example through an Apache AddHandler or Nginx fastcgi_split_path_info misconfiguration.

Background info

plank/laravel-mediable is vulnerable to Unrestricted Upload of File with Dangerous Type in versions 0.0.1 - 6.5.0.

How to fix this

Upgrade the plank/laravel-mediable library to the patch version.

Are You Affected?

Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.

Free. No credit card required.

Aikido Platform