CVE-2017-16544
High · 8.8CVSS
8.8
EPSS
6.1%
Published
Nov 20, 2017
CISA due date
—
Cloudanix analysis
A flaw in a common command-line tool lets attackers trick users into running hidden commands just by pressing the tab key to complete filenames in a shared folder.
- Exploitation
- Remote Authenticated
- Attacker needs
- Low Privilege
- Complexity
- Moderate
- Impact
- Remote Code Execution
- Component
- Application
- Class
- RCE
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
The add_match function in BusyBox lineedit.c fails to sanitize directory filenames during tab autocomplete, allowing terminal escape sequences embedded in filenames to be executed directly in the user's terminal session, enabling code execution, file writes, or other terminal manipulation.
Why it matters to the business
Systems relying on BusyBox (embedded devices, routers, appliances, and certain Linux distributions) face risk of remote compromise through shell interaction, potentially leading to full system takeover, data theft, or persistent access with high urgency due to public exploit availability and widespread use across many ecosystems.
How an attack unfolds
An attacker places a file with a crafted name containing terminal escape sequences in a directory accessible to the victim; when the victim uses tab autocomplete in the BusyBox shell to list files, the escape sequences are interpreted by the terminal emulator, resulting in arbitrary code execution or other attacks.
How to fix it
Upgrade BusyBox to a version beyond 1.27.2 that addresses the unsanitized filename handling in libbb/lineedit.c; for affected products such as Debian, Ubuntu, VMware ESXi, and Red Lion devices apply vendor-specific patches or replace BusyBox binaries; disable tab autocomplete where feasible and restrict untrusted directory access.
How to confirm the fix worked
Confirm BusyBox version is newer than 1.27.2, test tab autocomplete against directories containing filenames with escape sequences to ensure no terminal execution occurs, and review source or binary for sanitization in add_match function.
Typical attack path
- Attacker identifies a writable or shared directory on target system
- Attacker creates malicious filename containing terminal escape sequences
- Victim navigates to directory and triggers tab autocomplete in BusyBox shell
- Escape sequences execute in victim's terminal leading to code execution or file operations
How to detect it
Review shell history and terminal logs for unexpected escape sequence patterns or unusual file creation events; inspect directories for filenames containing control characters or escape sequences; correlate with user activity around tab completion usage in BusyBox environments.
What your security team should do
- Prioritize patching BusyBox on all internet-facing or multi-user systems given public exploit availability
- Inventory and update all affected products including embedded devices and distributions
- Implement least-privilege access to directories where shell autocomplete is used
- Monitor for terminal escape sequence activity in logs or user sessions
The record
In the add_match function in libbb/lineedit.c in BusyBox through 1.27.2, the tab autocomplete feature of the shell, used to get a list of filenames in a directory, does not sanitize filenames and results in executing any escape sequence in the terminal. This could potentially result in code execution, arbitrary file writes, or other attacks.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Alpine:v3.10 | busybox | 0 | 1.27.2-r4 |
| Alpine:v3.11 | busybox | 0 | 1.27.2-r4 |
| Alpine:v3.12 | busybox | 0 | 1.27.2-r4 |
| Alpine:v3.13 | busybox | 0 | 1.27.2-r4 |
| Alpine:v3.14 | busybox | 0 | 1.27.2-r4 |
| Alpine:v3.15 | busybox | 0 | 1.27.2-r4 |
| Alpine:v3.16 | busybox | 0 | 1.27.2-r4 |
| Alpine:v3.17 | busybox | 0 | 1.27.2-r4 |
| Alpine:v3.18 | busybox | 0 | 1.27.2-r4 |
| Alpine:v3.19 | busybox | 0 | 1.27.2-r4 |
| Alpine:v3.20 | busybox | 0 | 1.27.2-r4 |
| Alpine:v3.21 | busybox | 0 | 1.27.2-r4 |
| Alpine:v3.22 | busybox | 0 | 1.27.2-r4 |
| Alpine:v3.3 | busybox | 0 | 1.24.2-r2 |
| Alpine:v3.4 | busybox | 0 | 1.24.2-r13 |
| Alpine:v3.5 | busybox | 0 | 1.25.1-r1 |
| Alpine:v3.6 | busybox | 0 | 1.26.2-r9 |
| Alpine:v3.7 | busybox | 0 | 1.27.2-r4 |
| Alpine:v3.8 | busybox | 0 | 1.27.2-r4 |
| Alpine:v3.9 | busybox | 0 | 1.27.2-r4 |
| Debian:11 | busybox | 0 | 1:1.27.2-2 |
| Debian:12 | busybox | 0 | 1:1.27.2-2 |
| Debian:13 | busybox | 0 | 1:1.27.2-2 |
| Debian:8 | busybox | 0 | 1:1.22.0-9+deb8u2 |
| Debian:9 | busybox | 0 | 1:1.22.0-19+deb9u1 |
| SUSE:Enterprise Storage 6 | busybox | 0 | 1.34.1-4.9.1 |
| SUSE:Enterprise Storage 7 | busybox | 0 | 1.34.1-4.9.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP1-ESPOS | busybox | 0 | 1.34.1-4.9.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSS | busybox | 0 | 1.34.1-4.9.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP2-ESPOS | busybox | 0 | 1.34.1-4.9.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS | busybox | 0 | 1.34.1-4.9.1 |
| SUSE:Linux Enterprise High Performance Computing 15-ESPOS | busybox | 0 | 1.34.1-4.9.1 |
| SUSE:Linux Enterprise High Performance Computing 15-LTSS | busybox | 0 | 1.34.1-4.9.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP3 | busybox | 0 | 1.34.1-4.9.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP4 | busybox | 0 | 1.35.0-150400.3.3.1 |
| SUSE:Linux Enterprise Real Time 15 SP2 | busybox | 0 | 1.34.1-4.9.1 |
| SUSE:Linux Enterprise Server 12 SP2-BCL | busybox | 0 | 1.35.0-4.3.1 |
| SUSE:Linux Enterprise Server 12 SP3-BCL | busybox | 0 | 1.35.0-4.3.1 |
| SUSE:Linux Enterprise Server 12 SP4-LTSS | busybox | 0 | 1.35.0-4.3.1 |
| SUSE:Linux Enterprise Server 12 SP5 | busybox | 0 | 1.35.0-4.3.1 |
| SUSE:Linux Enterprise Server 15 SP1-BCL | busybox | 0 | 1.34.1-4.9.1 |
| SUSE:Linux Enterprise Server 15 SP1-LTSS | busybox | 0 | 1.34.1-4.9.1 |
| SUSE:Linux Enterprise Server 15 SP2-BCL | busybox | 0 | 1.34.1-4.9.1 |
| SUSE:Linux Enterprise Server 15 SP2-LTSS | busybox | 0 | 1.34.1-4.9.1 |
| SUSE:Linux Enterprise Server 15-LTSS | busybox | 0 | 1.34.1-4.9.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP4 | busybox | 0 | 1.35.0-4.3.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP5 | busybox | 0 | 1.35.0-4.3.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 | busybox | 0 | 1.34.1-4.9.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 SP1 | busybox | 0 | 1.34.1-4.9.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 SP2 | busybox | 0 | 1.34.1-4.9.1 |
| SUSE:Manager Proxy 4.1 | busybox | 0 | 1.34.1-4.9.1 |
| SUSE:Manager Retail Branch Server 4.1 | busybox | 0 | 1.34.1-4.9.1 |
| SUSE:Manager Server 4.1 | busybox | 0 | 1.34.1-4.9.1 |
| SUSE:OpenStack Cloud 9 | busybox | 0 | 1.35.0-4.3.1 |
| SUSE:OpenStack Cloud Crowbar 9 | busybox | 0 | 1.35.0-4.3.1 |
| Ubuntu:14.04:LTS | busybox | 0 | 1:1.21.0-1ubuntu1.4 |
| Ubuntu:16.04:LTS | busybox | 0 | 1:1.22.0-15ubuntu1.4 |
| Ubuntu:18.04:LTS | busybox | 0 | 1:1.27.2-1ubuntu4 |
| Ubuntu:18.04:LTS | busybox | 0 | 1:1.27.2-2ubuntu3.2 |
| openSUSE:Leap 15.3 | busybox | 0 | 1.34.1-4.9.1 |
| openSUSE:Leap 15.3 | virtualbox | 0 | 6.1.34-lp153.2.27.2 |
| openSUSE:Leap 15.3 | virtualbox-kmp | 0 | 6.1.34-lp153.2.27.1 |
| openSUSE:Leap 15.4 | busybox | 0 | 1.35.0-150400.3.3.1 |
| openSUSE:Tumbleweed | busybox | 0 | 1.35.0-1.1 |
Related vulnerabilities
- CVE-2017-15874 archival/libarchive/decompress_unlzma.c in BusyBox 1.27.2 has an Integer Underflow that… Also affects busybox
- CVE-2017-15873 The get_next_block function in archival/libarchive/decompress_bunzip2.c in BusyBox 1.27.2… Also affects busybox
- CVE-2022-30065 A use-after-free in Busybox 1.35-x's awk applet leads to denial of service and possibly… Also affects busybox
- CVE-2016-6301 The recv_and_process_client_pkt function in networking/ntpd.c in busybox allows remote… Also affects busybox
- CVE-2016-2148 Heap-based buffer overflow in the DHCP client (udhcpc) in BusyBox before 1.25.0 allows… Also affects busybox
- CVE-2016-2147 Integer overflow in the DHCP client (udhcpc) in BusyBox before 1.25.0 allows remote… Also affects busybox
- CVE-2024-58251 In netstat in BusyBox through 1.37.0, local users can launch of network application with… Also affects busybox
- CVE-2025-46394 In tar in BusyBox through 1.37.0, a TAR archive can have filenames hidden from a listing… Also affects busybox