CVE-2026-63002: REDAXO: Stored XSS in Mediapool Sync Page via Unescaped Filesystem Filenames

Published Sep 23, 2026
·
Updated

Summary The mediapool sync page (sync.php) renders filenames from the /media filesystem directory directly into HTML without applying rexescape() (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 (iswritable(rexpath::media($file))) { $e = []; $e['label'] = '<label>' . $file . '</label>'; // NO rexescape! $e['field'] = '<input type="checkbox" name="syncfiles[]" value="' . $file . '" />'; // NO rexescape! $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 rexescape($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 rexescape() to all filename variables before inserting into HTML: php $e['label'] = '<label>' . rexescape($file) . '</label>'; $e['field'] = '<input type="checkbox" name="syncfiles[]" value="' . rexescape($file) . '" />'; // ... $fragment->setVar('body', '<ul><li>' . implode('</li><li>', arraymap('rexescape', $notWritable)) . '</li></ul>', false);

Other sources

REDAXO is a PHP-based content management system. Prior to 5.21.2, redaxo/src/addons/mediapool/pages/sync.php inserts filenames held in $diffFiles from the media filesystem into the Mediapool Sync page without rexescape(). An attacker who can place an unregistered file with HTML metacharacters in the media directory can execute script in the browser of a backend user with media[sync] permission when that user opens the Sync page, enabling session theft or unauthorized backend actions. This issue is fixed in version 5.21.2.

MITRE

Affected Software

1 affected componentFixes available
composer/redaxo/source<=5.21.1
5.21.2

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade composer/redaxo/source to a version that resolves this vulnerability.

    Fixed in 5.21.2
  2. Upgrade

    Upgrade REDAXO to a version that resolves this vulnerability.

    Fixed in 5.21.2
  3. Configuration

    Apply rex_escape() to all filename variables before inserting them into HTML in redaxo/src/addons/mediapool/pages/sync.php.

    REDAXO mediapool sync page Filename HTML escaping = rex_escape()

Event History

Sep 23, 2026
CVE Published
via MITRE·02:05 PM
Data Sourced
via MITRE·02:05 PM
DescriptionSeverityWeakness
Advisory Published
via GitHub·02:06 PM
Data Sourced
via GitHub·02:06 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

Who can trigger the script execution?

An attacker needs to place a file with HTML metacharacters in its filename into the /media/ filesystem directory. The file must be absent from the media database so that it appears in the sync page's list of unregistered files.

2

Who is exposed to the XSS payload?

Any backend user who views the mediapool sync page while the malicious filename is listed can have JavaScript executed in their browser. The issue affects both writable files, rendered in labels and checkbox values, and non-writable files, rendered in a list.

3

Is user interaction required?

Yes. A backend user must visit the mediapool sync page for the unescaped filename to be rendered and the payload to execute.

4

What should be checked during triage?

Inspect the /media/ directory for filenames containing HTML metacharacters, especially files not registered in the media database. Such unregistered files are used to populate the vulnerable sync-page lists.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203