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

- Severity: Critical 9.8 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 3.52%, higher than 89% of CVEs (2026-12-01)
- Published: 2022-11-07T00:00:00.000Z
- Modified: 2026-06-17T05:05:35.453Z
- Also known as: GHSA-97xg-phpr-rg8q
- Weaknesses: CWE-787
- Assigned by: apache

## Description

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.

(As written by CVE List.)

## Affected

- Apache Software Foundation Apache Commons BCEL: from Apache Commons BCEL before 6.6.0
- org.apache.bcel:bcel (Maven): before 6.6.0
- apache commons_bcel: before 6.6.0
- fedoraproject fedora: 35; 36; 37

## Every score

- GitHub: 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`
- NVD: 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`

## References

- <https://lists.apache.org/thread/lfxk7q8qmnh5bt9jm6nmjlv5hsxjhrz4> (mailing-list, vendor-advisory, web)
- <http://www.openwall.com/lists/oss-security/2022/11/07/2> (mailing-list, third-party-advisory, web)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/LX3HEB4TV2BVCGDTK5BCLSYOZNQTOBN4/> (vendor-advisory)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/QMVX6COVXZVS5GPWDODIRW6Z2GE7RPAQ/> (vendor-advisory)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/QAMRHAKGIKZNHRBB4VLYTOIOIMMXCUCD/> (vendor-advisory)
- <https://security.gentoo.org/glsa/202401-25> (vendor-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2022-42920> (advisory)
- <https://github.com/apache/commons-bcel/pull/147> (web)
- <https://github.com/apache/commons-bcel> (package)
- <https://issues.apache.org/jira/browse/BCEL-363> (web)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/LX3HEB4TV2BVCGDTK5BCLSYOZNQTOBN4> (web)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/QAMRHAKGIKZNHRBB4VLYTOIOIMMXCUCD> (web)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/QMVX6COVXZVS5GPWDODIRW6Z2GE7RPAQ> (web)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/LX3HEB4TV2BVCGDTK5BCLSYOZNQTOBN4> (web)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/QAMRHAKGIKZNHRBB4VLYTOIOIMMXCUCD> (web)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/QMVX6COVXZVS5GPWDODIRW6Z2GE7RPAQ> (web)

## Sources

- CVE List: [CVE-2022-42920](https://www.cve.org/CVERecord?id=CVE-2022-42920), CVE Terms of Use, modified 2024-08-03
- GitHub Advisory Database: [GHSA-97xg-phpr-rg8q](https://github.com/advisories/GHSA-97xg-phpr-rg8q), CC-BY-4.0, modified 2024-02-16
- NVD: [CVE-2022-42920](https://nvd.nist.gov/vuln/detail/CVE-2022-42920), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2022-42920 · Whole record: https://cve.day/CVE-2022-42920.json · Rebuilt by cve.day 2026-11-25T22:58:16.252Z
