Security Advisory: Gallery Extra
Overview
- Project: Gallery Extra
- CVE ID: To be assigned
- Affected versions: All versions up to and including 2.0.4
- Fixed version: 2.0.5
- Release date: November 16, 2026
- Severity: Critical
- CVSS v3.1 score: 9.8 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H)
- Weakness: CWE-434 Unrestricted Upload of File with Dangerous Type
Summary
Gallery 2.0.5 fixes a vulnerability that lets an unauthenticated remote visitor run code on the server. This has been exploited on at least one live site. Update now.
Vulnerability Details
| # | Type | Severity | CVSS v3.1 | CVE ID |
|---|---|---|---|---|
| 1 | Remote code execution via unrestricted file upload | Critical | 9.8 | To be assigned |
Description
Insufficient input validation lets an unauthenticated visitor run code on the server. This can lead to full compromise of the web server account.
Affected Systems
Any MODX Revolution installation running Gallery 2.0.4 or earlier is affected, including all 1.x releases. How severe the impact is depends on server configuration, so treat every installation as vulnerable until upgraded.
Mitigation
- Recommended action: Upgrade to Gallery 2.0.5 or later through the MODX Extras Installer right away.
- If you can’t upgrade immediately: Uninstall Gallery until you can.
- MODX Cloud customers: A virtual patch is in place across MODX Cloud that blocks this attack, so your sites are protected until you can upgrade. Please still upgrade to 2.0.5 as soon as you can.
- After upgrading: Empty
assets/components/gallery/cache/. Thumbnails regenerate on demand. The upgrade does not remove files an attacker may already have placed. - Check for signs of compromise:
- Any
.phpfile, or any file you don’t recognize as a thumbnail, inassets/components/gallery/cache/ - Any request for a
.phpfile under/assets/components/gallery/cache/ - The user agent
msl_dropor the address144.31.108.125in your access logs
- Any
- If you find anything suspicious: Treat the site as compromised. Restore from a backup made before the compromise if you can, check the rest of the site for other web shells, and rotate your database credentials and manager user passwords.
Defence in depth
These steps don’t replace the upgrade, but they block this type of attack.
Stop PHP from running in Gallery’s cache directory. On nginx, add this before your main PHP location block:
location ~* ^/assets/components/gallery/cache/.*\.(php|phtml|phar)$ {
deny all;
}
On Apache, add an .htaccess file to assets/components/gallery/cache/:
<FilesMatch "\.(php|phtml|phar)$">
Require all denied
</FilesMatch>
If you manage the server, use a restrictive ImageMagick security policy (policy.xml) that disables formats your sites don’t need.
Credits
- Discovery: Thomas Jakobi
- Resolution: Thomas Jakobi
- Release: Mat Dave Jones
- Coordination: MODX Security Team
Timeline
- Exploited in the wild: November 3, 2026
- Reported to MODX: November 4, 2026
- Fix developed: November 12, 2026
- Fix released: November 16, 2026
- Publicly disclosed: November 16, 2026
References
- MODX Security Team: [email protected]
- Fixed version: Gallery 2.0.5 on the MODX Extras site
- Source: modxcms/Gallery on GitHub
Revision History
- November 16, 2026: Initial advisory published.