Skip to main content

CVE-2025-4970: BSK PDF Manager WordPress Plugin XSS Flaw

CVE-2025-4970 is a stored XSS vulnerability in BSK PDF Manager WordPress plugin allowing authenticated attackers to inject malicious scripts via SVG uploads. This article covers technical details, affected versions, and mitigation.

Published:

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-2025-4970 Overview

CVE-2025-4970 is a stored Cross-Site Scripting (XSS) vulnerability in the BSK PDF Manager plugin for WordPress. The flaw affects all versions up to and including 3.7.1. It stems from insufficient input sanitization and output escaping during Scalable Vector Graphics (SVG) file uploads. Authenticated attackers with Administrator-level access or above can inject arbitrary web scripts that execute when a user accesses the uploaded SVG file. The vulnerability is classified under CWE-79 (Improper Neutralization of Input During Web Page Generation).

Critical Impact

Authenticated administrators can inject persistent scripts via SVG uploads, but exploitation is limited to multi-site installations and configurations where unfiltered_html is disabled.

Affected Products

  • BSK PDF Manager plugin for WordPress — all versions up to and including 3.7.1
  • WordPress multi-site installations running the affected plugin
  • WordPress installations where the unfiltered_html capability has been disabled

Discovery Timeline

  • 2025-12-12 - CVE-2025-4970 published to the National Vulnerability Database (NVD)
  • 2026-10-07 - Last updated in NVD database

Technical Details for CVE-2025-4970

Vulnerability Analysis

The BSK PDF Manager plugin accepts SVG file uploads without properly sanitizing their contents. SVG files are XML-based and can embed <script> elements or event handler attributes such as onload and onclick. When the plugin stores these files and later serves them to users, the browser parses the SVG and executes any embedded JavaScript in the context of the WordPress site's origin.

The scope change reflected in the vulnerability metrics indicates that the injected script can affect resources beyond the vulnerable component itself. An attacker can leverage the executed script to steal session cookies, perform actions on behalf of logged-in users, or pivot to further site compromise through the WordPress REST API.

Exploitation requires Administrator credentials, which significantly narrows the realistic threat model. The vulnerability becomes meaningful in two scenarios: multi-site WordPress networks where site administrators do not inherently have unfiltered_html, and single-site installations where administrators have explicitly stripped that capability via custom role management.

Root Cause

The root cause is missing validation of SVG file contents during upload and the absence of output escaping when serving the files. The plugin trusts administrator-provided content without applying SVG-specific sanitization libraries such as SVG-Sanitizer or DOMPurify.

Attack Vector

An authenticated attacker crafts an SVG file containing JavaScript, uploads it through the BSK PDF Manager interface, and distributes the resulting URL. When any visitor loads the SVG, the embedded script executes in the browser under the site's domain. Full technical details are available in the Wordfence Vulnerability Report and the WordPress Plugin Changeset that resolves the issue.

Detection Methods for CVE-2025-4970

Indicators of Compromise

  • SVG files uploaded through the BSK PDF Manager that contain <script> tags, javascript: URIs, or event handler attributes such as onload, onerror, or onclick
  • Unexpected administrator account creation or role modifications following SVG uploads
  • Outbound requests from browser sessions to attacker-controlled domains after users access uploaded SVG resources

Detection Strategies

  • Scan the WordPress uploads directory for SVG files containing JavaScript keywords or executable XML elements
  • Review plugin audit logs for SVG uploads performed by administrator accounts
  • Inventory WordPress installations to identify sites running BSK PDF Manager version 3.7.1 or earlier

Monitoring Recommendations

  • Monitor web server logs for GET requests to .svg files served from the plugin's upload paths
  • Alert on new administrator-level logins from unusual IP addresses or geolocations
  • Correlate SVG access events with subsequent privileged API calls to /wp-json/wp/v2/users or similar endpoints

How to Mitigate CVE-2025-4970

Immediate Actions Required

  • Update the BSK PDF Manager plugin to a version later than 3.7.1 as soon as the vendor publishes a patched release
  • Audit all administrator accounts and remove any that are unused or unrecognized
  • Remove or quarantine SVG files uploaded through the plugin prior to patching and inspect them for malicious payloads

Patch Information

Refer to the BSK PDF Manager Plugin page for the latest version and the WordPress Plugin Changeset documenting the code fix. Apply the update across all sites in a multi-site network.

Workarounds

  • Disable the BSK PDF Manager plugin until a patched version is installed
  • Block SVG uploads at the web server or WAF layer by rejecting Content-Type: image/svg+xml on upload endpoints
  • Restrict administrator access to trusted personnel and enforce multi-factor authentication on all privileged accounts
  • Serve uploaded SVG files from a sandboxed domain or with a Content-Disposition: attachment header to prevent inline browser rendering
bash
# Example nginx configuration to force SVG downloads instead of inline rendering
location ~* \.svg$ {
    add_header Content-Disposition "attachment";
    add_header X-Content-Type-Options "nosniff";
}

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

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.