Download Manager <= 3.3.53 - Authenticated (Author+) Stored Cross-Site Scripting
Description
The Download Manager plugin for WordPress is vulnerable to Stored Cross-Site Scripting in versions up to, and including, 3.3.53 due to insufficient input sanitization and output escaping. This makes it possible for authenticated attackers, with author-level access and above, to inject arbitrary web scripts in pages that will execute whenever a user accesses an injected page.
CVSS Vector Breakdown
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:NTechnical Details
<=3.3.53What Changed in the Fix
Changes introduced in v3.3.54
Source Code
WordPress.org SVN# Exploitation Research Plan - CVE-2026-39615 (Download Manager) ## 1. Vulnerability Summary The Download Manager plugin (<= 3.3.53) is vulnerable to Stored Cross-Site Scripting (XSS) due to insufficient input sanitization and output escaping of package metadata. Specifically, the `WPDM\Admin\Menu\…
Show full research plan
Exploitation Research Plan - CVE-2026-39615 (Download Manager)
1. Vulnerability Summary
The Download Manager plugin (<= 3.3.53) is vulnerable to Stored Cross-Site Scripting (XSS) due to insufficient input sanitization and output escaping of package metadata. Specifically, the WPDM\Admin\Menu\Packages::savePackage method, which handles the saving of "Download" (wpdmpro) post metadata, contains logic that bypasses sanitization for certain fields like password and uses inadequate escaping (htmlspecialchars without ENT_QUOTES) for others like link_label. This allows an authenticated user with Author-level permissions or higher to inject malicious scripts into package metadata, which are subsequently rendered in the WordPress admin area or on the frontend package pages.
2. Attack Vector Analysis
- Endpoint:
/wp-admin/post.php(for updating) or/wp-admin/post-new.php(for creating). - Hook:
save_post(which triggersWPDM\Admin\Menu\Packages::savePackage). - Target Post Type:
wpdmpro(Downloads). - Vulnerable Parameters:
file[password],file[link_label],file[version],file[package_size]. - Authentication: Authenticated Author+. The user must have
edit_postcapability for the package and theupload_filescapability (standard for Authors). - Preconditions: The plugin must be active, and the attacker must be able to create or edit a
wpdmpropost.
3. Code Flow
- Entry Point: When a user saves a
wpdmpropost, WordPress fires thesave_postaction. - Hook Registration: In
src/Admin/Menu/Packages.php, the__constructmethod registers the hook:add_action( 'save_post', array( $this, 'savePackage' ) );. - Capability Check:
savePackagechecks if the user canedit_postandupload_files(lines 47-49). - Metadata Iteration: The function iterates over the
$_POST['file']array (line 70). - Sanitization Bypass (Password):
If the key is// src/Admin/Menu/Packages.php:75 if ( $meta_key == 'password' ) { //don't alter/sanitize password }password, it hits an empty block, skipping theelseblock'shtmlspecialcharssanitization. The raw input is then passed directly toupdate_post_meta(line 105). - Inadequate Sanitization (Other fields):
For other fields (e.g.,// src/Admin/Menu/Packages.php:103 else { $meta_value = is_array( $meta_value ) ? wpdm_sanitize_array( $meta_value, 'txt' ) : htmlspecialchars( $meta_value ); }link_label), it useshtmlspecialchars. By default (in PHP < 8.1), this does not escape single quotes ('), allowing attribute breakout if the value is rendered inside a single-quoted attribute (e.g.,<input value='$label'>). - Sink:
update_post_meta( $post, $key_name, $meta_value );(line 105). The malicious script is stored in the database. - Execution: The payload executes when a user (admin or visitor) views the package in the backend list, editor, or frontend single package page.
4. Nonce Acquisition Strategy
This vulnerability exploits the standard WordPress post saving mechanism.
- Requirement: A
Summary
The Download Manager plugin for WordPress is vulnerable to Stored Cross-Site Scripting (XSS) due to insufficient input sanitization and output escaping of package metadata. Authenticated attackers with Author-level access and above can inject malicious scripts into fields like 'password' or 'icon', which are then executed when an administrator views the package list or editor in the WordPress backend.
Vulnerable Code
// src/Admin/Menu/Packages.php:77 if ( $meta_key == 'password' ) { //don't alter/sanitize password } // ... else { $meta_value = is_array( $meta_value ) ? wpdm_sanitize_array( $meta_value, 'txt' ) : htmlspecialchars( $meta_value ); } update_post_meta( $post, $key_name, $meta_value ); --- // src/Admin/Menu/Packages.php:271 $icon = get_post_meta( $post_ID, '__wpdm_icon', true ); if ( $icon != '' ) { $icon = $icon; echo "<img src='$icon' class='img60px' alt='Icon' />"; }
Security Fix
@@ -269,7 +269,7 @@ } else { $icon = get_post_meta( $post_ID, '__wpdm_icon', true ); if ( $icon != '' ) { - $icon = $icon; + $icon = esc_url($icon); echo "<img src='$icon' class='img60px' alt='Icon' />"; } }
Exploit Outline
The exploit targets the package saving logic triggered via the standard WordPress post editor. An attacker with Author+ privileges (requiring 'edit_posts' and 'upload_files' capabilities) performs the following steps: 1. Navigate to the 'Downloads' menu and create or edit a package (post type 'wpdmpro'). 2. Submit a POST request to '/wp-admin/post.php' including the metadata array in the 'file' parameter. 3. To exploit the 'password' field, the payload 'file[password]' is set to a raw script tag like '<script>alert(1)</script>', which bypasses sanitization entirely. 4. To exploit the 'icon' field, the payload 'file[icon]' is set to an attribute injection string like "x' onerror='alert(1)". Because the plugin uses 'htmlspecialchars' without ENT_QUOTES, the single quote is not escaped. 5. The payload is stored in the database via 'update_post_meta'. 6. The script executes when an administrator visits the 'All Downloads' list in the admin panel, where the 'icon' metadata is rendered inside a single-quoted 'src' attribute of an 'img' tag.
Check if your site is affected.
Run a free security audit to detect vulnerable plugins, outdated versions, and misconfigurations.