CVE-2026-40527

radare2 Command Injection via DWARF Parameter Names

Published Apr 17, 2026 CVSS 4.0 · 8.5 High EPSS 1.1% KEV · Not listed
Description
radare2 prior to commit bc5a890 contains a command injection vulnerability in the afsv/afsvj command path where crafted ELF binaries can embed malicious r2 command sequences as DWARF DW_TAG_formal_parameter names. Attackers can craft a binary with shell commands in DWARF parameter names that execute when radare2 analyzes the binary with aaa and subsequently runs afsvj, allowing arbitrary shell command execution through the unsanitized parameter interpolation in the pfq command string.

Analysis

AI-generated

Technical impact

The vulnerability allows an attacker to embed shell commands within DWARF formal parameter names in ELF binaries. When radare2 performs analysis through the afsv or afsvj commands, the unsanitized parameter interpolation builds a command string that is executed by the system shell, resulting in arbitrary code execution. The weakness stems from unsanitized user-controlled input in a system command context, corresponding to CWE-78.

Affected Systems

Vendors: radareorg. Product: radare2. All released versions before the patch commit bc5a89033db3ecb5b1f7bf681fc6ba4dcfc14683 are affected, including any radare2 binaries built from source prior to this commit.

Risk and Exploitability

The CVSS score of 8.5 classifies the vulnerability as high severity. EPSS data is not available, so the probability of exploitation is unclear, but the vulnerability is not listed in CISA KEV. Based on the description, the likely attack vector requires the attacker to supply or otherwise cause a user or privileged process to run radare2 on a crafted ELF file; a local or privileged attacker would benefit most. The impact is full control of the system executing radare2.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update radare2 to a version that includes the commit bc5a89033db3ecb5b1f7bf681fc6ba4dcfc14683.
  • Avoid running afsv or afsvj on untrusted or remotely supplied binaries when using radare2.
  • Run radare2 with the least privilege necessary, or within a sandboxed environment to limit potential command execution.

Generated by OpenCVE AI on April 18, 2026 at 09:00 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
CPEs cpe:2.3:a:radare:radare2:*:*:*:*:*:*:*:*
Type Values Removed Values Added
First Time appeared Radare
Radare radare2
Vendors & Products Radare
Radare radare2
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description radare2 prior to commit bc5a890 contains a command injection vulnerability in the afsv/afsvj command path where crafted ELF binaries can embed malicious r2 command sequences as DWARF DW_TAG_formal_parameter names. Attackers can craft a binary with shell commands in DWARF parameter names that execute when radare2 analyzes the binary with aaa and subsequently runs afsvj, allowing arbitrary shell command execution through the unsanitized parameter interpolation in the pfq command string.
Title radare2 Command Injection via DWARF Parameter Names
Weaknesses CWE-78
References
Metrics cvssV3_1

{'score': 7.8, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H'}

cvssV4_0

{'score': 8.5, 'vector': 'CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N'}

Weaknesses
  • CWE-78

    Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Nov 8, 2026, 2:02 PM
Reserved
Apr 13, 2026, 8:29 PM
Status
Analyzed
Published
Apr 17, 2026, 9:16 PM
Modified
Oct 26, 2026, 10:10 PM