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-6039 Overview
CVE-2025-6039 is a Stored Cross-Site Scripting (XSS) vulnerability in the ProcessingJS for WordPress plugin. The flaw affects all versions up to and including 1.2.2. It originates from insufficient input sanitization and output escaping on user-supplied attributes passed to the pjs4wp shortcode.
Authenticated users with contributor-level access or higher can inject arbitrary web scripts into pages. The injected payloads execute in the browser of any visitor who accesses the affected page. The vulnerability is tracked under CWE-79.
Critical Impact
Authenticated contributors can persist JavaScript payloads in WordPress pages, enabling session theft, administrative action hijacking, and client-side redirection against site visitors and administrators.
Affected Products
- ProcessingJS for WordPress plugin, all versions through 1.2.2
- WordPress sites allowing contributor-level or higher user registration
- Any WordPress deployment rendering the pjs4wp shortcode
Discovery Timeline
- 2025-07-04 - CVE-2025-6039 published to the National Vulnerability Database
- 2026-06-17 - Last updated in NVD database
Technical Details for CVE-2025-6039
Vulnerability Analysis
The ProcessingJS for WordPress plugin exposes a shortcode named pjs4wp used to embed Processing.js sketches in WordPress content. The plugin accepts user-controlled attributes on this shortcode and reflects them into rendered HTML without proper sanitization or escaping.
An attacker with contributor-level permissions can submit a post or page containing the shortcode with crafted attribute values. When any user later views the rendered content, the browser executes the attacker-controlled JavaScript in the context of the WordPress site's origin. This enables cookie theft, forced administrative actions, and defacement.
Because the payload is stored in the WordPress database and executed on every view, the impact persists until the content is removed or the plugin is patched. The vulnerability affects both authenticated administrators who moderate contributor submissions and unauthenticated public visitors.
Root Cause
The root cause is missing input validation and missing output escaping on attributes passed to the pjs4wp shortcode handler. The plugin concatenates attribute values directly into HTML output without applying WordPress functions such as esc_attr(), esc_html(), or wp_kses().
Attack Vector
The attack requires network access to the WordPress site and valid credentials for a contributor account or higher. The attacker authors content containing a pjs4wp shortcode with a malicious attribute value, submits it for review or publication, and the payload executes when the content is rendered. No user interaction beyond normal page browsing is required to trigger execution.
See the Wordfence Vulnerability Report and the WordPress Plugin Code Repository for the vulnerable source code.
Detection Methods for CVE-2025-6039
Indicators of Compromise
- Posts, pages, or custom post types containing [pjs4wp] shortcodes with attribute values embedding <script>, javascript: URIs, or HTML event handlers such as onerror= and onload=.
- Unexpected outbound requests from visitor browsers to attacker-controlled domains originating from WordPress page views.
- New or modified post revisions authored by contributor-level accounts referencing the pjs4wp shortcode.
Detection Strategies
- Query the WordPress wp_posts table for content containing pjs4wp and inspect attribute values for script-like payloads.
- Review web application firewall (WAF) logs for POST requests to /wp-admin/post.php or the REST API containing shortcode attributes with HTML or JavaScript syntax.
- Audit user roles and recent contributor activity to identify suspicious accounts submitting content with the affected shortcode.
Monitoring Recommendations
- Enable logging for content submissions by non-administrative roles and alert on inclusion of HTML entities or script tags within shortcode attributes.
- Monitor browser Content Security Policy (CSP) violation reports to surface injected inline scripts on affected pages.
- Track plugin version inventory across WordPress deployments to confirm the installed ProcessingJS for WordPress version.
How to Mitigate CVE-2025-6039
Immediate Actions Required
- Deactivate the ProcessingJS for WordPress plugin until a patched release is confirmed and deployed.
- Audit existing content for pjs4wp shortcode usage and remove or sanitize any attribute values containing script payloads.
- Restrict contributor-level account creation and review existing low-privilege accounts for signs of abuse.
Patch Information
At the time of publication, no fixed version is listed in the NVD entry. Site operators should monitor the WordPress Plugin Code Repository and the Wordfence advisory for an update beyond version 1.2.2.
Workarounds
- Remove the plugin entirely if Processing.js embedding is not required for site functionality.
- Deploy a WAF rule blocking POST requests that include pjs4wp shortcode attributes containing <, >, or javascript: substrings.
- Enforce a strict Content Security Policy that disallows inline scripts and unauthorized script sources.
# Example: disable the plugin via WP-CLI pending a vendor patch
wp plugin deactivate processingjs-for-wp
wp plugin delete processingjs-for-wp
# Audit existing posts for the vulnerable shortcode
wp db query "SELECT ID, post_title, post_author FROM wp_posts WHERE post_content LIKE '%[pjs4wp%';"
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

