Every CVE Search/ Get API key

CVE-2022-42920

Apache Commons BCEL prior to 6.6.0 allows producing arbitrary bytecode via out-of-bounds writing

9.8 CriticalFix available

Apache Commons BCEL has a number of APIs that would normally only allow changing specific class characteristics. However, due to an out-of-bounds writing issue, these APIs can be used to produce arbitrary bytecode. This could be abused in applications that pass attacker-controllable data to those APIs, giving the attacker more control over the resulting bytecode than otherwise expected. Update to Apache Commons BCEL 6.6.0.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
High
Integrity
High
Availability
High

Exploit likelihood

3.50%Up 2.6 points since Nov 8, 2022
90%50%10%1%

What each source reports

NVD Score used 9.8

Apache Commons BCEL has a number of APIs that would normally only allow changing specific class characteristics. However, due to an out-of-bounds writing issue, these APIs can be used to produce arbitrary bytecode. This could be abused in applications that pass attacker-controllable data to those APIs, giving the attacker more control over the resulting bytecode than otherwise expected. Update to Apache Commons BCEL 6.6.0.

Record
CVE-2022-42920
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-787
Updated
2026-11-02
CVE List No score

Apache Commons BCEL prior to 6.6.0 allows producing arbitrary bytecode via out-of-bounds writing

Apache Commons BCEL has a number of APIs that would normally only allow changing specific class characteristics. However, due to an out-of-bounds writing issue, these APIs can be used to produce arbitrary bytecode. This could be abused in applications that pass attacker-controllable data to those APIs, giving the attacker more control over the resulting bytecode than otherwise expected. Update to Apache Commons BCEL 6.6.0.

Record
CVE-2022-42920
Weakness
CWE-787
Updated
2026-11-02
EUVDEUVD-2022-7295 No score

Apache Commons BCEL has a number of APIs that would normally only allow changing specific class characteristics. However, due to an out-of-bounds writing issue, these APIs can be used to produce arbitrary bytecode. This could be abused in applications that pass attacker-controllable data to those APIs, giving the attacker more control over the resulting bytecode than otherwise expected. Update to Apache Commons BCEL 6.6.0.

Record
EUVD-2022-7295
Updated
2026-11-03
GitHub AdvisoriesGHSA-97xg-phpr-rg8q 9.8

Apache Commons BCEL vulnerable to out-of-bounds write

Apache Commons BCEL has a number of APIs that would normally only allow changing specific class characteristics. However, due to an out-of-bounds writing issue, these APIs can be used to produce arbitrary bytecode. This could be abused in applications that pass attacker-controllable data to those APIs, giving the attacker more control over the resulting bytecode than otherwise expected. Update to Apache Commons BCEL 6.6.0.

Record
GHSA-97xg-phpr-rg8q
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-787
Updated
2026-11-02
OSVAZL-109475 9.8

CVE-2022-42920 affecting package bcel 5.2-37

Apache Commons BCEL has a number of APIs that would normally only allow changing specific class characteristics. However, due to an out-of-bounds writing issue, these APIs can be used to produce arbitrary bytecode. This could be abused in applications that pass attacker-controllable data to those APIs, giving the attacker more control over the resulting bytecode than otherwise expected. Update to Apache Commons BCEL 6.6.0.

Record
AZL-109475
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-05
OSVGHSA-97xg-phpr-rg8q 9.8

Apache Commons BCEL vulnerable to out-of-bounds write

Apache Commons BCEL has a number of APIs that would normally only allow changing specific class characteristics. However, due to an out-of-bounds writing issue, these APIs can be used to produce arbitrary bytecode. This could be abused in applications that pass attacker-controllable data to those APIs, giving the attacker more control over the resulting bytecode than otherwise expected. Update to Apache Commons BCEL 6.6.0.

Record
GHSA-97xg-phpr-rg8q
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-787
Updated
2026-11-02
Show 14 moreShow less
OSVRHSA-2022:8958 8.1

Red Hat Security Advisory: bcel security update

Record
RHSA-2022:8958
CVSS 3.1
8.1 HighCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVRHSA-2022:8959 8.1

Red Hat Security Advisory: rh-maven36-bcel security update

Record
RHSA-2022:8959
CVSS 3.1
8.1 HighCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVRHSA-2023:0004 8.1

Red Hat Security Advisory: bcel security update

Record
RHSA-2023:0004
CVSS 3.1
8.1 HighCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVRHSA-2023:0005 8.1

