Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2024-11823 Overview
The Folder Gallery plugin for WordPress contains a Stored Cross-Site Scripting (XSS) vulnerability in its foldergallery shortcode. The flaw affects all versions up to and including 1.7.4. Insufficient input sanitization and output escaping on user-supplied shortcode attributes allow authenticated attackers with Contributor-level permissions or higher to inject arbitrary JavaScript into pages. Injected scripts execute in the browser of any user who views the affected page, including administrators. The weakness is tracked under CWE-79.
Critical Impact
Authenticated contributors can inject persistent JavaScript that executes in administrator browsers, enabling session theft, forced actions, and potential site takeover.
Affected Products
- WordPress Folder Gallery plugin versions <= 1.7.4
- WordPress installations with Contributor-level or higher user registration enabled
- Any site rendering content containing the foldergallery shortcode
Discovery Timeline
- 2024-12-06 - CVE-2024-11823 published to the National Vulnerability Database
- 2026-06-17 - Last updated in NVD database
Technical Details for CVE-2024-11823
Vulnerability Analysis
The Folder Gallery plugin exposes a foldergallery shortcode that accepts user-controlled attributes. The plugin passes these attributes into rendered HTML output without proper sanitization or escaping. An authenticated user with at least Contributor privileges can embed the shortcode in a post or page and supply attribute values containing JavaScript payloads.
When WordPress renders the content, the attacker-controlled strings appear within HTML attributes or element bodies in executable form. The payload fires in the browser of any visitor who loads the page. Because the injection persists in post content stored in the database, the vulnerability is classified as Stored XSS rather than Reflected XSS.
Exploitation requires user interaction, specifically the victim loading the affected page. Successful exploitation can lead to administrative session hijacking, forced plugin or theme installation, creation of rogue administrator accounts, and pivoting to full site compromise.
Root Cause
The root cause is missing input validation and missing output encoding in the shortcode handler within foldergallery.php. Shortcode attributes are concatenated directly into the response markup without passing through WordPress sanitization helpers such as esc_attr(), esc_html(), or wp_kses().
Attack Vector
The attack vector is network-based and requires authenticated access as a Contributor or higher. An attacker publishes or submits a post containing the foldergallery shortcode with a malicious attribute value. Once the post is viewed, typically during editorial review by an Editor or Administrator, the injected script executes with the victim's privileges in the WordPress admin context.
See the Wordfence Vulnerability Advisory and the WordPress Plugin Code for technical details on the vulnerable handler.
Detection Methods for CVE-2024-11823
Indicators of Compromise
- Posts or pages containing [foldergallery] shortcodes with attribute values containing <script>, onerror=, onload=, or javascript: strings
- Unexpected administrator or editor account creation following content review workflows
- Outbound requests from browser sessions to attacker-controlled domains during WordPress admin activity
- New administrator users, plugin installations, or theme modifications performed without legitimate admin action
Detection Strategies
- Query the wp_posts table for post_content entries that include foldergallery combined with suspicious HTML event handlers or <script> fragments
- Review WordPress audit logs for Contributor-level accounts that created or edited posts invoking the foldergallery shortcode
- Inspect browser Content Security Policy (CSP) violation reports originating from /wp-admin/ pages
Monitoring Recommendations
- Monitor new user registrations and privilege changes within WordPress via audit log plugins
- Alert on modifications to wp-config.php, .htaccess, and the active theme's functions.php
- Capture and review web server access logs for anomalous POST requests to /wp-admin/post.php and /wp-admin/admin-ajax.php from low-privilege accounts
How to Mitigate CVE-2024-11823
Immediate Actions Required
- Update the Folder Gallery plugin to a version later than 1.7.4 as soon as a patched release is available
- If no patched version is available, deactivate and remove the plugin until a fix is published
- Audit all users with Contributor, Author, Editor, and Administrator roles and remove unnecessary accounts
- Review all posts and pages containing the foldergallery shortcode and remove any suspicious attribute values
Patch Information
At the time of the NVD publication, all versions up to and including 1.7.4 are vulnerable. Monitor the WordPress Folder Gallery Plugin listing and the Wordfence Vulnerability Advisory for the fixed version. Apply the vendor patch across all WordPress environments once released.
Workarounds
- Restrict the Contributor role or require Editor approval workflows that preview content in a sandboxed, non-admin session
- Deploy a Web Application Firewall (WAF) rule to block requests containing foldergallery shortcodes with HTML event handlers or <script> tags in attribute values
- Enforce a strict Content Security Policy on /wp-admin/ to block inline script execution
- Remove the unfiltered_html capability from all non-administrator roles and verify Contributor accounts cannot bypass sanitization
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

