CVE-2026-63002: REDAXO: Stored XSS in Mediapool Sync Page via Unescaped Filesystem Filenames
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.
Published Sep 23, 2026
Affected packages
redaxo/source
- Ecosystem
- Composer (PHP)
- Affected
- <= 5.21.1
- Fixed in
- 5.21.2
- Check
composer show redaxo/source
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
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 filenamesBy 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
- Place a file named
.txtinto the REDAXO/media/directory (via backup restore or server access) without adding it to the media database. - Log in as any backend user with
media[sync]permission. - Navigate to Mediapool → Sync.
- 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);Credited to de3erve-hunter.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More Composer (PHP) vulnerabilities
All Composer (PHP) entriesCVE-2026-62998
REDAXO: Unwhitelisted ORDER BY Column in rex_list Allows Authenticated Column Enumeration
medium4.3Sep 24, 2026CVE-2026-63000
REDAXO: Missing CSRF Protection on Package Update Action Allows Forced Addon Updates
medium6.4Sep 23, 2026CVE-2026-63001
REDAXO: Stored XSS via Unescaped Media Manager Type Name in `mediaIsInUse()`
medium4.8Sep 23, 2026CVE-2026-53599
Redaxo has a Mediapool isAllowedExtension bypass via multi-segment filename that leads to authenticated RCE on Apache mod_php multi-extension handlers
high7.5Jul 31, 2026GHSA-m662-8jrj-cw6v
REDAXO has reflected XSS in backend Metainfo API via type parameter (CSRF token required)
low2.1Apr 10, 2026GHSA-xq4j-g85q-wf97
REDAXO has reflected XSS backend packages API via function parameter (CSRF token required)
low2.1Apr 10, 2026
