D-BUNDLR: Destructing JavaScript Bundles for Effective Static Analysis
Published in ICSE, 2026
Recommended citation: Wenyuan Xu, Alexi Turcotte, and Cristian-Alexandru Staicu. D-BUNDLR: Destructing JavaScript Bundles for Effective Static Analysis. In Proceedings of the 48th International Conference on Software Engineering (ICSE). Association for Computing Machinery, New York, NY, USA. More information to come. http://reallytg.github.io/files/papers/debundling_icse.pdf
Static analysis for vulnerability detection in JavaScript is an exten- sively studied research area. However, state-of-the-art approaches ignore bundling, an emerging development practice, akin to com- pilation, which allows developers to merge code from different providers, while also applying optimizations to reduce code size. A typical bundle heavily reuses single-letter identifiers and ex- tensively relies on dynamic JavaScript features to emulate code dependencies, thus, hindering static analysis.
In this work, we propose a reverse engineering approach that relies on domain-specific code transformations to unpack bundles and replace reidentified libraries with their source code. Our tech- nique applies lightweight static analysis to dissect bundles into individual components, machine learning to identify libraries, and dynamic analysis to verify that libraries were correctly identified. We implement this approach in a tool called D-Bundlr, and evalu- ate it by comparing the output of CodeQL (a popular static analysis tool) before and after debundling.
For a JavaScript code benchmark with known vulnerabilities, our approach allows CodeQL to recover 89% of the vulnerabilities and 83% of all alerts that were also detected in the source code, but were dormant in bundles. Similarly, for real-world bundles where we can retrieve the source code, D-Bundlr recovered 33% of the original alerts. When applied to bundles extracted from the 100,000 most popular websites, D-Bundlr identifies 34,445 instances cor- responding to 63 unique libraries, and causes CodeQL to produce around 3.2K more security alerts than on packed bundles. We ad- ditionally illustrate how attackers can exploit some of our zero-day findings, causing unwanted security effects such as advertisement space hijacking.