[Paper Review] SBOM.EXE: Countering Dynamic Code Injection based on Software Bill of Materials in Java
SBOM.exe is a runtime integrity enforcement system for Java applications that constructs a Bill of Materials Index (BOMI) from the complete software supply chain, using bytecode canonicalization to generate deterministic checksums for all allowed classes. It blocks execution of any unrecognized or tampered classes at runtime, effectively mitigating three critical CVEs—Log4j, H2, and Apache Commons Configuration—while incurring minimal performance overhead in real-world applications.
Software supply chain attacks have become a significant threat as software development increasingly relies on contributions from multiple, often unverified sources. The code from unverified sources does not pose a threat until it is executed. Log4Shell is a recent example of a supply chain attack that processed a malicious input at runtime, leading to remote code execution. It exploited the dynamic class loading facilities of Java to compromise the runtime integrity of the application. Traditional safeguards can mitigate supply chain attacks at build time, but they have limitations in mitigating runtime threats posed by dynamically loaded malicious classes. This calls for a system that can detect these malicious classes and prevent their execution at runtime. This paper introduces SBOM.EXE, a proactive system designed to safeguard Java applications against such threats. SBOM.EXE constructs a comprehensive allowlist of permissible classes based on the complete software supply chain of the application. This allowlist is enforced at runtime, blocking any unrecognized or tampered classes from executing. We assess SBOM.EXE's effectiveness by mitigating 3 critical CVEs based on the above threat. We run our tool with 3 open-source Java applications and report that our tool is compatible with real-world applications with minimal performance overhead. Our findings demonstrate that SBOM.EXE can effectively maintain runtime integrity with minimal performance impact, offering a novel approach to fortifying Java applications against dynamic classloading attacks.
Motivation & Objective
- Address the growing threat of software supply chain attacks in Java that exploit dynamic class loading at runtime.
- Overcome the limitations of traditional build-time safeguards like SBOMs, version pinning, and code signing, which fail to prevent runtime code injection.
- Develop a system that enforces application integrity at runtime by monitoring and validating all dynamically loaded classes.
- Ensure compatibility with real-world Java applications while maintaining low performance overhead.
- Provide a fully automated, source-code-free mechanism to detect and block malicious class loading without manual intervention.
Proposed method
- Construct a comprehensive Bill of Materials Index (BOMI) during test execution, capturing all classes expected in the runtime environment.
- Apply a novel bytecode canonicalization technique to eliminate non-deterministic features (e.g., timestamps, random IDs) in Java bytecode to produce consistent checksums.
- Enforce the BOMI at runtime by intercepting class loading and comparing the checksum of each class against the reference BOMI.
- Terminate the application immediately if a class is not in the BOMI or has been tampered with, preventing execution of malicious code.
- Integrate the system as a Java agent without requiring source code modifications to the target application.
- Leverage the test suite of the application to dynamically discover and record all legitimate classes, ensuring completeness of the allowlist.

Experimental results
Research questions
- RQ1Can a system be built to detect and block malicious class loading at runtime in Java applications, even when the malicious code is injected via untrusted dependencies?
- RQ2How can a deterministic and secure checksum of dynamically generated Java classes be computed despite non-deterministic features in bytecode?
- RQ3To what extent can such a system be integrated into real-world Java applications with acceptable performance overhead?
- RQ4Can this approach effectively mitigate known, high-severity supply chain vulnerabilities like Log4j, H2, and Apache Commons Configuration?
- RQ5How does this approach compare to existing techniques such as control flow integrity, deserialization filtering, or static analysis in GraalVM?
Key findings
- SBOM.exe successfully mitigated three critical CVEs—Log4j (CVE-2021-44228), H2 (CVE-2022-23947), and Apache Commons Configuration (CVE-2022-23947)—by blocking the execution of malicious classes before they could be loaded.
- The system demonstrated compatibility with real-world applications such as PDFBox, tTorrent, and GraphHopper, with minimal performance overhead observed during evaluation.
- Bytecode canonicalization effectively eliminated non-determinism in Java bytecode, enabling reliable and secure checksum computation across different environments and Java versions.
- The approach required no source code modifications to the target application, making it practical for deployment in production systems.
- SBOM.exe provides fine-grained visibility into integrity violations, enabling developers to identify exactly which class triggered a block, improving debuggability.
- The system is the first to enforce software supply chain integrity at runtime in Java by leveraging a dynamic, test-driven BOMI construction and runtime enforcement.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.