论文标题

通过NPM生态系统中的依赖树来揭开脆弱性的传播及其进化

Demystifying the Vulnerability Propagation and Its Evolution via Dependency Trees in the NPM Ecosystem

论文作者

Liu, Chengwei, Chen, Sen, Fan, Lingling, Chen, Bihuan, Liu, Yang, Peng, Xin

论文摘要

具有丰富功能的第三方库有助于Node.js软件的快速开发,但也带来了新的安全威胁,可以通过依赖关系引入漏洞。特别是,威胁可能会因传播依赖性而过度扩大。现有的研究要么根据可达性分析考虑直接依赖性或推理依赖性,这忽略了NPM特定的依赖解决方案规则,从而导致错误解决的依赖性。因此,无法在大规模上精确地进行进一步的细粒度分析,例如脆弱性传播及其在依赖性中的进化,也不能精确地进行依赖性脆弱性的范围。为了填补这一空白,我们提出了一个基于知识图的依赖分辨率,该解决方案可以解决依赖关系作为树(即依赖树木)的依赖关系,并研究了大规模依赖树中漏洞的安全威胁。我们首先构建了一个完整的依赖性知识知识图(DVGRAPH),该知识图(DVGraph)捕获了整个NPM生态系统(超过1000万个库版本和6000万个良好的依赖关系)。基于它,我们通过考虑官方的依赖解决规则,将dtresolver提出静态和精确解决依赖性树以及及时脆弱性传播路径。基于此,我们对脆弱性传播及其在依赖树中的进化进行了一项生态系统范围的实证研究。我们的研究揭示了许多有用的发现,我们进一步讨论了不同利益相关者的经验教训和解决方案,以减轻NPM脆弱性影响。例如,我们为NPM软件包实现了基于依赖树的漏洞补救方法(DTREME),并获得比官方工具(NPM审核修复程序)更好的性能。

Third-party libraries with rich functionalities facilitate the fast development of Node.js software, but also bring new security threats that vulnerabilities could be introduced through dependencies. In particular, the threats could be excessively amplified by transitive dependencies. Existing research either considers direct dependencies or reasoning transitive dependencies based on reachability analysis, which neglects the NPM-specific dependency resolution rules, resulting in wrongly resolved dependencies. Consequently, further fine-grained analysis, such as vulnerability propagation and their evolution in dependencies, cannot be carried out precisely at a large scale, as well as deriving ecosystem-wide solutions for vulnerabilities in dependencies. To fill this gap, we propose a knowledge graph-based dependency resolution, which resolves the dependency relations of dependencies as trees (i.e., dependency trees), and investigates the security threats from vulnerabilities in dependency trees at a large scale. We first construct a complete dependency-vulnerability knowledge graph (DVGraph) that captures the whole NPM ecosystem (over 10 million library versions and 60 million well-resolved dependency relations). Based on it, we propose DTResolver to statically and precisely resolve dependency trees, as well as transitive vulnerability propagation paths, by considering the official dependency resolution rules. Based on that, we carry out an ecosystem-wide empirical study on vulnerability propagation and its evolution in dependency trees. Our study unveils lots of useful findings, and we further discuss the lessons learned and solutions for different stakeholders to mitigate the vulnerability impact in NPM. For example, we implement a dependency tree based vulnerability remediation method (DTReme) for NPM packages, and receive much better performance than the official tool (npm audit fix).

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源