Pmd
CVE-2026-28338
MEDIUM
Severity by source
AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N
Primary rating from GitHub Advisory · only source for this CVE.
CVSS VectorGitHub Advisory
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N
Lifecycle Timeline
4Blast Radius
ecosystem impact- 49 maven packages depend on net.sourceforge.pmd:pmd-core (42 direct, 7 indirect)
Ecosystem-wide dependent count for version 7.22.0.
DescriptionGitHub Advisory
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.
AnalysisAI
Cross-site scripting (XSS) in PMD's legacy vbhtml and yahtml report formats allows arbitrary JavaScript execution when HTML reports are opened in a browser, triggered by analyzing malicious source code containing crafted string literals. Public exploit code exists for this vulnerability affecting PMD versions prior to 7.22.0. The impact is limited since these legacy formats are rarely used and the default html format is properly escaped.
Technical ContextAI
Classified as CWE-79 (Cross-site Scripting (XSS)). Affects Pmd. 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
RemediationAI
A vendor patch is available — apply it immediately. Implement output encoding and Content Security Policy headers. Restrict network access to the affected service where possible.
PMD 5.8.1 and earlier processes XML external entities in ruleset files it parses as part of the analysis process, allowi
Jenkins PMD Plugin 3.49 and earlier processes XML external entities in files it parses as part of the build process, all
Same weakness CWE-79 – Cross-site Scripting (XSS)
View allShare
External POC / Exploit Code
Leaving vuln.today
GHSA-8rr6-2qw5-pc7r