CVE-2022-42920
Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.
NVD · uneditedApache 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.
Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.
dbcve analysis · high confidenceApache Commons BCEL contains an out-of-bounds writing vulnerability that allows certain APIs (intended only for modifying specific class characteristics) to produce arbitrary bytecode. Applications passing attacker-controllable data to these BCEL APIs can be exploited to generate malicious bytecode, potentially leading to remote code execution.
Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.
Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.
NVD · CPE data< 6.6.0= 35= 36= 37CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.
From the vector- Attack vector
- Network
- Complexity
- Low
- Privileges
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- High
- Availability
- High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.
dbcve checksWork through these to decide whether this CVE applies to you.
-
Identify Apache Commons BCEL library versionLocate the BCEL JAR file in your application's classpath or dependencies (commonly named bcel-x.x.jar or commons-bcel-x.x.jar) and check the filename, manifest file inside the JAR, or your dependency management file (Maven pom.xml, Gradle build.gradle) for the version numberAffected if The installed BCEL version is less than 6.6.0 or the version cannot be determined and BCEL is present in the application
-
Search for BCEL API usage in source codeScan your application source code for imports and usage of org.apache.bcel.* classes, particularly ClassLoader, Utility, Repository, or Constants classes that are used to modify class characteristics or generate bytecodeAffected if The codebase contains BCEL library imports and uses BCEL APIs to manipulate class bytecode
-
Trace data flow to BCEL methodsReview any code paths where external input (HTTP request parameters, user-uploaded files, deserialized data, configuration files, network data) is passed to BCEL API methods such as createClass, defineClass, or Utility methods that modify class attributesAffected if Untrusted or attacker-controllable data from external sources reaches BCEL API methods without validation
-
Check application dependencies for transitive BCEL inclusionExamine your application's full dependency tree (mvn dependency:tree or gradle dependencies) to identify if BCEL is included as a transitive dependency, and note which direct dependency pulls it inAffected if BCEL is present as a transitive dependency at a version below 6.6.0 regardless of whether it is explicitly declared
Your environment is affected if Apache Commons BCEL version below 6.6.0 is present in the application classpath AND your code passes untrusted external input to BCEL bytecode manipulation APIs.
Generated from the published advisory. Verify against your own configuration.
Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.
dbcve · scoped6.6.0
Update Apache Commons BCEL to version 6.6.0 or later. Audit code to identify any usage of BCEL APIs that process untrusted input and ensure no attacker-controllable data reaches these vulnerable entry points.
Apache Commons BCEL 6.6.0
- Identify all dependencies that use Apache Commons BCEL in your project
- Update the Commons BCEL dependency to version 6.6.0 or later
- If using Maven, update the pom.xml dependency: <groupId>org.apache.commons</groupId><artifactId>commons-bcel</artifactId><version>6.6.0</version>
- If using Gradle, update build.gradle: implementation 'org.apache.commons:commons-bcel:6.6.0'
- Rebuild and test the application to verify the upgrade
- Verify no other dependencies require an older version of commons-bcel that would cause conflicts
Generated from the published advisory — verify against the referenced sources before acting.
- Consultation4.0 h
- Implementation2.0 h
- Testing8.0 h
- Review / QA2.0 h
An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $4,352.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2022-42920 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.
References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.
Primary sourcesPractitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2022-42920 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
No notes yet
Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.
A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.
- Verified mitigations, workarounds, and config changes
- Version or environment caveats, and links to real fixes
- No weaponised exploit code, or anything meant to cause harm
- No spam, self-promotion, credentials, or personal data