What’s Vulnerable › Vulnerabilities
CVE-2026-28338: PMD Designer has Stored XSS in VBHTMLRenderer and YAHTMLRenderer via unescaped violation messages
- Severity: medium (CVSS 6.1 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.3% probability of exploitation in the next 30 days
- Public exploit or detection template: yes
- Published: 2026-02-27 · updated 2026-06-17
- Weakness: CWE-79
Description
PMD is an extensible multilanguage static code analyzer. Prior to version 7.22.0, PMD's `vbhtml` and `yahtml` report formats insert rule violation messages into HTML output without escaping. When PMD analyzes untrusted source code containing crafted string literals, the generated HTML report contains executable JavaScript that runs when opened in a browser. Practical impact is limited because `vbhtml` and `yahtml` are legacy formats rarely used in practice. The default `html` format is properly escaped and not affected. Version 7.22.0 contains a fix for the issue.
Affected products
- pmd: before 7.22.0 — fixed in 7.22.0
How to fix
Upgrade to a fixed version: pmd 7.22.0. Check the vendor advisory for mitigations.
References
- https://github.com/pmd/pmd/commit/c140c0e1de5853a08efb84c9f91dfeb015882442
- https://github.com/pmd/pmd/pull/6475
- https://github.com/pmd/pmd/security/advisories/GHSA-8rr6-2qw5-pc7r
Get alerted when CVE-2026-28338 or the next vulnerability affects your stack