Alta

Kunstmaan CMS: MediaBundle extension blacklist bypass allows authenticated administrators to upload executable PHP files leading to remote code execution

  • Publicada: 07.10.2026
  • Actualizado: 11.10.2026 10:22

Summary

The MediaBundle blocks dangerous upload extensions with a blacklist that was matched case-sensitively, while the stored filename was lowercased afterwards. A file uploaded as webshell.pHp therefore bypassed the blacklist and was written to the web-accessible upload directory as webshell.php, where the web server executed it. Any authenticated backend user with access to the media section could obtain remote code execution.

Details

FileHandler::getFilePath() rewrote blacklisted extensions to .txt using a case-sensitive regex, and only then lowercased the extension when building the stored name — so the check ran against the attacker-controlled casing and the normalisation happened after it.

Two further weaknesses contributed:

  • The default blacklist contained only php and htaccess, leaving other server-executable extensions (phtml, php5, phar, shtml, cgi, …) unblocked regardless of casing.
  • Configured blacklist values were interpolated into the regex unescaped.

Impact

An authenticated user with access to the admin media section can upload a file that the web server executes as PHP. The uploaded file is reachable over HTTP without authentication, giving arbitrary code execution as the web server user.

Patches

Fixed in kunstmaan/media-bundle 7.3.2. The extension is now normalised before it is checked and compared with in_array(); the default blacklist is expanded to the full set of server-executable extensions; and a new opt-in allowed_extensions option allows projects to enforce a strict allow-list.

Note that the patch does not rename files already stored on disk. Sites should audit their media upload directory for existing files with an executable extension.

Workarounds

If you cannot upgrade, configure the web server to refuse to execute scripts in the media upload directory (for example a location block in nginx or php_flag engine off in Apache).

Software afectado

Haz clic en una tecnología para ver todas sus vulnerabilidades.

PlataformaPaqueteVersiones vulnerablesCorregida en
Paquete de Composer kunstmaan/bundles-cms < 7.3.2 7.3.2
Paquete de Composer kunstmaan/media-bundle < 7.3.2 7.3.2

Referencias

Puntuación CVSS 7.2/10
Vector CVSS
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
Debilidad (CWE)
CWE-434
Plataforma
Composer
Paquete
kunstmaan/bundles-cms, kunstmaan/media-bundle
Publicada
07.10.2026
Actualizado
11.10.2026 10:22

Fuentes y licencias

OSV / GitHub Advisory Database - GHSA-p279-5wcv-45vq - CC BY 4.0

Historial de vulnerabilidades: kunstmaan/bundles-cms

Todas las vulnerabilidades publicadas de este paquete (Paquete de Composer), de la más reciente a la más antigua. Muestra si es un fallo aislado o un paquete que hay que vigilar.

Esta es la única vulnerabilidad conocida de este paquete.

Identifica las vulnerabilidades de tu aplicación

Con la integración de DockRay y el inventario de software activado, DockRay compara las versiones notificadas de los componentes con las vulnerabilidades conocidas y avisa de las coincidencias confirmadas. La cobertura depende de la tecnología compatible y de los avisos disponibles.

Conectar tu aplicación
Newsletter DockRay

La seguridad de tus aplicaciones en tu correo

Vulnerabilidades importantes, recomendaciones concretas y consejos prácticos para tus aplicaciones. Elige tus tecnologías y sigue lo que importa para tu proyecto.

  • Un resumen diario de nuevas vulnerabilidades, también las críticas.
  • Avisos sobre actualizaciones importantes.
  • Consejos prácticos sobre seguridad y monitorización de aplicaciones.

Déjalo vacío para recibir avisos de todas las tecnologías.

Suscripción gratuita. Date de baja con un clic en cualquier correo.