Join the Cyber Forum: Threat Intel on May 12, 2026 to learn how AI is reshaping threat defense.Join the Virtual Cyber Forum: Threat IntelRegister Now
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2022-42920

CVE-2022-42920: Apache Commons BCEL RCE Vulnerability

CVE-2022-42920 is a remote code execution flaw in Apache Commons BCEL caused by out-of-bounds writing that enables arbitrary bytecode generation. This article covers technical details, affected versions, and mitigations.

Published: February 18, 2026

CVE-2022-42920 Overview

Apache Commons BCEL (Byte Code Engineering Library) contains a critical out-of-bounds writing vulnerability that allows attackers to produce arbitrary bytecode through APIs that would normally only permit specific class characteristic modifications. This vulnerability affects applications that pass attacker-controllable data to the affected BCEL APIs, enabling attackers to gain significantly more control over resulting bytecode than intended.

Critical Impact

Attackers can exploit the out-of-bounds write flaw to generate arbitrary Java bytecode, potentially leading to remote code execution in applications that process untrusted input through BCEL APIs.

Affected Products

  • Apache Commons BCEL (versions prior to 6.6.0)
  • Fedora 35
  • Fedora 36
  • Fedora 37

Discovery Timeline

  • 2022-11-07 - CVE-2022-42920 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2022-42920

Vulnerability Analysis

This vulnerability stems from an out-of-bounds write condition (CWE-787) within Apache Commons BCEL, a widely-used library for analyzing, creating, and manipulating Java class files. BCEL provides APIs that are designed to modify specific characteristics of Java class files in a controlled manner. However, due to improper bounds checking, these APIs can be abused to write data beyond intended memory boundaries.

When exploited, this flaw allows an attacker to craft malicious input that, when processed by BCEL's class manipulation APIs, results in arbitrary bytecode generation. This is particularly dangerous because Java bytecode executes within the JVM, meaning successful exploitation could lead to arbitrary code execution within the context of the target application.

The vulnerability is exploitable remotely without requiring authentication or user interaction, making it accessible to unauthenticated attackers who can supply crafted input to applications using BCEL.

Root Cause

The root cause is an out-of-bounds write vulnerability in the BCEL library's class manipulation functionality. The library fails to properly validate array boundaries when modifying class file structures, allowing write operations to exceed allocated buffer sizes. This memory corruption can be leveraged to inject malicious bytecode instructions into generated class files.

Attack Vector

The attack vector is network-based, targeting applications that use Apache Commons BCEL to process untrusted or attacker-controlled data. An attacker can exploit this vulnerability by:

  1. Identifying an application that uses BCEL for bytecode manipulation
  2. Crafting malicious input designed to trigger the out-of-bounds write condition
  3. Supplying the crafted input to the target application's BCEL-processing functionality
  4. The out-of-bounds write corrupts memory boundaries during class manipulation
  5. Arbitrary bytecode is generated and potentially executed within the JVM

Applications particularly at risk include those that dynamically generate or modify Java classes based on external input, such as certain application servers, dynamic proxy generators, and code analysis tools.

Detection Methods for CVE-2022-42920

Indicators of Compromise

  • Unexpected Java class files appearing in application directories with unusual bytecode patterns
  • Application crashes or memory corruption errors related to BCEL library operations
  • Anomalous JVM behavior following class loading operations
  • Log entries indicating malformed class file processing or bytecode verification failures

Detection Strategies

  • Implement Software Composition Analysis (SCA) to identify applications using vulnerable versions of Apache Commons BCEL (versions prior to 6.6.0)
  • Monitor for unusual bytecode generation patterns or class loading activities
  • Deploy runtime application self-protection (RASP) solutions to detect bytecode manipulation attempts
  • Scan application dependencies using tools like OWASP Dependency-Check or Snyk

Monitoring Recommendations

  • Enable verbose logging for applications utilizing BCEL library functionality
  • Monitor JVM class loading events for unexpected or malformed class definitions
  • Implement file integrity monitoring on directories where dynamically generated classes are stored
  • Configure alerts for bytecode verification errors in application logs

How to Mitigate CVE-2022-42920

Immediate Actions Required

  • Upgrade Apache Commons BCEL to version 6.6.0 or later immediately
  • Audit applications to identify all instances of BCEL library usage
  • Review and restrict input sources that feed into BCEL APIs
  • Consider implementing input validation layers before data reaches BCEL processing functions

Patch Information

Apache has released version 6.6.0 of Commons BCEL to address this vulnerability. Organizations should update their BCEL dependencies to this version or later. For Maven-based projects, update the dependency version in pom.xml. For Gradle projects, update the dependency in build.gradle.

Fedora users should apply the security updates available through the standard package management system. Refer to the Apache Thread Discussion for official vendor guidance. Additional security advisories are available from the Openwall Security Mailing List and Gentoo GLSA 202401-25.

Workarounds

  • If immediate patching is not possible, restrict network access to applications using BCEL
  • Implement strict input validation to sanitize data before it reaches BCEL APIs
  • Isolate applications using BCEL in sandboxed environments with limited privileges
  • Consider disabling or removing BCEL functionality if not essential to application operations
bash
# Maven: Update pom.xml dependency to patched version
# Change version to 6.6.0 or later in your Maven configuration:
# <dependency>
#   <groupId>org.apache.bcel</groupId>
#   <artifactId>bcel</artifactId>
#   <version>6.6.0</version>
# </dependency>

# Fedora: Apply security updates
sudo dnf update bcel --refresh

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechApache Commons Bcel

  • SeverityCRITICAL

  • CVSS Score9.8

  • EPSS Probability3.36%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-787
  • Technical References
  • Openwall Security Mailing List

  • Fedora Package Announce Message

  • Fedora Package Announce Message

  • Fedora Package Announce Message

  • Gentoo GLSA 202401-25
  • Vendor Resources
  • Apache Thread Discussion
  • Latest CVEs
  • CVE-2025-49454: TinySalt Path Traversal Vulnerability

  • CVE-2025-48261: MultiVendorX Information Disclosure Flaw

  • CVE-2025-32119: CardGate WooCommerce SQL Injection Flaw

  • CVE-2025-26879: s2Member Plugin Reflected XSS Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English