Description
The Document Gallery WordPress plugin through 5.1.1 does not sanitise or escape several gallery shortcode attributes before embedding them in a single-quoted HTML attribute in the rendered gallery markup, allowing users with the Contributor role and above to inject arbitrary event handlers that execute when a higher privileged user views the content.
Published: 2026-10-19
Score: 6.8 Medium
EPSS: < 1% Very Low
KEV: No
Impact: Cross‑Site Scripting via shortcode attributes
Action: Immediate Patch
AI Analysis

Impact

The Document Gallery plugin does not sanitise or escape several shortcode attributes before embedding them in a single‑quoted HTML attribute in the rendered gallery markup. A user with the Contributor role or higher can inject arbitrary event handler code into these attributes. When a higher privileged user views the content, the injected code executes in that user’s browser, allowing the attacker to steal session data, perform credential dumping, deface the page or execute other browser‑side attacks. The vulnerability is purely client‑side and does not give the attacker server‑side code execution.

Affected Systems

WordPress sites running Document Gallery versions 4.0 through 5.1.1 are affected. The vulnerability is relevant only if Contributors or users with equal or greater privileges are allowed to insert or edit gallery shortcodes.

Risk and Exploitability

With a CVSS score of 6.8 the vulnerability is moderate to high in severity. No EPSS score is available, and it is not listed in the CISA KEV catalog. Exploitation requires an authenticated user with at least Contributor privileges to append a malicious payload to a gallery shortcode, and a separate user with higher privileges to view the gallery containing the payload. Because of the dual‑step nature of the attack the likelihood of real‑world exploitation is lower than a purely unauthenticated flaw, but the impact for the victim user is significant. The attack vector is through the web interface and relies on the WordPress role‑based access controls.

Generated by OpenCVE AI on October 19, 2026 at 08:24 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Document Gallery to the latest version that sanitises shortcode attributes
  • Restrict Contributors (or equivalent roles) from editing or adding gallery shortcodes, or remove the shortcode from their editing capabilities
  • Deploy a Content Security Policy that blocks inline event handlers and limits script sources to trusted domains

Generated by OpenCVE AI on October 19, 2026 at 08:24 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Mon, 19 Oct 2026 16:45:00 +0000

Type Values Removed Values Added
First Time appeared Wordpress-extensions
Wordpress-extensions document Gallery
Vendors & Products Wordpress-extensions
Wordpress-extensions document Gallery

Mon, 19 Oct 2026 10:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Mon, 19 Oct 2026 08:45:00 +0000

Type Values Removed Values Added
Weaknesses CWE-79

Mon, 19 Oct 2026 07:00:00 +0000

Type Values Removed Values Added
Description The Document Gallery WordPress plugin through 5.1.1 does not sanitise or escape several gallery shortcode attributes before embedding them in a single-quoted HTML attribute in the rendered gallery markup, allowing users with the Contributor role and above to inject arbitrary event handlers that execute when a higher privileged user views the content.
Title Document Gallery 4.0 - 5.1.1 - Contributor+ Stored XSS via Gallery Shortcode Attributes
References
Metrics cvssV3_1

{'score': 6.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:H'}


Subscriptions

Wordpress-extensions Document Gallery
cve-icon MITRE

Status: PUBLISHED

Assigner: WPScan

Published:

Updated: 2026-10-19T09:31:21.665Z

Reserved: 2026-08-17T11:27:41.298Z

Link: CVE-2026-74921

cve-icon Vulnrichment

Updated: 2026-10-19T09:25:26.178Z

cve-icon NVD

Status : Received

Published: 2026-10-19T07:16:31.613

Modified: 2026-10-19T10:16:48.757

Link: CVE-2026-74921

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-19T16:30:13Z

Weaknesses
  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')