Commons BCEL is the Byte Code Engineering Library, and Class2HTML is its utility that turns a class file into a set of HTML pages for reading. In October, CVE-2026-105111 showed that those pages carried strings from the class file unescaped, and 6.13.0 fixed it; the Apache record for this CVE says the fix “is caused by an incomplete fix” because CodeHTML still “writes attacker-controlled unknown method attribute names into the generated HTML without escaping (stored XSS in reports)”. The record is precise about scope: “This only happens when you’re using Class2HTML to generate webpages for possibly-attacker-controlled class files.” Apache rates it Low, 4.7 under CVSS 3.1 and 2.3 under 4.0. If anything on your hosts runs Class2HTML over class files it did not build, upgrade to Commons BCEL 6.14.1; everything else that uses BCEL is not affected by this one.
CVE-2026-138277 at a glance.
| Component | Apache Commons BCEL (org.apache.bcel:bcel): CodeHTML.writeMethod() in src/main/java/org/apache/bcel/util/CodeHTML.java, the part of Class2HTML that lists a method’s attributes in <ClassName>_code.html |
| Affected versions | Commons BCEL before 6.14.1, per the record (Maven range 0 to before 6.14.1; git range from 96ac0670 to before the fix commit). 6.13.0, which closed CVE-2026-105111, and 6.14.0 of 7 November 2026 are in range |
| Fixed in | Commons BCEL 6.14.1, per the record, by commit 713989aa “Escape unknown method attribute names in Class2HTML code reports”. The Commons changes page still ended at 6.14.0 on 1 December, so the 6.14.1 release date is not given here. SUSE marks its bcel package released for SLES 15 SP7; no other distribution had triaged it |
| Severity | Apache (CNA): Low; CVSS 3.1 4.7 Medium (AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N), CVSS 4.0 2.3 Low; SUSE Moderate; CWE-79 (cross-site scripting). NVD Received with the CNA scores; the CISA ADP recorded SSVC only (exploitation none, not automatable) |
| Exploited in the wild | Not on the CISA KEV catalogue (2026.11.30). EPSS 0.00374 (33rd percentile) on 1 December 2026 |
| Who is exposed | Only pipelines that run Class2HTML over class files from outside, such as a code-review or analysis service that renders uploaded or third-party jars, and then serves the reports to a browser. Applications that use BCEL to read or generate bytecode without producing HTML are not affected, which is nearly all of them |
| Published | CVE record 30 November 2026 (Apache CNA; SSVC added 1 December); this page built 1 December 2026, last updated 1 December 2026 |
What it is
A class file’s methods carry attributes, and the format allows attributes the reader does not recognise; BCEL keeps those as Unknown objects whose name comes from the class file’s constant pool. CodeHTML.writeMethod() listed each attribute of a method in the code page, and for an unknown one it concatenated the object straight into the markup, "<LI>" + attributes[i] + "</LI>", so that the attribute’s name, which the class file’s author chose, became part of the page. The fix commit’s message says it plainly: “an attacker-controlled CONSTANT_Utf8 attribute name was emitted as active HTML”. The 6.13.0 fix for CVE-2026-105111 had added the escaping helper and used it for the strings it knew about; this site was missed.
The change is one line, routing the name through the shared Class2HTML.toHTML() helper, plus a regression test, Class2HTMLXSSTest, that builds a method with an unknown attribute named with <, >, & and both quote characters and checks that the escaped form appears in the output. The vector’s UI:R and S:C say how it is used: someone has to open the generated report in a browser, and the script then runs in the context of whatever site serves the reports, which is the scope change. The CNA’s Low and the 4.0 score of 2.3 reflect that Class2HTML is a developer’s reading tool rather than a service.
The reporter is hataehoon and the fix is by Gary D. Gregory; the lists.apache.org announcement renders only as a JavaScript shell to automated readers, so the facts here are from the CVE record, the fix commit on GitHub (read on the third attempt), the record for CVE-2026-105111, the Commons changes page, NVD, EPSS and the Debian and SUSE trackers. Red Hat has no record for it, Ubuntu’s page returned a client error and Debian’s tracker had not yet triaged it against its bcel package on 1 December.
Who is affected on Linux
Each row is what the distribution’s own security tracker said on 1 December 2026; the link in the row is the tracker page, which will be newer than this one. Distributions package BCEL as a library for other Java packages; the vulnerable path is the Class2HTML tool, which few of them call.
| Distribution | Status | Fixed package |
|---|---|---|
| Alpine | Not consulted on 1 December 2026; nothing inferred | — |
| Debian | Tracker page exists with no package rows and the note “check”: not yet triaged against bcel on 1 December 2026; nothing inferred | — |
| Ubuntu | Tracker unreachable on 1 December 2026 (client error on two attempts, consistent with no page yet); nothing inferred | — |
| RHEL, Rocky, Alma, CentOS Stream | Red Hat has no record for this CVE on 1 December 2026 (hydra JSON empty, page client error); nothing inferred | — |
| SUSE · Fedora · Arch | SUSE Moderate, state Pending, bug 1284399; bcel released for SLED and SLES 15 SP7, the Basesystem module and SLES for SAP 15 SP7 (no version shown); affected on SLES 16.0 and 16.1, Leap 16.0 and 16.1, SLE HPC 12 and the LTSS lines; container images for SUSE Manager in progress. Fedora and Arch not consulted | SLES 15 SP7 released, version not shown on the page |
| Upstream Commons BCEL (Maven Central), applications that bundle it | The upstream fix applies | Commons BCEL 6.14.1 |
How to check
Three questions, in order: which BCEL jars are on the host, bundled or packaged; whether anything runs Class2HTML or calls org.apache.bcel.util.Class2HTML; and whether the class files it reads come from outside. Only the third question makes this a vulnerability rather than a version note.
# 1. every BCEL jar, with its version (6.14.1 or later is fixed)
find / -xdev -name 'bcel*.jar' 2>/dev/null
find / -xdev -name '*.jar' -exec sh -c 'unzip -p "$1" META-INF/maven/org.apache.bcel/bcel/pom.properties 2>/dev/null | grep -q version && echo "$1"' _ {} \; 2>/dev/null
dpkg -l libbcel-java 2>/dev/null | awk '/^ii/ {print $2, $3}'; rpm -q bcel 2>/dev/null
# 2. does anything invoke Class2HTML?
grep -rl 'org.apache.bcel.util.Class2HTML' /opt /srv /usr/local /etc 2>/dev/null | head
grep -rn 'Class2HTML' /etc/cron* /etc/systemd/system /var/lib/jenkins/jobs 2>/dev/null | head
# 3. where the reports go: a web root that serves *_code.html is the exposure
find / -xdev -name '*_code.html' -path '*html*' 2>/dev/null | headA host whose BCEL jars are all 6.14.1 or later is done. One with an older jar and nothing in step 2 uses BCEL as a library only, which this CVE does not touch; keep the version note for the next upgrade. A match in step 2 on an older jar, with reports from step 3 served to browsers, is the record’s case, and any report already generated from an outside class file should be regenerated with the fixed library or taken down.
How to fix it
Update the dependency and rebuild, or replace the jar, and restart whatever runs the tool; distribution packages were released on SUSE only on 1 December.
# Maven
# <dependency><groupId>org.apache.bcel</groupId><artifactId>bcel</artifactId><version>6.14.1</version></dependency>
# Gradle
# implementation 'org.apache.bcel:bcel:6.14.1'
# SUSE
sudo zypper patch
# a bundled jar: replace it and restart the application
ls -la /opt/*/lib/bcel*.jar 2>/dev/nullThere is no configuration switch; the escaping happens in the library. The interim control is the obvious one: do not run Class2HTML over class files you did not build, or do not serve its output from a site that holds anything of value. What not to do: do not treat 6.13.0 or 6.14.0 as fixed because they closed the October CVE, since the record says this is its incomplete fix; and do not consider the matter closed by upgrading if reports generated by the old version are still being served, since the script is in the files, not the library.
Sources
- CVE-2026-138277 at CVE.org — the Apache CNA record (30 November 2026): the Class2HTML scope sentence, the incomplete-fix reference to CVE-2026-105111, before 6.14.1, CVSS 3.1 4.7 and CVSS 4.0 2.3, CWE-79, the credits to hataehoon and Gary D. Gregory
- Commit 713989aa — “Escape unknown method attribute names in Class2HTML code reports”: the one-line change in
CodeHTML.javatoClass2HTML.toHTML(String.valueOf(attributes[i])), theClass2HTMLXSSTestregression test, the changes.xml entry - CVE-2026-105111 — the October issue: “Class2HTML emits unescaped class strings, enabling stored XSS”, fixed in 6.13.0 by commit
fb72c225 - Commons BCEL changes — the page ended at 6.14.0 (7 November 2026) on 1 December; the 6.13.0 entries for the October hardening of Class2HTML
- Announcement on the Apache lists — the record’s advisory reference; served as a JavaScript shell to automated readers on 1 December, not read
- NVD entry — Received; published 30 November; the CNA’s two scores; CWE-79; no CPEs
- Distribution trackers: SUSE (Moderate; SLES 15 SP7 released; bug 1284399) · Debian (not yet triaged) · Ubuntu (client error) · Red Hat (no record) on 1 December 2026
- CISA KEV catalogue 2026.11.30, not listed · EPSS 0.00374 (percentile 0.334) on 1 December 2026
Related reading
- CVE-2026-133643: Apache Struts doubleselect script XSS — another Apache project writing input into markup unescaped
- CVE-2026-133639: Apache Struts javatemplates attribute XSS — an attribute name, the same shape
- CVE-2026-129292: PHP-FPM status page XSS — a developer-facing page that trusted its own input
- CVE-2026-74762: Apache Shiro RememberMe session fixation — the same week’s Apache set
- CVE-2026-141382: Exim incomplete fix — another fix that missed a site (forthcoming)
- Security advisories — every Linux-relevant CVE we track, newest first, with the component index
This advisory page was assembled from the primary sources listed above on 1 December 2026 and is updated when they change. The facts are theirs; the checks and the ordering are ours. If a row in the distribution table is out of date, the tracker link in that row is the current word.
