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

Published Nov 4, 2022
·
Updated

An out-of-bounds (OOB) write flaw was found in Apache Commons BCEL API. This flaw can be used to produce arbitrary bytecode and may abuse applications that pass attacker-controlled data to those APIs, giving the attacker more control over the resulting bytecode than otherwise expected.

Other sources

Apache Commons BCEL could allow a remote attacker to bypass security restrictions, caused by an out-of-bounds write flaw in the APIs. By sending a specially-crafted request, an attacker could exploit this vulnerability to gain control over the resulting bytecode than otherwise expected.

IBM

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.

Affected Software

11 affected componentsFixes available
redhat/bcel<0:5.2-19.el7_9
0:5.2-19.el7_9
redhat/bcel<0:6.4.1-9.el9_1
0:6.4.1-9.el9_1
redhat/bcel<0:6.4.1-9.el9_0
0:6.4.1-9.el9_0
redhat/rh-maven36-bcel<0:6.3.1-2.3.el7
0:6.3.1-2.3.el7
maven/org.apache.bcel:bcel<6.6.0
6.6.0
redhat/Apache Commons BCEL<6.6.0
6.6.0
debian/bcel
6.5.0-1+deb11u16.5.0-26.10.0-1
Apache Commons BCEL<6.6.0
fedoraproject fedora=35
fedoraproject fedora=36
fedoraproject fedora=37

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade redhat/bcel to a version that resolves this vulnerability.

    Fixed in 0:5.2-19.el7_9
  2. Upgrade

    Upgrade redhat/bcel to a version that resolves this vulnerability.

    Fixed in 0:6.4.1-9.el9_1
  3. Upgrade

    Upgrade redhat/bcel to a version that resolves this vulnerability.

    Fixed in 0:6.4.1-9.el9_0
  4. Upgrade

    Upgrade redhat/rh-maven36-bcel to a version that resolves this vulnerability.

    Fixed in 0:6.3.1-2.3.el7
  5. Upgrade

    Upgrade maven/org.apache.bcel:bcel to a version that resolves this vulnerability.

    Fixed in 6.6.0
  6. Upgrade

    Upgrade debian/bcel to a version that resolves this vulnerability.

    Fixed in 6.5.0-1+deb11u1Fixed in 6.5.0-2Fixed in 6.10.0-1
  7. Upgrade

    Upgrade redhat/Apache Commons BCEL to a version that resolves this vulnerability.

    Fixed in 6.6.0
  8. Upgrade

    Upgrade Apache Commons BCEL to a version that resolves this vulnerability.

    Fixed in 6.6.0

Event History

Nov 4, 2022
CVE Published
12:00 AM
Nov 7, 2022
CVE Published
via MITRE·12:00 AM
Data Sourced
via MITRE·12:00 AM
DescriptionWeakness
Data Sourced
via NVD·01:15 PM
DescriptionSeverityWeaknessAffected Software
Advisory Published
via GitHub·07:00 PM
Nov 15, 2022
Data Sourced
via Red Hat·01:42 AM
DescriptionSeverityAffected Software
Dec 30, 2022
Data Sourced
via IBM·12:00 AM
DescriptionSeverityAffected Software
Jan 16, 2025
Data Sourced
via Ubuntu·06:10 PM
RemedyDescriptionSeverityAffected Software
Data Sourced
via Launchpad·06:12 PM
Description
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is CVE-2022-42920?

CVE-2022-42920 is an out-of-bounds (OOB) write flaw found in Apache Commons BCEL API.

2

How can CVE-2022-42920 be exploited?

CVE-2022-42920 can be exploited by passing attacker-controllable data to the affected APIs in Apache Commons BCEL.

3

What is the severity of CVE-2022-42920?

CVE-2022-42920 has a severity rating of 9.8 out of 10, which is classified as critical.

4

Which software versions are affected by CVE-2022-42920?

Apache Commons BCEL versions up to exclusive 6.6.0, bcel versions up to exclusive 0:5.2-19.el7_9, bcel versions up to exclusive 0:6.4.1-9.el9_1, bcel versions up to exclusive 0:6.4.1-9.el9_0, and rh-maven36-bcel versions up to exclusive 0:6.3.1-2.3.el7 are affected by CVE-2022-42920.

5

How do I mitigate CVE-2022-42920?

To mitigate CVE-2022-42920, it is recommended to update to Apache Commons BCEL version 6.6.0.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203