{
 "id": "WPSEC-2026-1958",
 "url": "https://wpsec.com/vuln/WPSEC-2026-1958/",
 "json_url": "https://wpsec.com/vuln/WPSEC-2026-1958/advisory.json",
 "markdown_url": "https://wpsec.com/vuln/WPSEC-2026-1958/index.md",
 "title": "Document Gallery <= 5.1.1 - Reflected Cross-Site Scripting via 'mime_types' Parameter",
 "description": "The Document Gallery plugin for WordPress is vulnerable to Reflected Cross-Site Scripting via the 'mime_types' value of the dg_generate_gallery AJAX action in all versions up to, and including, 5.1.1, due to the value not being sanitized and the gallery data being printed into a single-quoted HTML attribute without escaping in an HTML response. This makes it possible for unauthenticated attackers to inject arbitrary web scripts in pages that execute if they can successfully trick a user into performing an action such as clicking on a link.",
 "plugin": {
  "slug": "document-gallery",
  "name": "Document Gallery",
  "full_name": "Document Gallery",
  "wordpress_org": "https://wordpress.org/plugins/document-gallery/",
  "advisories_url": "https://wpsec.com/vuln/plugin/document-gallery/",
  "attacksurface": "https://attacksurface.wpsec.com/plugin/document-gallery"
 },
 "type": "XSS",
 "cwe": [
  "CWE-79"
 ],
 "cve": [],
 "cvss": {
  "version": "3.1",
  "score": 6.1,
  "vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N",
  "severity": "Medium"
 },
 "affected": {
  "ranges": [
   {
    "from": null,
    "from_inclusive": true,
    "to": "5.1.2",
    "to_inclusive": false
   }
  ],
  "text": [
   "all versions before 5.1.2"
  ]
 },
 "introduced_in": null,
 "fixed_in": "5.1.2",
 "remediation": "Update to 5.1.2 or later.",
 "fix_released": "2026-10-28T14:44:08+00:00",
 "published": "2026-10-29T18:50:39+00:00",
 "updated": "2026-10-29T17:47:37.008172+00:00",
 "also_published_as": null,
 "references": [
  "https://wpsec.com/vuln/WPSEC-2026-1958/",
  "https://plugins.svn.wordpress.org/document-gallery/tags/5.1.2/",
  "https://wordpress.org/plugins/document-gallery/"
 ],
 "attacksurface_url": "https://attacksurface.wpsec.com/plugin/document-gallery",
 "source": "WPSec",
 "license": {
  "name": "CC BY 4.0",
  "url": "https://creativecommons.org/licenses/by/4.0/"
 },
 "usage": {
  "plugin": "Medium",
  "affected_versions": "Medium",
  "as_of": "2026-10-29"
 }
}