---
id: CVE-2026-74921
title: >-
  Document Gallery 4.0 - 5.1.1 - Contributor+ Stored XSS via Gallery Shortcode
  Attributes
summary: >-
  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 Contribu…
severity: medium
cvss: 6.8
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:H'
cvssSource: cna
cwe:
  - CWE-79
product: Document Gallery
affected:
  - document_gallery >= 4.0 <= 5.1.1
ssvc:
  exploitation: none
  automatable: 'no'
  technicalImpact: total
  timestamp: '2026-10-19T09:26:19.262940Z'
published: '2026-10-19'
updated: '2026-10-19'
sourceUpdated: '2026-10-19T09:31:21.665Z'
source: CVEORG
sourceUrl: 'https://www.cve.org/CVERecord?id=CVE-2026-74921'
references:
  - url: 'https://wpscan.com/vulnerability/b0b97661-c671-420c-8fca-22666862b379/'
tags:
  - cve.org
ingestedAt: '2026-10-19T07:09:59.591Z'
---

## Overview

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.

## Affected

- `document_gallery >= 4.0 <= 5.1.1`

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
