CVE-2022-42920
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.
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
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 Critical
CVSS: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 Critical
CVSS: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 Critical
CVSS: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 Critical
CVSS: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 High
CVSS: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 High
CVSS: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 High
CVSS: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 High
CVSS: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 High
CVSS: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 Critical
CVSS: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
| Package | Affected | Fixed |
|---|---|---|
org.apache.bcel:bcelMaven |
before 6.6.0 | 6.6.0 |
bcelAlmaLinux:9 |
before 6.4.1-9.el9_1 | 6.4.1-9.el9_1 |
bcelAzure Linux:3 |
through 5.2-37 | None known |
bcelDebian:12 |
before 6.5.0-2 | 6.5.0-2 |
bcelDebian:13 |
before 6.5.0-2 | 6.5.0-2 |
bcelDebian:14 |
before 6.5.0-2 | 6.5.0-2 |
org.apache.bcel:bcelMaven |
before 6.6.0, plus listed versions 5.26.06.16.26.3 Show 4 moreShow less6.3.16.4.06.4.16.5.0 |
6.6.0 |
bcelRed Hat:enterprise_linux:7::client |
before 0:5.2-19.el7_9 | 0:5.2-19.el7_9 |
bcel-javadocRed Hat:enterprise_linux:7::client |
before 0:5.2-19.el7_9 | 0:5.2-19.el7_9 |
bcelRed Hat:enterprise_linux:7::computenode |
before 0:5.2-19.el7_9 | 0:5.2-19.el7_9 |
Show 21 moreShow less
| Package | Affected | Fixed |
|---|---|---|
bcel-javadocRed Hat:enterprise_linux:7::computenode |
before 0:5.2-19.el7_9 | 0:5.2-19.el7_9 |
bcelRed Hat:enterprise_linux:7::server |
before 0:5.2-19.el7_9 | 0:5.2-19.el7_9 |
bcel-javadocRed Hat:enterprise_linux:7::server |
before 0:5.2-19.el7_9 | 0:5.2-19.el7_9 |
bcelRed Hat:enterprise_linux:7::workstation |
before 0:5.2-19.el7_9 | 0:5.2-19.el7_9 |
bcel-javadocRed Hat:enterprise_linux:7::workstation |
before 0:5.2-19.el7_9 | 0:5.2-19.el7_9 |
rh-maven36-bcelRed Hat:rhel_software_collections:3::el7 |
before 0:6.3.1-2.3.el7 | 0:6.3.1-2.3.el7 |
rh-maven36-bcel-javadocRed Hat:rhel_software_collections:3::el7 |
before 0:6.3.1-2.3.el7 | 0:6.3.1-2.3.el7 |
bcelRed Hat:rhel_eus:9.0::appstream |
before 0:6.4.1-9.el9_0 | 0:6.4.1-9.el9_0 |
bcelRed Hat:enterprise_linux:9::appstream |
before 0:6.4.1-9.el9_1 | 0:6.4.1-9.el9_1 |
bcelRocky Linux:9 |
before 0:6.4.1-9.el9_1 | 0:6.4.1-9.el9_1 |
bcelSUSE:Linux Enterprise Module for Basesystem 15 SP3 |
before 5.2-150200.11.3.1 | 5.2-150200.11.3.1 |
bcelSUSE:Linux Enterprise Module for Basesystem 15 SP4 |
before 5.2-150200.11.3.1 | 5.2-150200.11.3.1 |
bcelopenSUSE:Leap 15.3 |
before 5.2-150200.11.3.1 | 5.2-150200.11.3.1 |
bcelopenSUSE:Leap 15.4 |
before 5.2-150200.11.3.1 | 5.2-150200.11.3.1 |
bcelSUSE:Linux Enterprise Server 12 SP5 |
before 5.2-28.3.1 | 5.2-28.3.1 |
bcelSUSE:Linux Enterprise Server for SAP Applications 12 SP5 |
before 5.2-28.3.1 | 5.2-28.3.1 |
bcelUbuntu: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 |
bcelUbuntu: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 |
bcelUbuntu: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 |
bcelUbuntu:22.04:LTS |
before 6.5.0-1ubuntu0.1, plus listed versions 6.5.0-1 |
6.5.0-1ubuntu0.1 |
bcelopenSUSE:Tumbleweed |
before 5.2-37.1 | 5.2-37.1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| facts | OSV | |
| aliases | EUVD | |
| first indexed | CVE 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
lists.apache.org/thread/lfxk7q8qmnh5bt9jm6nmjlv5hsxjhrz4
openwall.com/lists/oss-security/2022/11/07/2
lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/LX3HEB4TV2BVCGDTK5BCLSYOZNQTOBN4
lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/QMVX6COVXZVS5GPWDODIRW6Z2GE7RPAQ
lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/QAMRHAKGIKZNHRBB4VLYTOIOIMMXCUCD
security.gentoo.org/glsa/202401-25
Show 34 moreShow less
nvd.nist.gov/vuln/detail/CVE-2022-42920
github.com/apache/commons-bcel/pull/147
issues.apache.org/jira/browse/BCEL-363
lists.fedoraproject.org/archives/list/[email protected]/message/LX3HEB4TV2BVCGDTK5BCLSYOZNQTOBN4
lists.fedoraproject.org/archives/list/[email protected]/message/QAMRHAKGIKZNHRBB4VLYTOIOIMMXCUCD
lists.fedoraproject.org/archives/list/[email protected]/message/QMVX6COVXZVS5GPWDODIRW6Z2GE7RPAQ
github.com/advisories/GHSA-97xg-phpr-rg8q
access.redhat.com/errata/RHSA-2023:0005
access.redhat.com/security/cve/CVE-2022-42920
bugzilla.redhat.com/2142707
errata.almalinux.org/9/ALSA-2023-0005.html
github.com/CVEProject/cvelistV5/tree/main/cves/2022/42xxx/CVE-2022-42920.json
security-tracker.debian.org/tracker/CVE-2022-42920
github.com/apache/commons-bcel
access.redhat.com/errata/RHSA-2022:8958
access.redhat.com/security/updates/classification
bugzilla.redhat.com/show_bug.cgi?id=2142707
security.access.redhat.com/data/csaf/v2/advisories/2022/rhsa-2022_8958.json
cve.org/CVERecord?id=CVE-2022-42920
access.redhat.com/errata/RHSA-2022:8959
security.access.redhat.com/data/csaf/v2/advisories/2022/rhsa-2022_8959.json
access.redhat.com/errata/RHSA-2023:0004
security.access.redhat.com/data/csaf/v2/advisories/2023/rhsa-2023_0004.json
security.access.redhat.com/data/csaf/v2/advisories/2023/rhsa-2023_0005.json
errata.rockylinux.org/RLSA-2023:0005
suse.com/support/update/announcement/2022/suse-su-20224306-1
bugzilla.suse.com/1205125
suse.com/security/cve/CVE-2022-42920
suse.com/support/update/announcement/2022/suse-su-20224331-1
ubuntu.com/security/CVE-2022-42920
openwall.com/lists/oss-security/2022/11/04/6
openwall.com/lists/oss-security/2022/11/04/8
github.com/apache/commons-bcel/commit/f3267cbcc900f80851d561bdd16b239d936947f5
ubuntu.com/security/notices/USN-7208-1