Lune

USENIX Security2023顶会

Bilingual Problems: Studying the Security Risks Incurred by Native Extensions in Scripting Languages

Cristian-Alexandru Staicu, Sazzadur Rahaman, Ágnes Kiss, Michael Backes

摘要

Scripting languages are continuously gaining popularity due to their ease of use and the flourishing software ecosystems surrounding them. These languages offer crash and memory safety by design. Thus, developers do not need to understand and prevent low-level security issues like the ones plaguing the C code. However, scripting languages often allow native extensions, a way for custom C/C++ code to be invoked directly from the high-level language. While this feature promises several benefits, such as increased performance or the reuse of legacy code, it can also break the language's guarantees, e.g., crash safety.

In this work, we first provide a comparative analysis of the security risks of native extension APIs in three popular scripting languages. Additionally, we discuss a novel methodology for studying the misuse of the native extension API. We then perform an in-depth study of npm, an ecosystem that is most exposed to threats introduced by native extensions. We show that vulnerabilities in extensions can be exploited in their embedding library by producing reads of uninitialized memory, hard crashes, or memory leaks in 33 npm packages simply by invoking their API with well-crafted inputs. Moreover, we identify six open-source web applications in which a weak adversary can deploy such exploits remotely. Finally, we were assigned seven security advisories for the work presented in this paper, most labeled as high severity.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 6 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • SecBench.js: An Executable Security Benchmark Suite for Server-Side JavaScript 引用了 Silent Spring: Prototype Pollution Leads to Remote Code Execution in Node.js
  • SecBench.js: An Executable Security Benchmark Suite for Server-Side JavaScript 引用了 Small World with High Risks: A Study of Security Threats in the npm Ecosystem
  • Welcome to Jurassic Park: A Comprehensive Study of Security Risks in Deno and its Ecosystem 引用了 Jack-in-the-box: An Empirical Study of JavaScript Bundling on the Web and its Security Implications
  • Welcome to Jurassic Park: A Comprehensive Study of Security Risks in Deno and its Ecosystem 引用了 Silent Spring: Prototype Pollution Leads to Remote Code Execution in Node.js
  • Welcome to Jurassic Park: A Comprehensive Study of Security Risks in Deno and its Ecosystem 引用了 Small World with High Risks: A Study of Security Threats in the npm Ecosystem
  • Jack-in-the-box: An Empirical Study of JavaScript Bundling on the Web and its Security Implications 引用了 SecBench.js: An Executable Security Benchmark Suite for Server-Side JavaScript
  • Jack-in-the-box: An Empirical Study of JavaScript Bundling on the Web and its Security Implications 引用了 Silent Spring: Prototype Pollution Leads to Remote Code Execution in Node.js
  • Jack-in-the-box: An Empirical Study of JavaScript Bundling on the Web and its Security Implications 引用了 Small World with High Risks: A Study of Security Threats in the npm Ecosystem
  • Silent Spring: Prototype Pollution Leads to Remote Code Execution in Node.js 引用了 Small World with High Risks: A Study of Security Threats in the npm Ecosystem
  • CryptoGuard: High Precision Detection of Cryptographic Vulnerabilities in Massive-sized Java Projects 引用了 Comparing the Usability of Cryptographic APIs
  • HODOR: Shrinking Attack Surface on Node.js via System Call Limitation 引用了 Silent Spring: Prototype Pollution Leads to Remote Code Execution in Node.js
  • HODOR: Shrinking Attack Surface on Node.js via System Call Limitation 引用了 Small World with High Risks: A Study of Security Threats in the npm Ecosystem
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper6

  1. SecBench.js: An Executable Security Benchmark Suite for Server-Side JavaScriptMasudul Hasan Masud Bhuiyan, Adithya Srinivas Parthasarathy, Nikos Vasilakis, Michael Pradel 等ICSE 2023 · 20 次引用
  2. Jack-in-the-box: An Empirical Study of JavaScript Bundling on the Web and its Security ImplicationsJeremy Rack, Cristian-Alexandru StaicuCCS 2023 · 11 次引用
  3. HODOR: Shrinking Attack Surface on Node.js via System Call LimitationWenya Wang, Xingwei Lin, Jingyi Wang, Wang Gao 等CCS 2023 · 3 次引用
  4. Welcome to Jurassic Park: A Comprehensive Study of Security Risks in Deno and its EcosystemAbdullah AlHamdan, Cristian-Alexandru StaicuNDSS 2025
  5. Silent Spring: Prototype Pollution Leads to Remote Code Execution in Node.jsMikhail Shcherbakov, Musard Balliu, Cristian-Alexandru StaicuUSENIX Security 2023

它引用的 Paper29

  1. Spectre Attacks: Exploiting Speculative ExecutionPaul Kocher, Jann Horn, Anders Fogh, Daniel Genkin 等S&P 2019 · 2,435 次引用
  2. Small World with High Risks: A Study of Security Threats in the npm EcosystemMarkus Zimmermann, Cristian-Alexandru Staicu, Cam Tenny, Michael PradelUSENIX Security 2019 · 281 次引用
  3. Comparing the Usability of Cryptographic APIsYasemin Acar, Michael Backes, Sascha Fahl, Simson L. Garfinkel 等S&P 2017 · 261 次引用
  4. CodeAlchemist: Semantics-Aware Code Generation to Find Vulnerabilities in JavaScript EnginesHyungSeok Han, DongHyeon Oh, Sang Kil ChaNDSS 2019 · 178 次引用
  5. CryptoGuard: High Precision Detection of Cryptographic Vulnerabilities in Massive-sized Java ProjectsSazzadur Rahaman, Ya Xiao, Sharmin Afrose, Fahad Shaon 等CCS 2019 · 159 次引用

相关 Paper

  1. Finding and Preventing Bugs in JavaScript BindingsFraser Brown, Shravan Narayan, Riad S. Wahby, Dawson R. Engler 等S&P 2017 · 63 次引用
  2. Best of Both Worlds: Effective Foreign Bridge Identification in V8 Embedders for Security AnalysisGeorgios Alexopoulos, Thodoris Sotiropoulos, Zhendong Su, Dimitris MitropoulosS&P 2026 · 1 次引用
  3. Extracting taint specifications for JavaScript librariesCristian-Alexandru Staicu, Martin Toldam Torp, Max Schäfer, Anders Møller 等ICSE 2020 · 34 次引用
  4. Unveiling the Invisible: Detection and Evaluation of Prototype Pollution Gadgets with Dynamic Taint AnalysisMikhail Shcherbakov, Paul Moosbrugger, Musard BalliuWWW 2024 · 8 次引用
  5. Towards Measuring Supply Chain Attacks on Package Managers for Interpreted LanguagesRuian Duan, Omar Alrawi, Ranjita Pai Kasturi, Ryan Elder 等NDSS 2021
黄昏的海面,两侧是细线勾勒的悬崖