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-12670 Overview
CVE-2025-12670 is a Stored Cross-Site Scripting (XSS) vulnerability in the WP-TwitPic plugin for WordPress. The flaw affects all versions up to and including 1.0. It stems from insufficient input sanitization and output escaping on multiple parameters of the twitpic shortcode. Authenticated attackers with Contributor-level access or higher can inject arbitrary JavaScript into pages. The injected script executes in the browser of any user who views the affected page, enabling session theft, redirection, and administrative account compromise. The issue is tracked under CWE-79.
Critical Impact
Contributor-level attackers can store JavaScript that executes against administrators and visitors, enabling account takeover and malicious redirects.
Affected Products
- WordPress WP-TwitPic plugin versions up to and including 1.0
- WordPress sites that permit Contributor-level or higher user registration
- WordPress installations where the twitpic shortcode is rendered on front-end pages
Discovery Timeline
- 2025-11-27 - CVE-2025-12670 published to the National Vulnerability Database
- 2026-10-18 - Last updated in NVD database
Technical Details for CVE-2025-12670
Vulnerability Analysis
The WP-TwitPic plugin registers a twitpic shortcode that accepts multiple user-controlled parameters. The plugin fails to sanitize these parameters on input and does not escape them when rendering output in generated HTML. Any contributor who inserts the shortcode into post content can embed arbitrary attribute values, including JavaScript event handlers or raw HTML sequences that break out of the intended attribute context. When WordPress renders a post containing the malicious shortcode, the browser parses the attacker-supplied markup as executable script in the context of the site's origin. The plugin source referenced at plugins.trac.wordpress.org shows direct concatenation of shortcode attributes into HTML output.
Root Cause
The root cause is the absence of two WordPress-standard defenses. The plugin does not apply sanitize_text_field() or equivalent filtering to incoming shortcode attributes. It also omits output-escaping helpers such as esc_attr() and esc_html() when the attribute values are written into the response. The combination allows attacker-controlled strings to survive end-to-end and reach the DOM unmodified.
Attack Vector
An authenticated contributor creates or edits a post that contains a crafted twitpic shortcode with malicious attribute payloads. After the post is published or previewed, the stored payload is served to every subsequent viewer. Administrators who review contributor submissions become high-value targets, because script executed in their session can create new administrator accounts or exfiltrate session cookies. Review the Wordfence vulnerability analysis for additional context.
The vulnerability is triggered by placing crafted attribute values
inside the [twitpic] shortcode within post content. No proof-of-concept
code is published here; see the Wordfence advisory for details.
Detection Methods for CVE-2025-12670
Indicators of Compromise
- Posts or pages containing [twitpic ...] shortcodes with attribute values that include <script, javascript:, onerror=, or onload= strings.
- Unexpected wp_users entries with the administrator role created shortly after a Contributor published content.
- Outbound requests from browsing sessions to attacker-controlled domains referenced inside shortcode attributes.
Detection Strategies
- Audit the wp_posts table for post content matching the regular expression \[twitpic[^\]]*(script|onerror|onload|javascript:) to surface stored payloads.
- Monitor WordPress audit logs for Contributor accounts that publish or update posts referencing the WP-TwitPic plugin.
- Scan rendered pages with a headless browser to detect inline script execution originating from shortcode output.
Monitoring Recommendations
- Alert on new user creation events, especially role elevations to Administrator, following recent Contributor post activity.
- Enforce a Content Security Policy (CSP) that blocks inline scripts and log all CSP violation reports.
- Track plugin version inventory and flag any site still running WP-TwitPic 1.0 or earlier.
How to Mitigate CVE-2025-12670
Immediate Actions Required
- Deactivate and uninstall the WP-TwitPic plugin until a patched release is confirmed on the plugin page.
- Review all existing posts for twitpic shortcode usage and remove or sanitize any content submitted by untrusted contributors.
- Rotate authentication cookies and force password resets for administrators who may have viewed malicious posts.
Patch Information
At the time of publication, no fixed version is listed in the NVD entry. All versions up to and including 1.0 remain vulnerable. Monitor the WordPress plugin repository and the Wordfence advisory for updates and apply any released patch immediately.
Workarounds
- Restrict Contributor-level account creation and audit existing contributors to confirm legitimate access.
- Deploy a Web Application Firewall (WAF) rule to block POST requests to wp-admin/post.php containing [twitpic combined with script-injection patterns.
- Enforce a strict CSP with script-src 'self' to prevent execution of injected inline JavaScript.
- Remove the plugin and replace its functionality with a maintained alternative.
# Example WordPress CLI commands to inventory and disable the plugin
wp plugin list --name=wp-twitpic --fields=name,status,version
wp plugin deactivate wp-twitpic
wp plugin uninstall wp-twitpic
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