Red Hat Security Advisory: bcel security update

Record
RHSA-2023:0005
CVSS 3.1
8.1 HighCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVRLSA-2023:0005 8.1

Important: bcel security update

The Byte Code Engineering Library (Apache Commons BCEL) is intended to give users a convenient way to analyze, create, and manipulate (binary) Java class files (those ending with .class).

Security Fix(es):

  • Apache-Commons-BCEL: arbitrary bytecode produced via out-of-bounds writing (CVE-2022-42920)

For more details about the security issue(s), including the impact, a CVSS score, acknowledgments, and other related information, refer to the CVE page(s) listed in the References section.

Record
RLSA-2023:0005
CVSS 3.1
8.1 HighCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVUBUNTU-CVE-2022-42920 9.8

Apache Commons BCEL has a number of APIs that would normally only allow changing specific class characteristics. However, due to an out-of-bounds writing issue, these APIs can be used to produce arbitrary bytecode. This could be abused in applications that pass attacker-controllable data to those APIs, giving the attacker more control over the resulting bytecode than otherwise expected. Update to Apache Commons BCEL 6.6.0.

Record
UBUNTU-CVE-2022-42920
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVALSA-2023:0005 No score

Important: bcel security update

The Byte Code Engineering Library (Apache Commons BCEL) is intended to give users a convenient way to analyze, create, and manipulate (binary) Java class files (those ending with .class).

Security Fix(es):

  • Apache-Commons-BCEL: arbitrary bytecode produced via out-of-bounds writing (CVE-2022-42920)

For more details about the security issue(s), including the impact, a CVSS score, acknowledgments, and other related information, refer to the CVE page(s) listed in the References section.

Record
ALSA-2023:0005
Updated
2026-11-02
OSV No score

Apache Commons BCEL prior to 6.6.0 allows producing arbitrary bytecode via out-of-bounds writing

Apache Commons BCEL has a number of APIs that would normally only allow changing specific class characteristics. However, due to an out-of-bounds writing issue, these APIs can be used to produce arbitrary bytecode. This could be abused in applications that pass attacker-controllable data to those APIs, giving the attacker more control over the resulting bytecode than otherwise expected. Update to Apache Commons BCEL 6.6.0.

Record
CVE-2022-42920
Weakness
CWE-787
Updated
2026-11-02
OSVDEBIAN-CVE-2022-42920 No score

Apache Commons BCEL has a number of APIs that would normally only allow changing specific class characteristics. However, due to an out-of-bounds writing issue, these APIs can be used to produce arbitrary bytecode. This could be abused in applications that pass attacker-controllable data to those APIs, giving the attacker more control over the resulting bytecode than otherwise expected. Update to Apache Commons BCEL 6.6.0.

Record
DEBIAN-CVE-2022-42920
Updated
2026-11-03
OSVopenSUSE-SU-2024:12498-1 No score

bcel5_3-5.3-21.1 on GA media

These are all security issues fixed in the bcel5_3-5.3-21.1 package on the GA media of openSUSE Tumbleweed.

Record
openSUSE-SU-2024:12498-1
Updated
2026-11-02
OSVopenSUSE-SU-2024:12530-1 No score

bcel-5.2-37.1 on GA media

These are all security issues fixed in the bcel-5.2-37.1 package on the GA media of openSUSE Tumbleweed.

Record
openSUSE-SU-2024:12530-1
Updated
2026-11-02
OSVSUSE-SU-2022:4306-1 No score

Security update for bcel

