消除隐患:跨 GitHub 检测、利用并修复路径遍历漏洞
Eradicating the Unseen: Detecting, Exploiting, and Remediating a Path Traversal Vulnerability across GitHub
AI总结:
本研究开发自动化流水线,在 GitHub 上检测并利用路径遍历漏洞(CWE-22),识别出 1,756 个受影响项目,其中 14% 已修复,并探讨了根本原因及对 LLM 的污染,强调自动化漏洞管理的重要性。
摘要:
开源软件中的漏洞可能在现代数字生态系统中引发级联效应。尤其令人担忧的是,当这些漏洞在众多项目中重复出现时,一旦攻击者发现其中一个,便能轻易扩大攻击规模。不幸的是,由于开发者频繁复用自身或外部代码资源,许多开源项目中存在几乎相同的漏洞。我们开展了一项研究,以考察一种能够实现路径遍历攻击(CWE-22)的特定漏洞代码模式在开源 GitHub 项目中的普遍性。为在 GitHub 规模上处理此研究,我们开发了一个自动化流水线,该流水线扫描 GitHub 以寻找目标漏洞模式,通过先运行静态分析然后在所研究项目的上下文中利用该漏洞来确认漏洞,通过计算 CVSS 分数评估其影响,使用 GPT-4 生成补丁,并向维护者报告漏洞。利用我们的流水线,我们识别出 1,756 个易受攻击的开源项目,其中一些极具影响力。对于许多受影响的项目,该漏洞是严重的(CVSS 分数高于 9.0),因为它可以在无任何权限的情况下远程利用,并严重损害系统的机密性和可用性。我们已负责任地向维护者披露了漏洞,其中 14% 的报告漏洞已得到修复。我们还调查了该漏洞代码模式的根本原因,并评估了大量该漏洞模式副本的副作用,这些副本似乎已污染了几个流行的 LLM。我们的研究强调了通过利用可扩展的自动化漏洞管理解决方案并提高开发者的意识来帮助保护开源生态系统的紧迫性。
英文摘要:
Vulnerabilities in open-source software can cause cascading effects in the modern digital ecosystem. It is especially worrying if these vulnerabilities repeat across many projects, as once the adversaries find one of them, they can scale up the attack very easily. Unfortunately, since developers frequently reuse code from their own or external code resources, some nearly identical vulnerabilities exist across many open-source projects. We conducted a study to examine the prevalence of a particular vulnerable code pattern that enables path traversal attacks (CWE-22) across open-source GitHub projects. To handle this study at the GitHub scale, we developed an automated pipeline that scans GitHub for the targeted vulnerable pattern, confirms the vulnerability by first running a static analysis and then exploiting the vulnerability in the context of the studied project, assesses its impact by calculating the CVSS score, generates a patch using GPT-4, and reports the vulnerability to the maintainers. Using our pipeline, we identified 1,756 vulnerable open-source projects, some of which are very influential. For many of the affected projects, the vulnerability is critical (CVSS score higher than 9.0), as it can be exploited remotely without any privileges and critically impact the confidentiality and availability of the system. We have responsibly disclosed the vulnerability to the maintainers, and 14\% of the reported vulnerabilities have been remediated. We also investigated the root causes of the vulnerable code pattern and assessed the side effects of the large number of copies of this vulnerable pattern that seem to have poisoned several popular LLMs. Our study highlights the urgent need to help secure the open-source ecosystem by leveraging scalable automated vulnerability management solutions and raising awareness among developers.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。