CVE-2026-74921 Document Gallery 4.0 - 5.1.1 - Contributor+ Stored XSS via Gallery Shortcode Attributes
Contributors can inject malicious scripts via gallery shortcode attributes, leading to code execution when viewed by higher-privileged users.
- Exploited in the wild
- Not known
- Login needed
- An administrator
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- None listed
What is CVE-2026-74921?
CVE-2026-74921 is a medium-severity cross-site scripting vulnerability in Unknown Document Gallery, published on 19 Oct 2026. An attacker needs administrator access to exploit it, and only if a user opens a file or follows a link.
Official 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.
Weakness: CWE-79
Which versions are affected by CVE-2026-74921?
How do I fix CVE-2026-74921?
No fix has been published for CVE-2026-74921 yet. Limit exposure of the affected software until one is available.
Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.
Is CVE-2026-74921 being exploited?
There is no known exploitation of CVE-2026-74921 in the wild and no public exploit code.
Sources
Also known as GHSA-5xmq-vg89-7x44.