通过依赖树揭示NPM生态系统中的漏洞传播及其演化
Demystifying the Vulnerability Propagation and Its Evolution via Dependency Trees in the NPM Ecosystem
摘要:
具有丰富功能的第三方库促进了Node.js软件的快速开发,但也带来了新的安全威胁,即可能通过依赖关系引入漏洞。特别是,这些威胁可能会被传递依赖性过度放大。现有的研究要么考虑直接依赖,要么基于可达性分析推理传递依赖,忽略了NPM特定的依赖解决规则,导致错误解决的依赖。因此,进一步的细粒度分析,如脆弱性传播及其在依赖关系中的演变,无法大规模精确地进行,也无法为依赖关系中的脆弱性得出全生态系统的解决方案。为了填补这一空白,我们提出了一种基于知识图谱的依赖关系解析,它将依赖关系的依赖关系解析为树(即,依赖关系树),并调查了大规模依赖关系树中漏洞的安全威胁。我们首先构建了一个完整的依赖-脆弱性知识图谱(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).
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。