The Query Monitor plugin for WordPress has Reflected Cross-Site Scripting via Request URI
Published 19 Mar 2026 · Updated 19 Mar 2026
Is your project on an affected johnbillion/query-monitor?
Look after several Laravel or PHP apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie
Affected package
- Affected
- <3.20.4
- Fixed in
- 3.20.4
composer require johnbillion/query-monitor:^3.20.4Details
Impact
The Query Monitor plugin for WordPress is vulnerable to Reflected Cross-Site Scripting via the $_SERVER['REQUEST_URI'] parameter in all versions up to, and including, 3.20.3 due to insufficient output escaping. This makes it possible for unauthenticated attackers to inject arbitrary web scripts in pages that execute if they can successfully trick an Administrator-level user into performing an action such as clicking on a link.
On admin requests, the plugin reads user controlled data from $_SERVER['REQUEST_URI'] and stores it in the request field, then renders request, matched_query, and query_string through format_url(). If the attacker supplied string does not contain &, format_url() returns it without HTML escaping, which allows injected HTML or JavaScript from the request target to be inserted directly into the page inside a <code> element and executed in the victim's browser.
Patches
This issue has been patched in Query Monitor 3.20.4.
Credits
Many thanks to Dmitrii Ignatyev at CleanTalk for responsibly disclosing this vulnerability.
How can I report a security bug?
You can submit a private security vulnerability report to Query Monitor via the Security tab on the GitHub repo. The GitHub Security Advisory process facilitates private collaboration on security issues. You'll receive credit for a valid report and a CVE if necessary.
Is GHSA-2xr4-chcf-vmvf in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected johnbillion/query-monitor, and gives you the command that fixes it.
References
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.