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

Scripting languages are continuously gaining popularity due to their ease of use and the flourishing software ecosystems that surround them. These languages offer crash and memory safety by design, hence developers do not need to understand and prevent most low-level security issues plaguing languages like C. However, scripting languages often allow native extensions, which are 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 guarantees provided by the language, e.g., crash-safety. In this work, we first provide a comparative analysis of the security risks of the existing native extension API in three popular scripting languages. Additionally, we discuss a novel methodology for studying vulnerabilities caused by misuse of the native extension API. We then perform an in-depth study of npm, an ecosystem which appears to be the most exposed to threats introduced by native extensions. We show that vulnerabilities in extensions can be exploited in their embedding library by producing a hard crash in 30 npm packages, simply by invoking their API. Moreover, we identify five open-source web applications in which such exploits can be deployed remotely. Finally, we provide a set of recommendations for language designers, users and for the research community.

READ FULL TEXT

page 2

page 3

page 5

page 6

page 10

page 12

page 14

page 15

research
08/02/2018

Debugging Native Extensions of Dynamic Languages

Many dynamic programming languages such as Ruby and Python enable develo...
research
08/29/2023

A Closer Look at the Security Risks in the Rust Ecosystem

Rust is an emerging programming language designed for the development of...
research
08/30/2023

Exposing and Addressing Security Vulnerabilities in Browser Text Input Fields

In this work, we perform a comprehensive analysis of the security of tex...
research
05/19/2023

Chrowned by an Extension: Abusing the Chrome DevTools Protocol through the Debugger API

The Chromium open-source project has become a fundamental piece of the W...
research
08/16/2023

Continuing WebAssembly with Effect Handlers

WebAssembly (Wasm) is a low-level portable code format offering near nat...
research
09/29/2022

IvySyn: Automated Vulnerability Discovery for Deep Learning Frameworks

We present IvySyn: the first fully-automated framework for vulnerability...
research
01/25/2019

Mind the Gap: Analyzing the Performance of WebAssembly vs. Native Code

All major web browsers now support WebAssembly, a low-level bytecode int...

Please sign up or login with your details

Forgot password? Click here to reset