This update for bcel fixes the following issues:

  • CVE-2022-42920: Fixed producing arbitrary bytecode via out-of-bounds writing (bsc#1205125).
Record
SUSE-SU-2022:4306-1
Updated
2026-11-02
OSVSUSE-SU-2022:4331-1 No score

Security update for bcel

This update for bcel fixes the following issues:

  • CVE-2022-42920: Fixed producing arbitrary bytecode via out-of-bounds writing (bsc#1205125).
Record
SUSE-SU-2022:4331-1
Updated
2026-11-02
OSVUSN-7208-1 No score

bcel vulnerability

Felix Wilhelm discovered that Apache Commons BCEL APIs incorrectly handled parameters due to a memory issue. An attacker supplying malicious input could exploit this to generate and execute arbitrary bytecode.

Record
USN-7208-1
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
org.apache.bcel:bcel
Maven
before 6.6.0
6.6.0
bcel
AlmaLinux:9
before 6.4.1-9.el9_1
6.4.1-9.el9_1
bcel
Azure Linux:3
through 5.2-37 None known
bcel
Debian:12
before 6.5.0-2
6.5.0-2
bcel
Debian:13
before 6.5.0-2
6.5.0-2
bcel
Debian:14
before 6.5.0-2
6.5.0-2
org.apache.bcel:bcel
Maven
before 6.6.0, plus listed versions
5.26.06.16.26.3
Show 4 moreShow less
6.3.16.4.06.4.16.5.0
6.6.0
bcel
Red Hat:enterprise_linux:7::client
before 0:5.2-19.el7_9
0:5.2-19.el7_9
bcel-javadoc
Red Hat:enterprise_linux:7::client
before 0:5.2-19.el7_9
0:5.2-19.el7_9
bcel
Red Hat:enterprise_linux:7::computenode
before 0:5.2-19.el7_9
0:5.2-19.el7_9
Show 21 moreShow less
Affected packages
PackageAffectedFixed
bcel-javadoc
Red Hat:enterprise_linux:7::computenode
before 0:5.2-19.el7_9
0:5.2-19.el7_9
bcel
Red Hat:enterprise_linux:7::server
before 0:5.2-19.el7_9
0:5.2-19.el7_9
bcel-javadoc
Red Hat:enterprise_linux:7::server
before 0:5.2-19.el7_9
0:5.2-19.el7_9
bcel
Red Hat:enterprise_linux:7::workstation
before 0:5.2-19.el7_9
0:5.2-19.el7_9
bcel-javadoc
Red Hat:enterprise_linux:7::workstation
before 0:5.2-19.el7_9
0:5.2-19.el7_9
rh-maven36-bcel
Red Hat:rhel_software_collections:3::el7
before 0:6.3.1-2.3.el7
0:6.3.1-2.3.el7
rh-maven36-bcel-javadoc
Red Hat:rhel_software_collections:3::el7
before 0:6.3.1-2.3.el7
0:6.3.1-2.3.el7
bcel
Red Hat:rhel_eus:9.0::appstream
before 0:6.4.1-9.el9_0
0:6.4.1-9.el9_0
bcel
Red Hat:enterprise_linux:9::appstream
before 0:6.4.1-9.el9_1
0:6.4.1-9.el9_1
bcel
Rocky Linux:9
before 0:6.4.1-9.el9_1
0:6.4.1-9.el9_1
bcel
SUSE:Linux Enterprise Module for Basesystem 15 SP3
before 5.2-150200.11.3.1
5.2-150200.11.3.1
bcel
SUSE:Linux Enterprise Module for Basesystem 15 SP4
before 5.2-150200.11.3.1
5.2-150200.11.3.1
bcel
openSUSE:Leap 15.3
before 5.2-150200.11.3.1
5.2-150200.11.3.1
bcel
openSUSE:Leap 15.4
before 5.2-150200.11.3.1
5.2-150200.11.3.1
bcel
SUSE:Linux Enterprise Server 12 SP5
before 5.2-28.3.1
5.2-28.3.1
bcel
SUSE:Linux Enterprise Server for SAP Applications 12 SP5
before 5.2-28.3.1
5.2-28.3.1
bcel
Ubuntu:Pro:16.04:LTS
before 6.0~rc3-2ubuntu1+esm1, plus listed versions
6.0~rc3-1ubuntu16.0~rc3-2ubuntu1
6.0~rc3-2ubuntu1+esm1
bcel
Ubuntu:Pro:18.04:LTS
before 6.2-1ubuntu0.1~esm1, plus listed versions
6.0-16.1-16.2-1
6.2-1ubuntu0.1~esm1
bcel
Ubuntu:Pro:20.04:LTS
before 6.4.1-1ubuntu0.1~esm1, plus listed versions
6.3-16.4.1-1
6.4.1-1ubuntu0.1~esm1
bcel
Ubuntu:22.04:LTS
before 6.5.0-1ubuntu0.1, plus listed versions
6.5.0-1
6.5.0-1ubuntu0.1
bcel
openSUSE:Tumbleweed
before 5.2-37.1
5.2-37.1

History

History
RecordedChangedSources
factsOSV
aliasesEUVD
first indexedCVE List, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2022-42920 is a critical vulnerability (CVSS 9.8) in Apache Commons Bcel, published November 7, 2022. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 3.50%, the 89th percentile. Fixed in org.apache.bcel:bcel 6.6.0.

References

Show 34 moreShow less
MoveEnter Open