Vulnerability · Published Feb 27, 2026 · Assigned by GitHub_M
CVE-2026-28338PMD Designer has Stored XSS in VBHTMLRenderer and YAHTMLRenderer via unescaped violation messages
Medium 6.8
In plain English
A medium-severity cross-site scripting in pmd from pmd. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 28% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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 packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Maven | net.sourceforge.pmd:pmd-core | 7.22.0 | GHSA-8rr6-2qw5-pc7r |
Affected products (as reported)
Weakness: CWE-79 · Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N
References
- https://github.com/pmd/pmd/security/advisories/GHSA-8rr6-2qw5-pc7r x_refsource_CONFIRM
- https://github.com/pmd/pmd/pull/6475 x_refsource_MISC
- https://github.com/pmd/pmd/commit/c140c0e1de5853a08efb84c9f91dfeb015882442 x_refsource_MISC