CVE-2026-125399
Fluxion Unauthenticated OS Command Injection via Crafted SSID
Zero-Click, Unauthenticated OS Command Injection via eval() on Attacker-Controlled ESSID
Technical Report
Unauthenticated Remote Command Injection via eval() on Attacker-Controlled ESSID in Fluxion
| Product | Fluxion (FluxionNetwork/fluxion) |
| Version Tested | v6.32 (also present in current GitHub master, internal version string FLUXION V6.38) |
| Vulnerability Class | CWE-78 (OS Command Injection) via CWE-95 (Eval Injection), root cause also involves CWE-20 (Improper Input Validation of untrusted 802.11 data) |
| Affected Component | fluxion.sh → fluxion_get_target(), lines ~1839–1844 |
| Attack Vector | Adjacent (IEEE 802.11 / Wi-Fi radio range) |
| Privileges Required | None (on the attacker's side) |
| User Interaction | None (the victim only needs to run a routine Wi-Fi scan) |
| Privileges Gained | Same privileges as the Fluxion process — typically root (required for monitor-mode operations) |
| CVSS 3.1 | AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H → 8.8 (High), trending toward Critical in practice given the typical root execution context |
| CVE | CVE-2026-125399 |
| Status | Patched (v6.39) |
| Discovery Date | November 4, 2026 |
| Vendor Notification Date | November 4, 2026 |
1. Executive Summary
Fluxion builds its list of candidate Wi-Fi access points by parsing the CSV output of airodump-ng. To render non-ASCII bytes that may appear in a network's SSID, the code passes the SSID field through Bash's eval builtin after applying a single, incomplete sanitization step (escaping embedded single-quote characters). Because this sanitization does not account for a pre-existing backslash character immediately preceding a single quote in the SSID, an attacker broadcasting a Wi-Fi access point with a crafted SSID can break out of the intended quoting context and cause arbitrary shell commands to be executed by eval.
Critically, this code path runs unconditionally for every access point discovered during a scan, before the operator is even shown the target-selection list. No attack mode needs to be chosen, no target needs to be selected, and no further interaction is required from the person running Fluxion — simply scanning for nearby networks is sufficient to trigger the vulnerability. Since Fluxion typically must run as root to place a wireless interface into monitor mode, the attacker-controlled command executes with root privileges.
2. Vulnerability Details
2.1 Classification
- CWE-78 – Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
- CWE-95 – Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval Injection') – the proximate root cause
- CWE-20 – Improper Input Validation of data received over an untrusted channel (the 802.11 SSID information element, fully attacker-controlled)
2.2 CVSS v3.1 Vector Breakdown
| Metric | Value | Rationale |
|---|---|---|
| AV | Adjacent | Only Wi-Fi radio proximity is required, not network authentication or prior association |
| AC | Low | The payload is a static, reliably-crafted SSID string; no race condition or timing dependency |
| PR | None | No credentials required |
| UI | None | No victim interaction beyond a routine scan |
| S | Unchanged | |
| C/I/A | High/High/High | Arbitrary command execution, typically as root, on the operator's machine |
Base Score: 8.8 (High)
2.3 Root Cause — Affected Code
File: fluxion.sh, function fluxion_get_target(), approximately lines 1839–1844:
# Parse any non-ascii characters by letting bash handle them.
# Escape all single quotes in ESSID and let bash's $'...' handle it.
local sanitizedESSID=$(
echo "${candidateAPInfo//\'/\\\'}" | cut -d , -f 14
)
candidatesESSID[i]=$(eval "echo \$'$sanitizedESSID'")
candidateAPInfo is one CSV row produced by airodump-ng for a detected access point; field 14 is the network's ESSID (SSID), which per the 802.11 standard is an attacker-controlled, free-form byte string of up to 32 bytes. The only sanitization applied is replacing every literal single-quote character (') in the SSID with an escaped single quote (\'), after which the result is embedded inside a Bash ANSI-C-quoted string ($'...') and passed to eval.
2.4 Sanitization Bypass Mechanism
The substitution ${candidateAPInfo//\'/\\\'} only rewrites quote characters that are already present in the SSID; it does not account for a backslash character the attacker places immediately before one of those quotes. If the SSID begins with the two literal bytes \ (backslash) and ' (single quote), the substitution turns that pair into three characters: \\' (backslash, backslash, quote).
When this is evaluated inside Bash's $'...' ANSI-C quoting, the sequence \\ is a recognized escape that decodes to a single literal backslash and is consumed as one unit. The quote character that immediately follows is therefore no longer escaped and is interpreted as the real, closing delimiter of the $'...' string. Any text the attacker places after that quote is parsed as ordinary shell syntax by eval and executed.
2.5 Proof-of-Concept Payload (harmless, for evidentiary purposes)
An SSID consisting of the following literal bytes (21 bytes, well within the 32-byte 802.11 SSID limit) is sufficient:
\'; touch /tmp/pwned #
| Byte(s) | Purpose |
|---|---|
\ |
A literal backslash, immediately before a quote, to defeat the sanitizer |
' |
Combined with the escaped quote produced by the sanitizer, closes the Bash $'...' string early |
; |
Shell command separator, starts a new command inside the eval'd line |
touch /tmp/pwned |
Arbitrary attacker-chosen command (proof-of-concept payload) |
# |
Comments out the remainder of the original eval'd line so it fails safely |
The resulting literal string that reaches eval is of the form eval "echo $'...\\'; touch /tmp/pwned #...'", which Bash parses as: print the (truncated) SSID text, then separately execute touch /tmp/pwned, then treat the rest of the original line as a comment.
3. Zero-Click Characteristics and Payload Concealment
3.1 This Is a Zero-Click Vulnerability
What makes this vulnerability especially severe is that it requires no deliberate interaction from the victim whatsoever:
- The victim never needs to see, select, target, or otherwise interact with the attacker's access point in any way.
- All that is required is for the victim to run Fluxion for its normal, intended purpose and perform a routine Wi-Fi scan — an action every user of the tool inevitably performs regardless of what they intend to do afterward.
- The injection fires automatically the moment the attacker's AP is merely physically present among the scanned networks, before any selection screen is ever shown to the operator.
- This meets the textbook definition of "zero-click": the attacker never needs the victim to take any action (clicking, confirming, connecting, authenticating) to execute the payload; the victim's ordinary use of the tool is, by itself, sufficient.
3.2 The Payload Is Structurally Hidden From the Victim
The "concealment" here does not come from the attacker visually disguising the SSID — it comes from the architecture of the vulnerable code path itself:
- The vulnerable
evalcall executes whilefluxion_get_target()is building the candidate-network list, i.e. strictly before that list is ever displayed to the operator. - As a result, there is never a moment, even after the command has already executed, at which the victim could have noticed the suspicious SSID and made a decision.
- Additionally, within the 32-byte SSID limit, an attacker can keep the visible/printable portion of the payload short or combine it with non-printable control bytes, so that even if the network list were later surfaced somewhere, the SSID would appear as an ordinary or garbled string rather than an obvious attack string.
- In short, what "hides" the payload is not encryption or obfuscation but the fact that the vulnerable code executes the payload before any opportunity for visual inspection exists.
3.3 Injection Point: The SSID/ESSID Field
To be explicit: the single injection point for this attack is the SSID (Service Set Identifier), i.e. the ESSID field, broadcast by the attacker's access point in its beacon/probe response frames. All the attacker needs to do is:
- Configure an access point under their control (e.g. via
hostapd) to broadcast the payload from Section 2.5 as its network name (SSID/ESSID). - No other protocol field (BSSID, encryption settings, channel, etc.) needs to be modified, and no special hardware is required — a standard Wi-Fi access point/adapter is sufficient.
- On the victim's side, the only trigger condition is that this SSID is seen/scanned by the device running Fluxion; the victim does not need to connect to this network or select it as a target.
4. Trigger Path and Attack Flow
The vulnerable code sits in fluxion_get_target(), the single shared routine Fluxion uses to build and display the candidate-network list for every attack module (Handshake Snooper, Captive Portal, etc.). It is invoked unconditionally as part of ordinary target scanning, at fluxion.sh:2499 (fluxion_get_target "$targetInterface").
Attack flow, as reproduced in the lab:
- Attacker: Configure a Wi-Fi access point (e.g. via
hostapd) to broadcast the crafted SSID described in Section 2.5. No special radio hardware beyond a standard Wi-Fi AP/adapter is required. - Victim: Run Fluxion normally and perform a routine access-point scan (any attack module, or headless mode via
--scan-only). The victim does not need to select, target, or otherwise interact with the attacker's access point. - Automatic (inside Fluxion): After the scan completes,
fluxion_get_target()iterates over every discovered access point (fluxion.sh:1783) to build the on-screen candidate list, reaching the vulnerableevalcall at line 1844 for the attacker's entry before the selection menu is ever shown to the victim. - Impact: The injected command executes immediately, inheriting Fluxion's privilege level (root, in the standard configuration required for monitor-mode Wi-Fi operations).
No attack-mode dependency: because fluxion_get_target() is shared infrastructure used by every attack module, the choice of attack is irrelevant to triggering this issue — only the act of scanning matters.
5. Lab Reproduction Evidence
Evidence obtained in an isolated lab environment:
$ ls -la /tmp/pwned
-rw-r--r-- 1 root root 0 Nov 1 15:33 /tmp/pwned
The file's root:root ownership confirms that the injected command ran with root privileges.
6. Secondary Related Finding (Lower Confidence — Unverified)
In attacks/Captive Portal/attack.sh (approximately lines 1208–1224), the attacker-controlled SSID ($FluxionTargetSSID, derived from the same ESSID field) is interpolated, unescaped, into a shell command string stored in the variable verifiedCondition:
local -r verifiedCondition="cowpatty -f \"$FLUXIONWorkspacePath/candidate.txt\" \
-r \"$CaptivePortalHashPath\" -s \"$FluxionTargetSSID\" &>> $FLUXIONOutputDevice"
This string is later written into a generated helper script (captive_portal_authenticator.sh) and executed via unquoted variable expansion (if $verifiedCondition; then). Because Bash performs command substitution for $(...) and backticks even inside double quotes, an SSID containing a command substitution sequence (e.g. $(touch /tmp/pwned2)) is expected to execute when this code path runs.
Note: Unlike the primary finding, this path requires the attacker's network to be actively selected as the Captive Portal target and was not independently reproduced during this assessment. It is included here for completeness and should be verified by the maintainers alongside the primary finding, as both stem from the same root cause.
7. Impact
- Full compromise of the operator's machine, typically with root privileges, from arbitrary devices within Wi-Fi range.
- No authentication, pairing, or prior relationship with the victim's wireless network is required — the attacker's rogue AP need not even use a channel/band the victim intends to audit; it only needs to be visible during the scan.
- No victim interaction beyond routine use of the tool — this is especially severe because Fluxion is itself a security-testing tool typically run by penetration testers and security researchers, who could be compromised while auditing a client's wireless environment.
- Practical consequences include planting persistence/backdoors, credential theft, pivoting into the operator's network, or destructive actions — all at the privilege level Fluxion runs with (commonly root).
References
Researcher: Umut SEVİNÇ (VulnSVNC)
