CVE-2022-42920
Apache Commons BCEL vulnerable to out-of-bounds write
Reported by apache · Published November 7, 2022
bcel is fixed in 6.6.0 (Maven Central)
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| org.apache.bcel:bcel | Maven Central | 6.6.0 |
| bcel | Amazon Linux | 6.5.0-3.amzn2023.0.2, 5.2-18.amzn2.0.1 |
| bcel-javadoc | Amazon Linux | 6.5.0-3.amzn2023.0.2, 5.2-18.amzn2.0.1 |
| commons_bcel | apache | 6.6.0 |
| Apache Commons BCEL | Apache Software Foundation | 6.6.0 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| Apache Software Foundation | Apache Commons BCEL | Apache Commons BCEL |
| amazon:2023 | bcel | 0 |
| amazon:2023 | bcel-javadoc | 0 |
| amazon:2 | bcel-javadoc | 0 |
| Apache Software Foundation | Apache Commons BCEL | * |
| amazon:2 | bcel | 0 |
| Maven | org.apache.bcel:bcel | 0 |
Timeline
- Nov 6, 2022 CVE Published
- Nov 8, 2022 EPSS Score (30 in total, the first dated here)
- Feb 13, 2025 PoC Published (2 in total, the first dated here)
- Mar 17, 2026 Security Advisory (14 in total, the first dated here)
- Jun 14, 2026 Coalition ESS Score
- Nov 22, 2026 Distribution Patch (11 in total, the first dated here)
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2022-42920
vulnetix vdb fixes CVE-2022-42920
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2022-42920/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- [oss-security] 20221107 Re: CVE-2022-42920: Apache Commons BCEL prior to 6.6.0 allows producing arbitrary bytecode via out-of-bounds writing mailing-list
- FEDORA-2022-01a56f581c vendor-advisory
- FEDORA-2022-0e358addb8 vendor-advisory
- FEDORA-2022-f60a52e054 vendor-advisory
- GLSA-202401-25 vendor-advisory
- https://nvd.nist.gov/vuln/detail/CVE-2022-42920 advisory
- https://github.com/apache/commons-bcel/pull/147 patch
- https://issues.apache.org/jira/browse/BCEL-363 url
- https://github.com/advisories/GHSA-97xg-phpr-rg8q advisory