Skip to main content
Vulnerability Database/CVE-2025-11987

CVE-2025-11987: Visual Link Preview WordPress XSS Vulnerability

CVE-2025-11987 is a stored XSS vulnerability in the Visual Link Preview WordPress plugin affecting versions up to 2.2.7. Attackers with contributor access can inject malicious scripts. This article covers technical details, affected versions, security impact, and mitigation strategies.

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-11987 Overview

CVE-2025-11987 is a Stored Cross-Site Scripting (XSS) vulnerability in the Visual Link Preview plugin for WordPress. The flaw affects all versions up to and including 2.2.7. The plugin's visual-link-preview shortcode fails to properly sanitize user-supplied attributes and does not escape output when rendering link previews.

Authenticated users with contributor-level permissions or higher can inject arbitrary JavaScript into pages. The injected scripts execute in the browser of any visitor who views an affected page, enabling session hijacking, credential theft, and administrative action abuse. The weakness is classified under CWE-80: Improper Neutralization of Script-Related HTML Tags in a Web Page.

Critical Impact

Contributor-level attackers can store malicious JavaScript via a shortcode, enabling script execution against administrators and site visitors.

Affected Products

  • Visual Link Preview plugin for WordPress — versions up to and including 2.2.7
  • WordPress sites allowing contributor-level or higher accounts to use the plugin shortcode
  • Any front-end page rendering the visual-link-preview shortcode

Discovery Timeline

  • 2025-11-05 - CVE-2025-11987 published to the National Vulnerability Database
  • 2026-06-17 - Last updated in NVD database

Technical Details for CVE-2025-11987

Vulnerability Analysis

The vulnerability resides in the shortcode handler responsible for rendering link preview cards. The plugin accepts attribute values supplied by the shortcode author and inserts them into the rendered HTML without sufficient sanitization or contextual output escaping. An attacker with publishing capabilities can craft shortcode attributes containing HTML or JavaScript payloads that persist in post content and execute when the page is viewed.

Because the stored payload executes in the context of the WordPress site, injected scripts inherit the privileges of the viewing user. If a site administrator views a compromised page, the attacker can create new administrator accounts, modify theme or plugin code, or exfiltrate session tokens. The scope change in the attack vector reflects that a lower-privileged contributor can affect higher-privileged users.

Root Cause

The root cause is missing input sanitization and missing output escaping in the shortcode rendering path. The relevant code is located in class-vlp-link.php (line 56) and the simple.php template. Attribute values flow directly into the HTML template without esc_attr(), esc_html(), or wp_kses() protection.

Attack Vector

Exploitation requires an authenticated contributor-level WordPress account. The attacker inserts the visual-link-preview shortcode into a draft post with crafted attributes containing JavaScript payloads. When the post is previewed, published, or submitted for review and viewed by an editor or administrator, the stored payload executes in that user's browser session. See the Wordfence vulnerability report for additional context.

// No verified exploit code is published for this CVE.
// Refer to the vendor changeset and advisory links above for technical details.

Detection Methods for CVE-2025-11987

Indicators of Compromise

  • Post or page content containing [visual-link-preview ...] shortcodes with attributes that include <script>, onerror=, onload=, or javascript: strings
  • Unexpected administrator or editor account creation shortly after contributor-authored content is published
  • Outbound requests from authenticated administrator browsers to attacker-controlled domains following page views

Detection Strategies

  • Audit the wp_posts table for stored content referencing the visual-link-preview shortcode and inspect each occurrence for suspicious attribute values
  • Review WordPress user activity logs for contributor accounts that recently published or updated posts using the plugin
  • Deploy a web application firewall rule to flag shortcode attributes containing HTML event handlers or script tags

Monitoring Recommendations

  • Monitor browser Content Security Policy (CSP) violation reports to identify script execution from unexpected inline sources
  • Track creation of new WordPress accounts and role elevations through authenticated session telemetry
  • Alert on administrative API calls originating immediately after an administrator views a page containing the plugin's shortcode

How to Mitigate CVE-2025-11987

Immediate Actions Required

  • Update the Visual Link Preview plugin to the version published after revision 3388877 in the WordPress plugin repository
  • Restrict contributor-level accounts and review the account list for unused or untrusted users
  • Audit existing posts and pages for malicious visual-link-preview shortcodes and remove any injected payloads

Patch Information

The vendor addressed the vulnerability in the WordPress changeset 3388877, which applies proper output escaping to the shortcode template. Site administrators should install the latest version through the WordPress plugin updater.

Workarounds

  • Deactivate and remove the Visual Link Preview plugin until the patched version is installed
  • Remove or restrict shortcode privileges for contributor-level roles using a capability management plugin
  • Deploy a web application firewall rule that blocks shortcode attributes containing HTML tags or JavaScript event handlers
bash
# Update the plugin via WP-CLI
wp plugin update visual-link-preview

# Or deactivate as a temporary workaround
wp plugin deactivate visual-link-preview

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.