llamaCVEVulnerability Intelligence
/
Advisory · GitHub · Packagist · redaxo/source

GHSA-W998-QMW9-MF4M

REDAXO: Stored XSS in Mediapool Sync Page via Unescaped Filesystem Filenames

Parche disponible
Descargar PNG JSON
CVSS
—
medium
Fuente: —
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche1 versión5.21.2
Exposición58 dDesde la divulgación, 23 sept 2026, 9:06 a. m.
Detección54 dDesde la divulgación hasta su ingreso al índice
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada +1
Explotación
Remediación
Monitoreo
Detectada
23 sept 26
17 nov 26
21 nov 26
23 sept 26
8 oct 26
22 oct 26
6 nov 26
21 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-W998-QMW9-MF4M divulgada
Divulgación Modificada Última actualización del registro
Monitoreo Detectada Ingresó al índice
Resumen
Descripción del advisory
Texto original · GitHub · en inglés

### Summary
The mediapool sync page (`sync.php`) renders filenames from the `/media` filesystem directory directly into HTML without applying `rex_escape()` (i.e., `htmlspecialchars`). Any file placed in the media directory whose filename contains HTML metacharacters will execute JavaScript in the browser of any backend user who views the sync page.

### Details
In `redaxo/src/addons/mediapool/pages/sync.php`, the variable `$diffFiles` is populated from actual filesystem filenames (files in `/media/` not yet registered in the database). These filenames are then rendered without escaping:

File: `redaxo/src/addons/mediapool/pages/sync.php:119-120`

foreach ($diffFiles as $file) {
    if (is_writable(rex_path::media($file))) {
        $e = [];
        $e['label'] = '<label>' . $file . '</label>';          // NO rex_escape!
        $e['field'] = '<input type="checkbox" name="sync_files[]" value="' . $file . '" />'; // NO rex_escape!
        $writable[] = $e;
    } else {
        $notWritable[] = $file;
    }
}

File: `redaxo/src/addons/mediapool/pages/sync.php:170`

$fragment->setVar('body', '<ul><li>' . implode('</li><li>', $notWritable) . '</li></ul>', false);
// $notWritable contains unescaped filenames

By contrast, all other filename displays in the codebase use `rex_escape($fname)` (e.g., `media.detail.php:236`, `media.list.php`). The sync page is accessible to any backend user with the `media[sync]` permission (not exclusively admins).

### PoC
1. Place a file named `<img src=x onerror=alert(document.cookie)>.txt` into the REDAXO `/media/` directory (via backup restore or server access) without adding it to the media database.
2. Log in as any backend user with `media[sync]` permission.
3. Navigate to Mediapool → Sync.
4. The XSS payload executes immediately, stealing the admin session cookie.

### Impact
Stored XSS in the admin panel. An attacker who can place files in the media directory (via admin-level backup restore or server access) can achieve persistent XSS against all users who visit the sync page, including higher-privileged admins. This enables session hijacking, credential theft, and full CMS takeover.

### Fix
Apply `rex_escape()` to all filename variables before inserting into HTML:

$e['label'] = '<label>' . rex_escape($file) . '</label>';
$e['field'] = '<input type="checkbox" name="sync_files[]" value="' . rex_escape($file) . '" />';
// ...
$fragment->setVar('body', '<ul><li>' . implode('</li><li>', array_map('rex_escape', $notWritable)) . '</li></ul>', false);

Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.

Versiones

Rangos afectados

Afectada Corregida
redaxo/source< 5.21.2
5.21.2
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
Packagistredaxo/source
Corregida 5.21.2 — —
Versiones corregidas5.21.2
Explotación

Arsenal público

Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.

Referencias
Otrahttps://github.com/redaxo/core/security/advisories/GHSA-w998-qmw9-mf4m
Otrahttps://github.com/redaxo/core/pull/6581
Otrahttps://github.com/redaxo/core/commit/2daaa3a30570bc76a82f63fd21fb8c9c2cd5dc7c
Otrahttps://github.com/redaxo/core
Otrahttps://github.com/redaxo/core/releases/tag/5.21.2

Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.