arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2603.18693cs.CRcs.SE
收藏

Python应用的跨生态系统漏洞分析

Cross-Ecosystem Vulnerability Analysis for Python Applications

University of Athens(雅典大学);National Infrastructures for Research and Technology(国家研究与技术基础设施);Athens University of Economics and Business(雅典经济与商业大学);ETH Zurich(苏黎世联邦理工学院);Technical University of Crete(克里特理工大学)

Georgios Alexopoulos, Nikolaos Alexopoulos, Thodoris Sotiropoulos, Charalambos Mitropoulos, Zhendong Su, Dimitris Mitropoulos

AI总结:

提出一种跨生态系统漏洞分析方法,通过内容哈希和动态分析解析供应商库,构建跨依赖边界的调用图进行可达性分析,有效减少误报和漏报。

摘要:

Python应用依赖于第三方原生库,这些库可能被供应商打包在包分发中或安装在主机系统上。当这些原生库中发现漏洞时,确定受影响的Python包需要跨生态系统边界进行分析,从Python依赖图到操作系统分发包。当前的漏洞扫描器通过忽略供应商原生库中的漏洞产生漏报,并通过未能考虑操作系统分发反向移植的安全补丁产生误报。我们提出了一种溯源感知的漏洞分析方法,将供应商库解析为特定的操作系统包版本或上游项目发布。我们的方法使用基于内容的哈希在历史操作系统包工件数据库中查询供应商库,并应用特定于库的动态分析从上游源代码构建的二进制文件中提取版本信息。然后,我们通过跨依赖边界拼接Python和二进制调用图来构建跨生态系统调用图,从而实现对易受攻击函数的可达性分析。在100,000个Python包和10个与第三方原生依赖相关的已知CVE上进行评估,我们识别出39个直接易受攻击的包(月下载量超过4700万)和312个通过依赖链受影响的间接易受攻击的客户端包。与上游版本匹配相比,我们的分析平均减少了52%的误报,对于高度修补的库,误报减少高达97%。我们负责任地向维护者披露了所有发现;迄今已有54个问题得到修复。

英文摘要:

Python packages often bundle third-party native libraries (e.g., OpenSSL), a practice known as vendoring. Identifying vulnerabilities in these libraries is challenging because current scanners either ignore vendored libraries, causing false negatives, or ignore their origin, causing false positives by missing security fixes backported by OS distributions. We show that accurate cross-ecosystem vulnerability analysis requires the exact provenance of each vendored binary: its upstream project and version, and, when applicable, the specific OS package and version. We recover provenance deterministically using two complementary techniques. For binaries copied from OS packages, Python packaging tools rewrite metadata but leave executable code unchanged. We hash this code and match it against historical OS package artifacts. For libraries built from source, we generate per-library dynamic analysis rules that extract the version through callable interfaces exposed by the binary. Across 1,878 Python packages containing vendored native libraries, we resolve exact provenance in 73.4% of cases overall and 94.9% of practically relevant cases involving libraries with at least one CVE. Our approach substantially outperforms provenance-unaware methods in determining whether vendored libraries are affected by known vulnerabilities. We integrate it with existing Python and binary call-graph generators to perform the first cross-ecosystem reachability analysis of vulnerabilities in libraries vendored in Python packages. Analyzing the latest versions of the top 100,000 Python packages against 10 CVEs in native libraries, we identify 39 directly vulnerable packages with 47M+ monthly downloads and 312 transitively affected packages. We disclosed all findings to maintainers; 54 have been fixed to date.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