Advanced Vulnerability Scanning for Open Source Software: Detection and Mitigation of Log4j Vulnerabilities

Victor Wen and Zedong Peng · 2026

Read Advanced Vulnerability Scanning for Open Source Software: Detection and Mitigation of Log4j Vulnerabilities by Victor Wen and Zedong Peng (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2601-00235.txt.

Introduction

Victor Wen and coauthor Zedong Peng build a smarter scanner for the Log4Shell security flaw. Log4j is a widely used Java logging tool. Its 2021 flaw let attackers run code from afar. Years later, a third of recent downloads still carry weak versions. Most scanners only read the version number. That approach flags many installs that cannot be exploited.

Their tool checks real world exploitability instead. It then gives targeted fixes with instant feedback. A GitHub Actions hook adds continuous scanning to workflows. Code changes trigger fresh checks without extra effort. Tests cover many open source projects and releases. Accuracy lands above ninety percent across the scans. The action is public on the GitHub marketplace. For maintainers, the gain is fewer false alarms. Real risks stand out sooner, and fixes arrive with guidance.

Catalog record

CREATORVictor Wen and Zedong Peng
YEAR2026
COLLECTIONPAPERS
FORMATTXT
FILE SIZE52 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2601-00235

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

Advanced Vulnerability Scanning for Open Source Software: Detection and Mitigation of Log4j Vulnerabilities Victor Wen and Zedong Peng Abstract Automated detection of software vulnerabilities remains a critical challenge in software security. Log4j is an industrial-grade Java logging framework listed as one of the top 100 critical open source projects. On Dec. 10, 2021 a severe vulnerability Log4Shell was disclosed before being fully patched with Log4j2 version 2.17.0 on Dec. 18, 2021. However, to this day about 4.1 million, or 33 percent of all Log4j downloads in the last 7 days contain vulnerable packages. Many Log4Shell scanners have since been created to detect if a user’s installed Log4j version is vulnerable. Current detection tools primarily focus on identifying the version of Log4j installed, leading to numerous false positives, as they do not check if the software scanned is really vulnerable to malicious actors. This research aims to develop an advanced Log4j scanning tool that can evaluate the real-world exploitability of the software, thereby reducing false positives. Our approach first identifies vulnerabilities and then provides targeted recommendations for mitigating these detected vulnerabilities, along with instant feedback to users. By leveraging GitHub Actions, our tool offers automated and continuous scanning capabilities, ensuring timely identification of vulnerabilities as code changes occur. This integration into existing development workflows enables real-time monitoring and quicker responses to potential threats. We demonstrate the effectiveness of our approach by evaluating 28 open-source software projects across different releases, achieving an accuracy rate of 91.4% from a sample of 140 scans. Our GitHub action implementation is available at the GitHub marketplace and can be accessed by anyone interested in improving their software security and for future studies. This tool provides a dependable way to detect and mitigate vulnerabilities in open-source projects. I Introduction Today, an overwhelming majority of codebases contain open source software (OSS). According to the Open Source Security and Risk Analysis (OSSRA) 2024 report, about 96% of codebases across multiple industries use open source code, and among those an average of 77% of the code in those repositories contain OSS [ 67 ] . However, it is alarming that 84% of these repositories that underwent risk assessment contain at least one open source vulnerability. Given the critical role of OSS, understanding its vulnerabilities becomes paramount. OSS is usually introduced into the code via direct download, or in many cases are installed as part of software ecosystems such as NPM, NuGet, and Maven. Although it is easy to update any outdated packages when any security patches are deployed, in many cases the organization may be unaware of any vulnerabilities in their software packages. Many organizations usually have software security governance rules in their pipeline, but those only get triggered when changes are made to specific repositories. Therefore vulnerabilities may not be picked up until months or even years later in the pipeline if not updates are made to the project. This issue may expand beyond the original repository as a project’s dependencies may also contain vulnerabilities [ 65 ] . One method is to scan the codebase based on governance rules to detect any active Common Vulnerabilities and Exposures (CVEs) [ 55 ] . These open source component governance rules can be set up and enabled for pipelines on Azure DevOPs, Maven Enforcer, or as an Github action. Component governance allows for the detection of any outdated or vulnerable packages which can be resolved by upgrading to a non-vulnerable version. However, sometimes developers may need to update other parts of their codebase to accommodate the upgrade as there may be some breaking changes if a major version bump is required. Refactoring the code could be time consuming as the developer would need to pinpoint the location of any breaking changes. OSS is often back-compatible but this can lead to other issues as well if an older class in the package containing vulnerabilities needs to be updated as well. This brings us to the focus of this study—Log4j, an industrial-grade logging software developed by Apache. Log4j is particularly significant as it is used in over 8% of the Maven ecosystem, which is the world’s largest Java package repository. Critical open source projects like Log4j are considered “critical” to the ecosystem based on several factors such as total downloads, contributors, and dependencies on the project. On Dec. 10, 2021, a severe vulnerability CVE-2021-44228, known as Log4shell, was disclosed to the public in which the JNDI lookup can be exploited to execute arbitrary code loaded from an Lightweight Directory Access Protocol (LDAP) server for Log4j2 [ 27 ] . This was fully patched by Apache on Dec. 17, 2021 but not before millions of devices were exploited. At the time the vulnerability was discovered in 2021, millions of devices were affected with over 35,000 Java packages impacted by Log4j vulnerabilities [ 37 ] . While some codebases, such as Netty and MyBatis [ 71 ] , updated to Log4j2 version 2.17.0 on Dec. 19 and Dec. 18, 2021, respectively, many organizations struggled to apply the necessary patches for months. This was particularly true for those using Log4j V1, unsupported and deprecated since 2015 [ 26 ] . Additionally, the average age of open source vulnerabilities in repositories is a concerning 2.8 years, with nearly half of these codebases inactive for the past two years [ 64 ] . This indicates that both large and small organizations often lack the resources to address these vulnerabilities promptly, as they balance bug fixes with new development. Moreover, the case of Mirth Connect by NextGen Healthcare highlights another aspect. As of the Log4Shell disclosure, Mirth Connect was using the unsupported Log4j version 1.2.16 [ 58 ] , which had not received updates for over six years. Despite containing deprecated packages susceptible to various security risks, such as CVE-2021-4104 which allows data deserialization attacks, Mirth Connect was not vulnerable to CVE-2021-44228 due to the absence of the JndiLookup class in Log4j V1. Additionally, it was not exposed to CVE-2021-4104, as it did not use the JMSAppender class for logging [ 58 ] . Mirth Connect only transitioned to the secure Log4j2 version 2.17.2 in Jul. 26, 2022. This brings up a critical question: How many of these codebases marked with at least one OSS vulnerability are truly vulnerable? And how reliable are the CVE reports? For instance let’s examine the braces package maintained by micromatch. Earlier this year, braces was exposed to CVE-2024-4068 (CVE score: 7.5), which fails to limit the number of characters the program can handle, leading to memory exhaustion. Despite the reported CVE, braces is not exploitable unless the user exploits it themselves locally as there is no way to submit any regular expressions via direct input [ 44 ] . Therefore CVE-2024-4068 is not an actual security vulnerability and is at best just a performance boost after micromatch reviewed and tested the packages. Our research aims to develop an advanced scanning tool that not only scans repositories via a GitHub action and local machines but also evaluates the real-world exploitability of vulnerabilities, such as Log4Shell, within those codebases. By leveraging GitHub actions, our tool provides automated and continuous scanning capabilities, ensuring that vulnerabilities are identified promptly as code changes are made, and offering mitigating

Read the complete text