Medium

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

  • Disclosed: 23.09.2026
  • Updated: 11.10.2026 10:22

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

php
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

php
$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:

php
$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);

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
Composer package redaxo/source < 5.21.2 5.21.2

References

CVSS score 4.8/10
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N
Weakness (CWE)
CWE-79
Platform
Composer
Package
redaxo/source
Disclosed
23.09.2026
Updated
11.10.2026 10:22

Sources and licenses

OSV / GitHub Advisory Database - GHSA-w998-qmw9-mf4m - CC BY 4.0

Vulnerability history: redaxo/source

All published vulnerabilities of this package (Composer package), newest first. Shows whether this is a one-off slip or a package that needs watching.

All (18) in the archive
Total entries
18
First → latest
02.2024 09.2026
Without a fix
3
Exploited in attacks
0

Severity breakdown

  • High 4
  • Medium 11
  • Low 3

Disclosures per year

  1. 2024: 3
  2. 2025: 7
  3. 2026: 8
Severity:
  1. REDAXO: Stored XSS in Mediapool Sync Page via Unescaped Filesystem Filenames this entry
    Medium · 4.8 CVE-2026-63002 < 5.21.2 5.21.2
  2. High · 7.2 CVE-2024-25298 <= 5.15.1 no fix

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.