/

CVE-2026-41015

Severity:

HIGH RISK

(7.4)

OS Command Injection in radare2 rabin2 -PP PDB Name Handling

CVE-2026-41015

Awaiting Analysis

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-78

Impact:

Arbitrary OS Command Execution

Severity:

HIGH RISK

(7.4)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A command injection vulnerability in radare2 affects the rabin2 -PP functionality when radare2 is built on UNIX systems without SSL support.

By supplying a crafted PDB name, an attacker can cause rabin2 to execute unintended operating system commands in the context of the user running the tool.

Affected context

This vulnerability occurs specifically in radare2 builds on UNIX-like systems that are configured without SSL support and that include the affected snapshot between versions 6.1.2 and 6.1.3.

It is triggered when rabin2 is invoked with the -PP option and processes a PDB name that is treated unsafely by downstream command execution logic.

The risk is most relevant in workflows or scripts where the PDB name can be influenced by untrusted or semi-trusted input, or where automation passes externally supplied file identifiers directly to rabin2 -PP.

Exploit preconditions

  • Attack surface: Local execution of rabin2 with the -PP option on a vulnerable radare2 build (UNIX without SSL).
  • Required access: Ability to supply or control the PDB name value processed by rabin2 -PP (e.g., via command-line arguments, scripts, or tooling integrations).
  • Trigger point: Invocation of rabin2 -PP <PDB-name> where the PDB name is embedded into an OS command without proper sanitization or escaping.
  • Why exploitation is possible: The PDB name is incorporated into command construction or passed to a shell in a way that allows shell metacharacters or command separators to be interpreted, enabling injection of arbitrary commands.

Why this happens

The root cause is improper handling of externally influenced data used to build or invoke operating system commands, aligning with CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').

In the vulnerable code path, the PDB name argument given to rabin2 -PP is treated as trusted and is either concatenated into a command string or passed through APIs that ultimately invoke a shell without adequate quoting, escaping, or validation.

This insecure pattern allows user-controlled characters such as ;, |, &, backticks, or other shell syntax to break out of the intended context, causing additional commands to be executed.

Potential impact

  • Execution of arbitrary OS commands with the privileges of the user running rabin2.
  • Compromise of the local development or analysis environment where radare2 is used.
  • Exfiltration, modification, or deletion of files accessible to the affected user account.
  • Use of the compromised environment as a foothold for further lateral movement, depending on existing trust relationships and credentials.

General mitigation guidance

Effective mitigation focuses on controlling how external input is incorporated into command execution and minimizing reliance on shell parsing:

  • Refactor code paths to avoid constructing shell command strings from user-controlled values; instead, use APIs that pass arguments as arrays/buffers without invoking a shell.
  • Apply strict input validation for PDB names and similar parameters, rejecting unexpected characters (such as shell metacharacters) and enforcing well-formed file name patterns.
  • Normalize and sanitize any file-like input before use, ensuring it is treated strictly as data, not as a fragment of executable syntax.
  • Run radare2 and related tooling under least-privilege accounts, so that even if command injection occurs, the impact is constrained.
  • Where possible, separate analysis workflows so that tools processing externally supplied artifacts are isolated (for example, via containers, sandboxes, or restricted environments).

How teams detect issues like this

Detecting and preventing similar issues typically involves a mix of static checks, review practices, and runtime safeguards:

  • Configure static analysis or linters to flag uses of APIs that execute shell commands (e.g., system, popen, exec* variants) when arguments include unsanitized or concatenated user-controlled strings.
  • During code reviews, scrutinize any logic that forms command strings or passes user input to system utilities; look for direct string interpolation, concatenation, or lack of validation and escaping.
  • Enforce secure coding guidelines and policies requiring argument-based process execution (e.g., execve/posix_spawn with argument arrays) instead of shell-based helpers whenever user input is involved.
  • Integrate automated tooling into CI pipelines to search for command execution patterns and to enforce centrally defined security rules for input handling.
  • Optionally perform targeted dynamic testing by fuzzing command-line parameters and file names to uncover unexpected behavior in command invocation paths.

Sources

SourceLink
github.comgithub.com/radareorg/radare2/blob/9236f44a28812fe911814e1b3a7bcf1e4de5d3c2/SECURITY.md?plain=1#L3-L5
github.comgithub.com/radareorg/radare2/commit/9236f44a28812fe911814e1b3a7bcf1e4de5d3c2
github.comgithub.com/radareorg/radare2/issues/25650
github.comgithub.com/radareorg/radare2/pull/25651

Frequently asked

questions

By itself, the issue is local to the environment where rabin2 is executed. However, it can be exposed indirectly through services, scripts, or tooling that accept remote input and pass it unvalidated as a PDB name to rabin2 -PP.

An attacker needs the ability to control or influence the PDB name argument processed by rabin2 -PP on a vulnerable radare2 installation. This might be direct command-line access or indirect control via automated tooling or integration workflows.

The safest pattern is to avoid constructing shell command strings from user input altogether. Use process-execution APIs that pass arguments separately from the executable, and ensure that any values derived from users are validated against strict, minimal patterns.

Adopt a defensive development approach that treats all externally influenced data as untrusted, applies rigorous validation and sanitization, avoids shell-based command execution where user input is involved, and enforces these practices through code review standards and automated security checks in the development pipeline.

Find out what's already
exploitable in your codebase.