CVE-2026-40499
Command Injection in radare2 PDB Parser Allows Arbitrary Execution
Publication date: 2026-04-15
Last updated on: 2026-05-01
Assigner: VulnCheck
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| radare | radare2 | to 6.1.4 (inc) |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-78 | The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
CVE-2026-40499 is a critical command injection vulnerability in radare2 versions prior to 6.1.4. It occurs in the PDB (Program Database) parser's print_gvars() function, where attackers can embed a newline byte in the PE section header name field of a malicious PDB file. This allows them to inject arbitrary radare2 commands that get executed when the idp command processes the file.
The root cause is the use of unsanitized symbol names extracted directly from untrusted PDB files in radare2 commands like fN. Attackers craft malicious symbol names containing special characters or embedded commands, which break out of expected input and execute unintended commands.
To fix this, radare2 introduced a patch that base64 encodes all PDB symbol names before using them in commands, preventing injection by safely encoding special characters. This fix was merged in version 6.1.4.
How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:
The provided information does not explicitly address how the CVE-2026-40499 vulnerability affects compliance with common standards and regulations such as GDPR or HIPAA.
How can this vulnerability impact me? :
This vulnerability allows an attacker to execute arbitrary commands on your machine simply by opening a malicious PE binary with a crafted PDB file in radare2 under default settings.
Because radare2 executes the injected commands during normal analysis (via the idp command), an attacker can achieve full remote code execution (RCE) without any explicit user interaction beyond loading the file.
For example, an attacker could run system commands like opening applications or creating files, potentially compromising your system's security and integrity.
How can this vulnerability be detected on my network or system? Can you suggest some commands?
This vulnerability can be detected by analyzing the behavior of radare2 when it processes PDB files, specifically by observing if the `idp` or `idpi*` commands execute unexpected or arbitrary commands embedded in PDB symbol names. Since the vulnerability involves command injection via unsanitized symbol names, one detection method is to monitor for suspicious command executions triggered by loading PE binaries with PDB files.
A practical approach is to run radare2 with the `idp` command on suspect PE binaries and observe if any unexpected commands are executed or if unusual output appears. For example, running:
- `r2 -A <malicious_binary>` followed by the `idp` command to trigger parsing of PDB symbols.
- Monitoring system logs or process activity for commands executed by radare2 that are not part of normal analysis.
Additionally, checking if the radare2 version is prior to 6.1.4 can help identify vulnerable installations, as the vulnerability is fixed starting from version 6.1.4.
What immediate steps should I take to mitigate this vulnerability?
The immediate and most effective mitigation step is to upgrade radare2 to version 6.1.4 or later, where this command injection vulnerability has been fixed.
The fix involves base64 encoding of PDB symbol names before they are used in radare2 commands, preventing injection of arbitrary commands. This patch was merged on April 6, 2026, and included in the 6.1.4 release.
If upgrading immediately is not possible, avoid loading untrusted or suspicious PE binaries with PDB files in radare2, especially using the `idp` or `idpi*` commands, as these trigger the vulnerable code paths.
Additional mitigations include monitoring and restricting radare2's ability to execute system commands and running it in a sandboxed or restricted environment to limit potential damage from exploitation.