A group of academic researchers have designed an open-source Node.js bug hunting tool which has already identified 180 security vulnerabilities.
Node.js is an open-source environment for running JavaScript code outside the browser. It was designed for the development of network applications. While useful, many of the available Node.js packages contain security flaws leading to application compromise.
The researchers devised a novel graph structure called Object Dependence Graph (ODG) and also built an open-source prototype system called ‘ODGEN’, to use ODG for bug hunting. ODG models JavaScript objects as nodes and represents their relations with Abstract Syntax Tree (AST) as edges. The new approach generates ODG using “flow- and context-sensitive static analysis with hybrid branch-sensitivity and points-to information”, ODG can be used for the offline detection of various types of Node.js vulnerabilities.
ODGEN, which abstractly interprets all branches in parallel, was designed to define and look up objects for AST nodes and record object definitions and lookups as part of ODG. The researchers were able to configure ODGEN to identify six types of vulnerabilities, which has led to the discovery of “43 application-level zero-day vulnerabilities with 14 false positives and we also confirmed 137 package-level zero-day vulnerabilities with 84 false positives”. A total of 70 Common Vulnerabilities and Exposures (CVE) identifiers have been issued for the identified security bugs.