CVE-2026-12982

Document Gallery < 5.1.1 - Reflected XSS via dg_generate_gallery

Published Jul 27, 2026 CVSS 3.1 · 6.1 Medium EPSS < 1% KEV · Not listed
Description
The Document Gallery WordPress plugin before 5.1.1 does not properly sanitise and escape user input before reflecting it back in the response of an unauthenticated AJAX action, leading to a Reflected Cross-Site Scripting vulnerability which can be exploited against unauthenticated users.

Analysis

AI-generated

Technical impact

The vulnerability arises from the Document Gallery WordPress plugin failing to sanitize and escape user input before echoing it in the response of the unauthenticated AJAX action dg_generate_gallery. As a result, attackers can inject malicious scripts that are executed in the browser of any visitor, leading to classic reflected Cross‑Site Scripting. This can enable session hijacking, cookie theft, defacement, or execution of further malicious payloads on the client side.

Affected Systems

The affected component is the Document Gallery WordPress plugin. Versions older than 5.1.1 are vulnerable. Any WordPress site that has the plugin installed and has enabled the dg_generate_gallery AJAX endpoint is at risk.

Risk and Exploitability

The CVSS score of 6.1 indicates a medium severity. The EPSS score of 0.00162 indicates a very low likelihood of exploitation, and the vulnerability is not listed in the CISA KEV catalog. The attack vector is remote, unauthenticated, and relies on crafting a malicious request to the AJAX endpoint, which then reflects unsanitized data back to the client. Attackers can target any user who visits the affected site without needing credentials.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Document Gallery to version 5.1.1 or later.
  • If upgrading is not feasible, remove or disable the dg_generate_gallery AJAX action, for example by deleting the plugin or blocking the endpoint via .htaccess or server configuration.
  • Implement additional XSS protection such as a Content Security Policy, input validation, or a WordPress security plugin that filters and sanitizes output to help mitigate similar issues.

Generated by OpenCVE AI on August 3, 2026 at 18:06 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
First Time appeared Dan Rossiter
Dan Rossiter document Gallery
Wordpress
Wordpress wordpress
Vendors & Products Dan Rossiter
Dan Rossiter document Gallery
Wordpress
Wordpress wordpress
Type Values Removed Values Added
Weaknesses CWE-79
Metrics cvssV3_1

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

ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description The Document Gallery WordPress plugin before 5.1.1 does not properly sanitise and escape user input before reflecting it back in the response of an unauthenticated AJAX action, leading to a Reflected Cross-Site Scripting vulnerability which can be exploited against unauthenticated users.
Title Document Gallery < 5.1.1 - Reflected XSS via dg_generate_gallery
References
Weaknesses
  • CWE-79

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

Sources

Status
PUBLISHED
Assigner
WPScan
Published
Updated
Jul 27, 2026, 2:12 PM
Reserved
Jun 23, 2026, 11:36 AM
Status
Deferred
Published
Jul 27, 2026, 7:16 AM
Modified
Jul 27, 2026, 8:33 PM