Advisory Database
  • Advisories
  • Dependency Scanning
  1. maven
  2. ›
  3. net.sourceforge.pmd/pmd-core
  4. ›
  5. CVE-2026-28338

CVE-2026-28338: PMD Designer has Stored XSS in VBHTMLRenderer and YAHTMLRenderer via unescaped violation messages

February 28, 2026

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.

While the default html format is not affected via rule violation messages (it correctly uses StringEscapeUtils.escapeHtml4()), it has a similar problem when rendering suppressed violations. The user supplied message (the reason for the suppression) was not escaped.

References

  • github.com/advisories/GHSA-8rr6-2qw5-pc7r
  • github.com/pmd/pmd
  • github.com/pmd/pmd/commit/c140c0e1de5853a08efb84c9f91dfeb015882442
  • github.com/pmd/pmd/pull/6475
  • github.com/pmd/pmd/security/advisories/GHSA-8rr6-2qw5-pc7r
  • nvd.nist.gov/vuln/detail/CVE-2026-28338

Code Behaviors & Features

Detect and mitigate CVE-2026-28338 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 7.22.0

Fixed versions

  • 7.22.0

Solution

Upgrade to version 7.22.0 or above.

Impact 6.8 MEDIUM

CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N

Learn more about CVSS

Weakness

  • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Source file

maven/net.sourceforge.pmd/pmd-core/CVE-2026-28338.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 28 Feb 2026 12:17:17 +0000.