Skip to main content

CVE-2025-5116: WP Plugin Info Card XSS Vulnerability

CVE-2025-5116 is a stored cross-site scripting flaw in WP Plugin Info Card for WordPress that lets authenticated attackers inject malicious scripts. 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-5116 Overview

CVE-2025-5116 is a Stored Cross-Site Scripting (XSS) vulnerability in the WP Plugin Info Card plugin for WordPress. The flaw affects all plugin versions up to and including 5.3.1. It stems from insufficient input sanitization and output escaping on the containerid parameter in the plugin's shortcode handler. Authenticated users with Contributor-level access or higher can inject arbitrary JavaScript into pages. The injected scripts execute in the browser of any user who views an affected page. The issue originates from an incomplete fix for CVE-2025-31835, meaning the prior patch did not fully close the injection path.

Critical Impact

Authenticated contributors can store malicious JavaScript on WordPress pages, enabling session theft, administrative action hijacking, and site defacement when victims load the page.

Affected Products

  • WP Plugin Info Card plugin for WordPress — all versions through 5.3.1
  • WordPress sites allowing Contributor-level accounts or higher
  • Any page rendering the plugin's shortcode containing the containerid parameter

Discovery Timeline

  • 2025-06-03 - CVE-2025-5116 published to NVD
  • 2026-06-17 - Last updated in NVD database

Technical Details for CVE-2025-5116

Vulnerability Analysis

The vulnerability resides in the shortcode processing logic in php/Shortcodes.php within the WP Plugin Info Card plugin. The containerid attribute passed through the plugin's shortcode is rendered into the HTML output of a page without sufficient sanitization or escaping. An authenticated attacker with Contributor permissions can craft a post or page that embeds the shortcode with a malicious containerid payload. When any user — including administrators — views the page, the injected script executes under the site's origin.

This CVE is tracked as CWE-79: Improper Neutralization of Input During Web Page Generation. It is a direct consequence of an incomplete patch for CVE-2025-31835, which addressed similar injection points but failed to cover the containerid parameter path.

Root Cause

The plugin accepts the containerid shortcode attribute and emits it into generated markup without applying WordPress escaping helpers such as esc_attr() or input filters like sanitize_html_class(). Because the stored content lives in the WordPress post database, each request to the page re-renders the attacker-controlled value directly into the DOM.

Attack Vector

The attack requires an authenticated session at Contributor level or higher. The attacker creates or edits a post that includes the plugin's shortcode with a crafted containerid value containing JavaScript or attribute-breaking content. Once the content is saved and viewed by a victim, the script executes in the victim's browser context. Successful exploitation can lead to session cookie theft, forced administrative actions via CSRF, redirection to attacker-controlled infrastructure, or injection of further payloads.

See the vulnerable source in the WP Plugin Info Card repository and the WordPress plugin trunk source for the affected code path. The Wordfence vulnerability analysis provides additional technical context.

Detection Methods for CVE-2025-5116

Indicators of Compromise

  • Posts or pages containing the plugin shortcode with suspicious containerid values that include <, >, quotes, event handlers (onerror, onclick), or javascript: strings.
  • New or recently edited content authored by Contributor-level accounts referencing the WP Plugin Info Card shortcode.
  • Unexpected outbound requests from site visitors' browsers to third-party domains originating from pages rendering the plugin.

Detection Strategies

  • Query the wp_posts table for shortcode usage of the plugin and inspect the containerid attribute values for HTML metacharacters or script keywords.
  • Review web server access logs for POST requests to /wp-admin/post.php from Contributor accounts that save content containing the plugin shortcode.
  • Monitor Content Security Policy (CSP) violation reports for inline script executions on pages that render the plugin output.

Monitoring Recommendations

  • Alert on creation or modification of posts by low-privileged roles that embed the WP Plugin Info Card shortcode.
  • Track administrator session anomalies such as unexpected privilege changes or new administrative accounts following page views.
  • Forward WordPress audit logs and web server telemetry into a centralized analytics platform for correlation of authoring activity with suspicious outbound traffic.

How to Mitigate CVE-2025-5116

Immediate Actions Required

  • Update the WP Plugin Info Card plugin to a version newer than 5.3.1 that includes the fix referenced in WordPress changeset #3303791.
  • Audit all existing posts and pages for shortcode usage with crafted containerid values and remove any malicious entries.
  • Review Contributor and Author accounts for unauthorized or dormant users and reset credentials where appropriate.

Patch Information

The vendor addressed the incomplete patch in WordPress plugin changeset #3303791. Administrators should install the latest release available on the WP Plugin Info Card developer page. Because this vulnerability resulted from an incomplete fix for CVE-2025-31835, confirm the installed version is strictly greater than 5.3.1.

Workarounds

  • Deactivate and remove the WP Plugin Info Card plugin until the patched version can be deployed.
  • Restrict content authoring to trusted roles by removing shortcode capabilities from Contributor accounts via a role-management plugin.
  • Deploy a Web Application Firewall (WAF) rule that blocks requests containing HTML metacharacters in the containerid shortcode attribute.
  • Enforce a strict Content Security Policy that disallows inline scripts to limit the impact of stored XSS payloads.
bash
# Example: identify posts containing the vulnerable shortcode via WP-CLI
wp db query "SELECT ID, post_title, post_author FROM wp_posts \
  WHERE post_content LIKE '%[wppic%containerid=%' \
  AND post_status IN ('publish','draft','pending');"

# Update the plugin to the patched release
wp plugin update wp-plugin-info-card

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.