Skip to main content
Vulnerability Database/CVE-2026-74920

CVE-2026-74920: Document Gallery WordPress Plugin XSS

CVE-2026-74920 is a reflected cross-site scripting flaw in the Document Gallery WordPress plugin that affects unauthenticated users and administrators. This post explains its technical details, affected versions, and mitigation steps.

Published:

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-2026-74920 Overview

CVE-2026-74920 is a Reflected Cross-Site Scripting (XSS) vulnerability in the Document Gallery WordPress plugin through version 5.1.1. The plugin fails to sanitize and escape user input before reflecting it inside an HTML attribute in the response of an unauthenticated AJAX action. An attacker can craft a malicious URL that executes arbitrary JavaScript in the browser of any visitor who follows the link, including authenticated administrators. The flaw is tracked under CWE-79.

Critical Impact

Successful exploitation enables script execution in an administrator's session, which attackers can use to hijack accounts, modify site content, or install malicious plugins.

Affected Products

  • Document Gallery WordPress plugin, all versions through 5.1.1
  • WordPress sites exposing the plugin's unauthenticated AJAX endpoint
  • Administrator browser sessions interacting with crafted URLs

Discovery Timeline

  • 2026-10-15 - CVE-2026-74920 published to the National Vulnerability Database
  • 2026-10-15 - Last updated in NVD database

Technical Details for CVE-2026-74920

Vulnerability Analysis

The Document Gallery plugin exposes an AJAX action that accepts user-supplied input without authentication. The handler reflects attacker-controlled values into an HTML attribute within the response body. Because the plugin omits context-aware escaping, an attacker can break out of the attribute and inject arbitrary JavaScript. The vulnerability requires user interaction, typically clicking a crafted link, and the attack originates over the network.

The impact extends beyond the targeted visitor. When an administrator triggers the payload, the attacker inherits that session's privileges within the browser context. This enables actions such as creating rogue administrator accounts, modifying plugin or theme files, and exfiltrating sensitive site data. The scope change in the CVSS vector reflects the ability to affect resources beyond the vulnerable component.

Root Cause

The root cause is missing output encoding on untrusted input reflected inside an HTML attribute. The AJAX handler accepts request parameters and inserts them into the response without applying functions such as esc_attr(), which WordPress provides for attribute-context escaping. Combined with the endpoint being reachable without authentication, any unauthenticated actor can supply the payload.

Attack Vector

An attacker constructs a URL pointing at the vulnerable AJAX action with a payload that terminates the surrounding HTML attribute and injects a JavaScript event handler or <script> fragment. The attacker delivers the link through phishing, forum posts, or social media. When a logged-in administrator opens the link, the browser executes the injected code under the WordPress origin. Technical details are available in the WPScan Vulnerability Report.

// No verified exploit code is published. The vulnerability class involves
// attribute-context reflection of unsanitized AJAX input, allowing an attacker
// to break out of an HTML attribute and inject JavaScript executed in the
// victim's browser session.

Detection Methods for CVE-2026-74920

Indicators of Compromise

  • Requests to admin-ajax.php referencing the Document Gallery action with suspicious characters such as ", ', <, >, or on event handler fragments in query parameters
  • Referrer headers pointing to external domains preceding administrative actions such as user creation or plugin installation
  • New administrator accounts, modified theme files, or unexpected scheduled tasks created shortly after an administrator visits an external link

Detection Strategies

  • Review web server access logs for admin-ajax.php requests containing encoded script payloads or attribute-breaking characters
  • Deploy a web application firewall rule that inspects AJAX parameters for XSS signatures and blocks requests targeting the Document Gallery action
  • Correlate browser-based script execution anomalies with subsequent privileged WordPress operations in the same session

Monitoring Recommendations

  • Enable WordPress audit logging to capture administrator actions and track their origin
  • Monitor for changes to wp_users, plugin files, and the active theme directory
  • Alert on outbound requests from the WordPress host to unfamiliar domains that may indicate data exfiltration triggered by injected scripts

How to Mitigate CVE-2026-74920

Immediate Actions Required

  • Deactivate the Document Gallery plugin on all sites running version 5.1.1 or earlier until a patched release is confirmed installed
  • Rotate administrator passwords and invalidate active sessions if administrators recently followed untrusted links
  • Apply a web application firewall ruleset that blocks reflected XSS payloads targeting WordPress AJAX endpoints

Patch Information

At the time of publication, the enriched data lists no vendor patch URL. Administrators should consult the WPScan Vulnerability Report and the plugin's changelog in the WordPress plugin directory for an updated version beyond 5.1.1 that addresses the sanitization defect.

Workarounds

  • Restrict access to admin-ajax.php for unauthenticated users where feasible, or filter the vulnerable action at the reverse proxy
  • Enforce a strict Content Security Policy that disallows inline scripts and limits script sources to trusted origins
  • Require administrators to use isolated browser profiles for WordPress administration to reduce exposure to malicious links
bash
# Example WAF rule concept: block AJAX requests containing attribute-breaking
# characters in parameters consumed by the Document Gallery action
SecRule REQUEST_URI "@contains /wp-admin/admin-ajax.php" \
  "chain,deny,status:403,id:1074920,msg:'Possible XSS targeting Document Gallery AJAX'"
SecRule ARGS "@rx (?i)(<script|onerror=|onload=|\"\s*on[a-z]+=)" "t:urlDecodeUni"

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

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.