CVE-2026-138277: Apache Commons BCEL: Class2HTML emits unescaped unknown method attribute names in code reports
Improper neutralization of input during web page generation ('cross-site scripting') vulnerability in Apache Commons BCEL.
This only happens when you're using Class2HTML to generate webpages for possibly-attacker-controlled class files, where CodeHTML writes attacker-controlled unknown method attribute names into the generated HTML without escaping (stored XSS in reports). This issue is caused by an incomplete fix for CVE-2026-105111 https://www.cve.org/CVERecord .
This issue affects Apache Commons BCEL: before 6.14.1.
Users are recommended to upgrade to version 6.14.1, which fixes the issue.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 6.14.1
Event History
Frequently Asked Questions
Who is exposed to this vulnerability?
Organizations using Apache Commons BCEL before 6.14.1 are exposed only if they use Class2HTML to generate web pages from class files that may be attacker-controlled. The affected output is a generated code report, where an unknown method attribute name can be stored without HTML escaping.
What must an attacker do to exploit it?
An attacker needs to supply or influence a class file processed by Class2HTML and craft an unknown method attribute name. A user must then view the generated HTML report for the stored script to execute.
Are typical BCEL deployments affected by default?
The issue is not described as affecting BCEL generally or merely parsing class files. It requires the specific Class2HTML report-generation workflow and potentially attacker-controlled class-file input.
What should be done if affected?
Upgrade Apache Commons BCEL to version 6.14.1. If an immediate upgrade is not possible, avoid generating Class2HTML pages from untrusted class files and do not serve previously generated reports as active HTML to users.