CVE-2026-28338 Details
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.
A stored cross-site scripting vulnerability has been identified in PMD's VBHTML and YAHTML report formats, prior to version 7.22.0. These formats insert rule violation messages into the HTML output without proper escaping. When PMD analyzes untrusted source code with crafted string literals, the resulting HTML report can contain executable JavaScript that runs in the browser. This issue arises because the VBHTML and YAHTML renderers append violation descriptions directly into the HTML, leaving them vulnerable to injection. Although the default HTML format is not affected, it does have a similar problem with suppressed violation messages, which can also lead to unescaped content being rendered.
Users are advised to upgrade to PMD version 7.22.0 or later, where this vulnerability has been fixed.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Mar 3, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/pmd/pmd/commit/c140c0e1de5853a08efb84c9f91dfeb015882442 | [email protected] | Patch |
| https://github.com/pmd/pmd/pull/6475 | [email protected] | Issue TrackingPatch |
| https://github.com/pmd/pmd/security/advisories/GHSA-8rr6-2qw5-pc7r | [email protected] | ExploitPatchVendor Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| pmd project pmd | < 7.22.0 |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Mar 3, 2026 | Initial Analysis | [email protected] |
| Feb 27, 2026 | New CVE Received | [email protected] |