CVE-2026-9626: Stored XSS in JSON API User WordPress Plugin ≤4.1.0
A stored cross-site scripting (XSS) vulnerability exists in the JSON API User plugin for WordPress affecting versions up to 4.1.0. An authenticated attacker with subscriber-level access can inject malicious scripts into post comments through the REST API's post_comment endpoint. Because the injected content bypasses moderation and is stored permanently, the malicious code executes automatically when other users view the affected page—making this a persistent threat that could compromise visitor sessions or steal sensitive information.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 6.4 MEDIUM · CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N
- Weaknesses (CWE)
- CWE-79
- Affected products
- 0 configuration(s)
- Published / Modified
- 2026-07-03 / 2026-07-06
NVD description (verbatim)
The JSON API User plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the 'content' parameter of the post_comment API endpoint in versions up to, and including, 4.1.0 This is due to insufficient input sanitization in the post_comment() function, which passes the attacker-controlled comment_content value directly to wp_insert_comment() without applying any HTML sanitization, and additionally allows the caller to set comment_approved=1 to self-approve the comment and bypass moderation. This makes it possible for authenticated attackers, with subscriber-level access and above, to inject arbitrary web scripts in pages that will execute whenever a user accesses an injected page.
6 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
The vulnerability stems from insufficient input sanitization in the post_comment() function of the JSON API User plugin. The function accepts the 'content' parameter from API requests and passes it directly to wp_insert_comment() without applying HTML sanitization. Additionally, the implementation allows authenticated callers to set comment_approved=1, which auto-approves comments and circumvents the WordPress moderation queue. This combination allows stored XSS payloads to persist in the comment database and execute in the context of any user's browser that views the compromised page.
Business impact
Stored XSS in a widely-used plugin can enable attackers to compromise visitor sessions, steal authentication tokens, deface content, or redirect users to malicious sites. Since subscriber-level access is the minimum requirement, compromised user accounts or social engineering of contributors becomes an attack vector. Organizations relying on this plugin for community engagement or membership features face reputational damage and potential loss of visitor trust if their sites are used to distribute malware or phishing payloads.
Affected systems
The JSON API User plugin for WordPress in versions up to and including 4.1.0 is affected. Any WordPress installation using this plugin with the REST API endpoint accessible is in scope. The vulnerability requires the attacker to have at least subscriber-level credentials, so sites with open user registration, guest contributions, or compromised user accounts are at elevated risk.
Exploitability
Exploitation requires authentication with subscriber-level privileges or higher, which limits the attack surface compared to unauthenticated XSS. However, this is a low bar in many WordPress environments—subscriber accounts are often freely registered or created by site administrators for legitimate users. Once an attacker gains such access, injecting a payload is straightforward: a single crafted API request to the post_comment endpoint. The self-approval mechanism ensures the payload persists without moderation, making detection and removal more difficult.
Remediation
Update the JSON API User plugin to a patched version that sanitizes the 'content' parameter before passing it to wp_insert_comment() and removes the ability to bypass comment moderation via API. Verify the availability of a patched release by consulting the plugin's official repository or vendor advisory. In the interim, disable the post_comment API endpoint if not in active use, restrict access to the REST API to trusted IP ranges, or lower the minimum user role required to approve comments to reduce attacker capability.
Patch guidance
Check the JSON API User plugin's update status in your WordPress admin dashboard or on the official WordPress plugin repository. Install any available security update immediately. After patching, audit existing comments created after the vulnerability was introduced to identify and remove any malicious payloads. Test the patched version in a staging environment before deploying to production to ensure compatibility with your theme and other plugins. Verify against the vendor advisory that your installed version number matches the patched version number provided by the plugin maintainer.
Detection guidance
Monitor API access logs for POST requests to the /wp-json/json-api-user/post_comment endpoint from low-privilege accounts. Look for suspicious patterns in comment_content parameters, such as script tags, event handlers (onclick, onerror, onload), or encoded payloads. Review comments created without moderation flags or with comment_approved=1 set directly via API. In WordPress, inspect the wp_comments table for entries with post_type='comment' and meta values indicating API-sourced creation. Consider implementing Web Application Firewall (WAF) rules to block requests containing common XSS payloads before they reach the WordPress application.
Why prioritize this
Although the CVSS score of 6.4 (Medium) reflects the authentication requirement, the ease of exploitation, high prevalence of the plugin, and persistence of the payload warrant prioritization. Stored XSS on a public-facing site creates continuous risk to all visitors, not just the attacker. The low barrier to entry (subscriber access) and potential for large-scale compromise through a single injected comment make this a strong candidate for rapid patching, especially for sites with significant user bases or sensitive content.
Risk score, explained
The CVSS 3.1 score of 6.4 reflects: Network-based attack vector (AV:N), low attack complexity (AC:L), low privilege requirement (PR:L), no user interaction required (UI:N), and changed scope (S:C) affecting resources beyond the vulnerable component. Confidentiality and integrity impacts (C:L/I:L) are assigned because XSS can exfiltrate session data and modify page content. No availability impact (A:N) is assessed because the attack does not disrupt service. The Medium severity appropriately balances the persistence and cross-user impact of stored XSS against the authentication gate that limits initial access.
Frequently asked questions
Can this vulnerability be exploited without a WordPress user account?
No. The vulnerability requires at least subscriber-level credentials to make API requests to the post_comment endpoint. However, many WordPress sites permit open registration or have contributors with subscriber roles, so an attacker may not need to compromise an existing account.
Does the vulnerability affect comment visibility or moderation?
Yes. The attacker can set comment_approved=1 via the API, which auto-approves the comment and bypasses the WordPress moderation queue. This allows malicious comments to become visible immediately without administrator review.
What types of payloads are effective for this vulnerability?
Any HTML or JavaScript that WordPress does not sanitize can be injected. Common examples include script tags with remote code sources, event handlers like onerror or onload, and iframe or img tags pointing to malicious domains. The exact payload depends on your WordPress version, theme, and other active plugins that may add additional filtering.
How do I know if my site has been exploited?
Audit your wp_comments table for entries created via API (often by users with low privilege levels) that contain HTML tags, script content, or suspicious JavaScript. Review your API access logs for unusual post_comment requests. If you identify malicious comments, delete them, and audit user sessions to check for account compromise.
This analysis is provided for informational purposes to assist security professionals in risk assessment and remediation planning. It does not constitute legal advice or a guarantee of vulnerability impact in specific environments. The vulnerability description, affected versions, and CVSS scoring are derived from published sources and vendor advisories; always verify patch availability and compatibility against official plugin documentation before deploying updates. Exploit code, weaponized proofs-of-concept, and detailed attack walkthroughs are not provided here; consult authorized security researchers and your vendor for guided exploitation in authorized testing scenarios only. Source: NVD (public-domain), retrieved 2026-08-11. Analysis generated by SEC.co (claude-haiku-4-5).
Weaknesses (CWE)
Related vulnerabilities
- CVE-2016-20070MEDIUMPrivilege Escalation & Stored XSS in WordPress Booking Calendar Contact Form 1.0.23
- CVE-2018-25384MEDIUMStored XSS in Wikidforum 2.20 Allows Authenticated Attackers to Inject Malicious Scripts
- CVE-2019-25731MEDIUMStored XSS in Zuz Music 2.1 Contact Form
- CVE-2019-25737MEDIUMStored XSS in Live Chat Unlimited 2.8.3 – Admin Session Compromise
- CVE-2019-25739MEDIUMGigToDo 1.3 Stored XSS Vulnerability in Proposal Descriptions
- CVE-2019-25742MEDIUMStored XSS in Zoner Real Estate WordPress Theme 4.1.1 – Admin Account Compromise Risk
- CVE-2019-25743MEDIUMWordPress Soliloquy Lite 2.5.6 Stored XSS Vulnerability
- CVE-2019-25744MEDIUMWordPress Popup Builder 3.49 Stored XSS Vulnerability – Exploit Prevention & Patch Guide