//nefariousplan

CVE-2025-63353: FiberHome's HG6145F1 Default PSK Is the SSID, Inverted

patterns

cve

proof of concept

The factory-default Wi-Fi PSK for a FiberHome HG6145F1 GPON ONT is the literal string wlan followed by the bitwise complement of the device's broadcast SSID. For SSID fh_a1f9d1, the PSK is wlan5e062e. WPA2-PSK's whole purpose is to keep that value off the air. FiberHome's contribution to that purpose, every time it ships an HG6145F1 to a Moroccan ISP customer, a Brazilian fiber subscriber, an Indonesian household, is to make sure the three bytes that determine the PSK are the same three bytes the device announces in every beacon frame, ten times a second.

The PSK is a relabeling of the SSID. The SSID is broadcast.

The derivation is bitwise complement

The PoC repository registered against CVE-2025-63353 ships the algorithm in two scripts, eight lines of substance each. The Python:

SSID_RE = re.compile(r'^fh_([0-9a-f]{6})$', re.IGNORECASE)

def derive_psk(ssid: str) -> str | None:
    m = SSID_RE.match(ssid.strip())
    if not m:
        return None
    hex_a = int(m.group(1), 16)
    hex_b = 0xFFFFFF ^ hex_a
    return f"wlan{hex_b:06x}"

hex_a is the six-character hex suffix of the broadcast SSID, the same six characters a passive Wi-Fi scanner reads off a beacon frame. hex_b is hex_a XORed with 0xFFFFFF, which is bitwise complement across twenty-four bits. The PSK is the literal string wlan concatenated with hex_b printed as six lowercase hex characters.

The Go implementation in the same poc/ directory is byte-equivalent. The text of CVE-2025-63353, as written by the original researcher Hani Anis Bouzid in his November 2025 disclosure and preserved verbatim in his disclosure repo, frames the same operation as subtraction from 0xFFFFFF: "HEX A + HEX B = 0xFFFFFF, so HEX B = 0xFFFFFF - HEX A." For 24-bit operands the subtraction and the XOR produce identical output because subtraction from 0xFFFFFF never carries. The function takes one observable value and returns the secret. It has no key. It has no salt. It is deterministic, total, and its own inverse.

From SSID to LAN, in one XOR

The attack chain is one beacon frame and one association.

An attacker walks past the building. Their phone or laptop is in promiscuous Wi-Fi-scan mode. The scan picks up a beacon containing SSID fh_a1f9d1 and the broadcasting AP's MAC address. The attacker, having seen one beacon, computes 0xFFFFFF XOR 0xa1f9d1 = 0x5e062e and knows the PSK is wlan5e062e. They open the operating system's Wi-Fi connection dialog, type that string into the password field, and associate.

That is the chain. No handshake capture. No offline dictionary attack. No GPU. No waiting for an existing client to authenticate so the four-way handshake can be sniffed. The PSK is not derived from anything ephemeral; it is derived from the beacon, which the device emits whether anyone is listening or not.

Once associated, the attacker has the network position of any other device the subscriber has authorized. The family laptop, the smart TV, the printer with the SMB share, the IP camera, the GPON router's own management interface, are all on the same broadcast domain. The WPA2 boundary the subscriber understood as "people on my street can't see my devices" is gone, in one XOR.

The CVSS vector says network. The bug is Wi-Fi radio range.

The published CVE record's CVSS:3.1 vector is AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H, scoring 9.8 ("Critical"). The original researcher's own submission text, preserved verbatim in his disclosure repo, names the attack vector as "Adjacent network (within Wi-Fi radio range), unauthenticated, no user interaction required."

AV:N is the CVSS:3.1 code for "Network": the metric value for attacks reachable from the public internet. AV:A is the code for "Adjacent Network": attacks requiring proximity on the local segment, including Wi-Fi radio range. The same vector with AV:A substituted for AV:N scores 8.8, "High" instead of "Critical." The bug, by the researcher's own description and by physics, is AV:A. An attacker must be within Wi-Fi radio range of a specific FiberHome HG6145F1 to recover its PSK by this mechanism, and a Wi-Fi radio is not the internet.

One click on the CVSS calculator separates 9.8 from 8.8. The reader looking at "critical, patch immediately" and the reader looking at "high, schedule it" are reading the same bug. Whoever scored this vector chose the wrong category for the attack vector, and the published score is one severity bucket too high.

The population-wide keyspace is the wrong number

The PoC's README does the math. Across all HG6145F1 deployments, the (SSID, PSK) keyspace is at most 2²⁴, roughly 16.7 million distinct pairs. The number is technically correct and editorially misleading.

A 16.7-million-entry rainbow table fits in RAM on a laptop. It is also irrelevant to any attacker who can read one beacon frame. An attacker targeting a specific HG6145F1 does not search 2²⁴ values. They observe one value, the SSID, and compute the matching PSK in a single XOR. The per-device keyspace is one. The relevant number to a defender is not how many distinct PSKs exist in the population; it is how many guesses an attacker against any one device must make. That number is zero, because there is nothing to guess.

The vendor's threat model required one-wayness it did not implement

FiberHome's design intent is reconstructible from the algorithm. Each shipped device needs a default Wi-Fi password. The factory could generate a random 16-byte PSK per device, print it on the sticker, and store nothing on the device side beyond what the device's authenticator was initialized with. That requires a per-device manufacturing step coupled to a per-device random number generator and a database that persists the random PSK against the device's serial.

