Vulnerabilities / Document Gallery / WPSEC-2026-1956
Document Gallery <= 5.1.1 - Authenticated (Contributor+) Stored Cross-Site Scripting via 'mime_types' Shortcode Attribute
Medium 6.4
CWE-79Fixed in 5.1.2
- ID
- WPSEC-2026-1956
- Plugin
- Document Gallery (document-gallery)
- Affected
- all versions before 5.1.2
- Remediation
- Update to 5.1.2 or later.
- CVSS 3.1
- CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N
- Weakness
- CWE-79
- Usage
- Plugin Medium · Affected versions Medium among sites WPSec scans, 2026-10-29
- Attack surface
- Document Gallery on WPSec AttackSurface
- Fix released
- Published
Description
The Document Gallery plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the 'mime_types' attribute of the dg shortcode in all versions up to, and including, 5.1.1, due to the attribute not being sanitized and the shortcode data being printed into a single-quoted HTML attribute without escaping. This makes it possible for authenticated attackers with contributor-level access and above to inject arbitrary web scripts in pages that will execute whenever a user accesses an injected page.
References
- https://wpsec.com/vuln/WPSEC-2026-1956/
- https://plugins.svn.wordpress.org/document-gallery/tags/5.1.2/
- https://wordpress.org/plugins/document-gallery/
Published by WPSec. Provided as is, without warranty. Corrections: contact us.
This advisory as JSON or Markdown · All advisories: JSON, RSS