How to fix: WordPress Plugin Version Disclosed via Asset Query String
One or more WordPress plugin asset URLs include a '?ver=X.Y.Z' query string that discloses the exact installed plugin version.
Why it matters
Attackers can match the disclosed plugin and version directly against the WPScan vulnerability database or CVE feeds to find a known exploit, skipping the reconnaissance step entirely.
WordPress appends the plugin's declared version as a cache-busting query string to every enqueued script and stylesheet by default. This is convenient for cache invalidation but also hands an attacker a precise, per-plugin version fingerprint without needing to guess.
How to fix it
- 1Strip or randomize the ?ver= query string on enqueued assets (several 'remove version query strings' plugins/snippets do this).
- 2Keep the plugin itself up to date regardless of whether the version string is hidden.
- 3Consider a WAF rule that strips query strings from static asset requests at the edge.
Code examples
Remove version query strings (functions.php)
function remove_asset_version($src) {
if (strpos($src, 'ver=')) {
$src = remove_query_arg('ver', $src);
}
return $src;
}
add_filter('style_loader_src', 'remove_asset_version', 9999);
add_filter('script_loader_src', 'remove_asset_version', 9999);References
Detected automatically by VulnRadar. The check id is wordpress-plugin-version-disclosed, stable across every scan so you can filter or diff on it.
More content checks
- MediumPotential Open Redirect Parameters
- HighDirectory Listing Appears Enabled
- MediumSensitive File References Detected
- HighPotentially Outdated JavaScript Libraries
- Inforobots.txt Present - Review Manually
- InfoCMS / Technology Fingerprinting
- MediumPotentially Dangerous Inline JavaScript
- LowServer version disclosed in response header
Questions
- How severe is WordPress Plugin Version Disclosed via Asset Query String?
- VulnRadar rates this medium severity in the content category. The severity is fixed per check, not scored per site, so the same finding is the same severity on every scan.
- Does VulnRadar check for this automatically?
- Yes. It runs as part of every scan under the check id wordpress-plugin-version-disclosed, which stays the same between runs so you can filter, diff, or gate CI on it.
- Which standards does WordPress Plugin Version Disclosed via Asset Query String map to?
- It maps to CWE-200. In the OWASP Top 10 it falls under A05:2021.
Missing a check?
The detection set is open. If you know a misconfiguration this does not catch, propose it: the issue template asks for the threat model, how to detect it, the false-positive risk, and a test fixture, which is the same thing a maintainer would have to work out anyway.