Alternatively, the device can compute the PSK from a per-device value it already has, the MAC address, and the factory can print both the SSID and the PSK by running the same algorithm offline. FiberHome chose the second option. The SSID fh_<X> is derived from the device's MAC (the six-hex-character suffix is the MAC's last three bytes). The PSK is derived from the SSID. One source of uniqueness (the MAC), three artifacts (the printed SSID, the printed PSK, the firmware's running configuration), one offline algorithm, zero per-device state stored anywhere.

The single requirement that makes the second option safe is that the derivation function from a network-observable input to the PSK has to be infeasible to invert from the broadcast. WPA2 advertises the MAC (as the BSSID) and the SSID in every beacon. Whatever function transforms one of those into the PSK must not be a function an attacker holding the broadcast can compute backwards.

FiberHome chose f(x) = ~x, then prepended wlan. Bitwise complement is its own inverse. There is no key, no salt, no compression, no expansion. The one-way requirement was not met. The cost of the unique-per-device-but-derived-from-MAC scheme has been paid in full (factory line built, sticker pre-printed from MAC, firmware coded to match); the security benefit it was meant to deliver has not been received.

Hash is not entropy. Neither is bitwise complement.

This is the hash-is-not-entropy pattern with the hash removed.

The pattern's canonical exhibit is Allegra's password-reset token, computed as SHA-256(expiration_date). The transform is cryptographic; the input is not. OpenMage's API session ID, computed as md5(time . uniqid('', true) . sessionName), is the same shape with three time-derived inputs. LiteLLM's cache key is token[:20], no hash at all, just a substring; the linked exhibit's gloss flags it as the not-even-a-hash variant.

FiberHome's transform is ~x. Of the catalog of "deterministic function applied to low-entropy input" examples, this is the bare-floor version: no cryptographic step at all, just constant XOR. The pattern's underlying claim is that the entropy of a derived secret is bounded by the entropy of the input region the derivation actually reads. SHA-256, MD5, and substring all preserve that boundary because they are deterministic functions; XOR with a constant preserves it because XOR with a constant is one of the smallest deterministic functions that exists. The mathematical claim does not care whether the function is a hash. The claim is about the function's range relative to its input.

FiberHome's input is twenty-four bits of MAC address, broadcast in every beacon. The output is twenty-four bits of PSK, derived in one instruction. The wlan prefix is decoration.

The CVE-numbered repo is phantom project documentation

A note on the artifact the scanner surfaced. The repository this CVE landed against is github.com/Zvckster/CVE-2025-63353. Its git history is ten commits, twelve minutes of working time, all by one author on May 26, 2026, the day the scanner registered the row. The README describes a project layout:

.
├── README.md
├── LICENSE
├── docs/
│   ├── vulnerability.md          Technical analysis of the algorithm
│   ├── timeline.md               Disclosure chronology and vendor response
│   ├── affected-deployments.md   Device specifications and known deployments
│   ├── related-research.md       Lineage of predictable-PSK vulnerabilities
│   ├── references.md             Curated bibliography
│   └── mitigation.md             Guidance for users, ISPs, and vendors
└── poc/
    ├── python/      pure-Python implementation, no dependencies
    ├── go/          standalone Go binary
    ├── javascript/  browser-friendly JS / Node.js
    └── c/           portable single-file ANSI C (compiles anywhere)

The actual repository contains the README, the LICENSE, poc/fh-poc.py, and poc/fh-poc.go. The docs/ tree does not exist. The four-language poc/ tree does not exist. The README's quick-start tells the reader to run python3 poc/python/fh-poc.py fh_a1f9d1; the actual path is poc/fh-poc.py. The Contributing section directs pull requests to docs/affected-deployments.md; no such file is in the repo. The README's framing positions the project as additive to Bouzid's original disclosure, citing the Medium write-up and the canonical repo at github.com/hanianis/CVE-2025-63353, and promises to extend the disclosure with "multi-language PoC implementations and a curated technical documentation set."

The repo's contents are Bouzid's algorithm in two of the four claimed languages and a README naming files that are not there. This is the phantom-project-documentation shape: README claims a layout, the directory listing does not contain it, and a scanner that polled GitHub for CVE-numbered repositories matched the repo name and registered the README's promises as evidence of a PoC.

The vulnerability is real. The Medium write-up is real. The algorithm reproduced in the two scripts is the algorithm the CVE describes. The two scripts that do exist work, and they implement the bug. What sits around them is documentation about a project that the directory listing does not contain.

What firmware patches do not reach

FiberHome could ship a firmware update that randomizes the PSK at first boot. The fleet of HG6145F1 devices already in subscribers' homes have stickers printed by a factory line that ran the deterministic algorithm. The stickers do not update. The subscriber whose router was provisioned in 2024 has the printed PSK in a kitchen drawer; their model of "the Wi-Fi password" is the printed one. A firmware update that changes the running PSK without changing the sticker creates a support call. A firmware update that does not change the running PSK leaves the broadcast-derivable PSK in place.

The third option, ship firmware that does not change anything and recommend each subscriber rotate their PSK manually, is the option every advisory recommends and the option subscriber populations execute least. The deployment will carry the bug for the device's service life, which on ISP-supplied CPE is measured in years.

PoC: Zvckster/CVE-2025-63353. Original disclosure: hanianis/CVE-2025-63353.

The PSK is a relabeling of the SSID. The SSID is broadcast.