Security Advisory

CVE-2018-18778: mini_httpd Empty Host File Read

Last updated:
  • CVE-2018-18778

CVE-2018-18778 is an arbitrary file read in ACME Labs mini_httpd before 1.30, the small HTTP server used in appliances: with virtual hosting enabled, a request with an empty Host header maps the URL to a path from the file system root, such as /etc/passwd. NVD scores it 6.5. mini_httpd 1.30 fixes it.

Vulnerability summary

CVSS base score

6.5

Medium severity

EPSS score (FIRST)

70.8%

Probability of exploitation in the wild in the next 30 days

CISA KEV catalog

No

Not listed

Published

Vulnerability ID: CVE-2018-18778 · Source: NVD

Affected components

ComponentCPEVersion range
ACME Labs mini_httpdcpe:2.3:a:acme:mini-httpd:*:*:*:*:*:*:*:*before 1.30 (NVD); fixed in 1.30, the newest download on the ACME Labs page (read 2026-11-18)
Debian mini-httpd—fixed in 1.30-0.1 (unstable, bug 913095); bookworm ships 1.30-3; stretch marked no-dsa (minor issue)

What does this mean for affected devices?

NVD's description is one line: "ACME mini_httpd before 1.30 lets remote users read arbitrary files." NVD's Primary score is CVSS v3.0 6.5 (CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N), with CVSS v2 4.0 and CWE-200 (Exposure of Sensitive Information). The CPE configuration covers acme:mini-httpd before 1.30, and NVD tags the ACME Labs page as the vendor advisory. The record was published on 2018-10-29 (NVD).

What exactly was fixed?

The mini_httpd page at ACME Labs lists for version 1.30: "Fix security bug that let remote users read arbitrary files. (HuJin@topsec alpha_lab as CVE-2018-18778)". Comparing the 1.29 and 1.30 tarballs from that page shows the change: the Host: header check, which already refused a value starting with a dot or containing a slash, now also refuses an empty value. In 1.29, when virtual hosting is on (the -v flag or the vhost config option), virtual_file() builds the path as the Host value, a slash, and the requested file, so an empty Host turns the path into one that starts at the root of the file system. Without virtual hosting the check that rejects a leading / in the URL path still applies. With the -r chroot option the absolute path is resolved inside the chroot, which limits what can be read.

Which builds are affected?

Any mini_httpd before 1.30 that runs with virtual hosting. On 2026-11-18, 1.30 is still the newest download on the ACME page; a "New in version 1.31" entry citing a further CVE ID sits inside an HTML comment there, and that ID has no NVD record. Debian fixed its package in 1.30-0.1 and marked stretch as a minor issue, per the Debian security tracker. mini_httpd is a single C file that vendors often compile into firmware without a package record, so search the image for its mini_httpd/1.30 26Oct2018 style version string, as our embedded web server firmware guide describes, and read the startup script for -v or vhost.

How do you fix or mitigate it?

Build mini_httpd 1.30, or backport the one-line Host check. Where the binary cannot change, turn off virtual hosting if the product serves one site, and run the server with -r so the document root is a chroot. The same path-mapping class appears in CVE-2018-19052 in lighttpd and in the vendor CGI behind CVE-2017-9833; the path traversal fix guide covers the code pattern. The 2010 ush.it log escape-sequence study behind the Boa record CVE-2009-4496 also listed mini_httpd 1.19.

CVE-2018-18778 is not in the CISA KEV catalog as of 2026-11-18 (catalog version 2026.11.17). FIRST EPSS gives it 0.70791, the 99.4th percentile, in the 2026-11-17 dataset (CISA KEV, FIRST EPSS).

How to fix this class of issueNo dedicated SoftWSP guide covers this weakness class; the fix is usually the vendor patch or firmware update referenced above. Our related guide explains how to plan and verify it: NIST SP 800-40 Rev. 4: enterprise patch management planning, explained.

Evidence

  • NVD: ACME mini_httpd before 1.30 lets remote users read arbitrary files; Primary CVSS v3.0 6.5 AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N, v2 4.0; CWE-200; CPE acme:mini-httpd before 1.30; ACME page tagged Vendor Advisory; published 2018-10-29. — NVD
  • ACME Labs mini_httpd page: 'New in version 1.30: ... Fix security bug that let remote users read arbitrary files. (HuJin@topsec alpha_lab as CVE-2018-18778)'; download link mini_httpd-1.30.tar.gz; a 'New in version 1.31' block inside an HTML comment citing CVE 2019-13596. — ACME Labs
  • mini_httpd-1.29 vs 1.30 mini_httpd.c: Host check adds host[0] == '\0'; 1.29 virtual_file() snprintf(vfile, ..., "%s/%s", req_hostname, f) when vhost (-v / vhost) is set; leading '/' in URL path rejected; -r chroot option. — ACME Labs
  • CVE-2019-13596: no NVD record (NVD API totalResults 0) and CVE.org API CVE_RECORD_DNE, checked 2026-11-18. — NVD
  • Debian security tracker: mini-httpd fixed in unstable 1.30-0.1 (bug 913095); stretch no-dsa (minor issue); bookworm 1.30-3. — Debian security tracker
  • CVE-2018-18778 is not in the CISA KEV catalog, version 2026.11.17 (1,782 entries), checked 2026-11-18. — CISA KEV
  • EPSS 0.70791, percentile 0.99408, dataset 2026-11-17. — FIRST EPSS

Related advisories

Sources

  1. NVD
  2. ACME Labs: mini_httpd home page and change history
  3. Debian security tracker
  4. CISA KEV
  5. FIRST EPSS

Frequently asked questions

Which mini_httpd versions are affected by CVE-2018-18778?

NVD lists mini_httpd before 1.30, and the ACME Labs change history credits the fix to version 1.30. On 2026-11-18, 1.30 is still the newest download on the ACME page (per NVD and ACME Labs).

Does CVE-2018-18778 need virtual hosting to be enabled?

In the 1.29 source, yes. Only the virtual-hosting path, enabled with -v or the vhost option, prepends the Host value to the file name, and an empty Host makes that an absolute path. Without it, mini_httpd still rejects URL paths that start with a slash (per the mini_httpd 1.29 and 1.30 sources).

Why does NVD score CVE-2018-18778 with low privileges required?

NVD's Primary vector is AV:N/AC:L/PR:L/UI:N with high confidentiality impact, giving 6.5. ACME's change note says only that remote users could read arbitrary files, and gives no detail on authentication (per NVD and ACME Labs).

Is CVE-2018-18778 in the CISA KEV catalog?

No, not as of 2026-11-18 (catalog version 2026.11.17). FIRST EPSS gives it 0.70791, the 99.4th percentile, in the 2026-11-17 dataset (per CISA KEV and FIRST EPSS).