← Lab /Security & privacy

Code reuse attacks still possible in memory-safe languages

Memory safety does not eliminate code reuse attacks that exploit shared runtime state

Security & privacy arXiv 13 Nov 2026 Theory Theory

Published as “Memory Safety Isn't All You Need: Code Reuse Attacks in Memory Safe Languages”

Why it matters

Provides a systematic basis for reasoning about and designing cross-language defenses against code-reuse attacks in memory-safe environments.

Summary

The paper shows that code-reuse attacks still exist in memory-safe languages and that five known attack classes (object injection, prototype pollution, class pollution, DOM clobbering, DOM script gadgets) share a common structure based on attacker-controlled access to shared runtime state. It introduces a language-agnostic framework, derives new weakness and gadget patterns, maps defenses to three strategies, and formalizes the concepts in a model language (impsm). The evidence is primarily conceptual and validated on a handful of illustrative examples, so the claim is well-supported for the studied cases but lacks large-scale empirical evaluation.

What they found 1

  1. A language-agnostic framework captures all five established attack classes.

    “We develop a language-agnostic framework for code reuse attacks under memory safety and demonstrate its applicability to five established attack classes.”

Caveats 4

  • The formal model omits accessed values and may miss attacks that only change stored values or access order, leading to over-approximation and potential false positives.
  • The definition focuses on attacker influence over which shared runtime state is accessed or modified and intentionally ignores changes to stored values or access order.
  • The model does not fully enforce feasibility of end-to-end executions; precise causal connection remains an open problem.
  • It does not capture finer distinctions such as payload/fixed-value or mutating/recycling classifications.

What’s new here 4

  • A language-agnostic framework that abstracts code-reuse attacks in memory-safe languages to interactions with shared runtime state.
  • Classification of weaknesses (stateless, mutating, recycling) and gadget structures (simple, vertical, horizontal).
  • Mapping of existing defenses to three high-level strategies (mediation, minimization, constraint) and derivation of new defense directions.
  • A formal model language (impsm) with operational semantics that captures the identified attack patterns.