{"vuln_id":"CVE-2026-62948","aliases":["GHSA-hhmc-92hw-535f"],"description":"odhcpd/LuCI: unauthenticated DHCPv6 client can inject lease-file lines via FQDN hostname → stored XSS in the LuCI admin UI","published_at":"2026-06-29T22:56:13Z","modified_at":"2026-07-14T22:51:15Z","first_seen_at":"2026-11-22T13:40:33.558962Z","severity":"critical","severity_source":"ghsa","cvss_score":9.6,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H","cwe":["CWE-79","CWE-117","CWE-150"],"vendor":null,"product":null,"kev":{"is_kev":false,"date_added":null,"due_date":null,"ransomware":false},"epss":0.0058,"epss_percentile":0.48591,"nvd_status":null,"enriched_at":null,"links":{"nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-62948"},"matched_alias":null,"items":[{"id":12265,"source":{"id":"gh-openwrt","name":"OpenWrt releases + advisories (GitHub openwrt/openwrt tags)"},"title":"GHSA-hhmc-92hw-535f / CVE-2026-62948: odhcpd/LuCI: unauthenticated DHCPv6 client can inject lease-file lines via FQDN hostname → stored XSS in the LuCI admin UI","summary":"odhcpd/LuCI: unauthenticated DHCPv6 client can inject lease-file lines via FQDN hostname → stored XSS in the LuCI admin UI ## Summary `odhcpd` writes a DHCPv6 client's requested hostname (its FQDN option, opt 39) into the lease state file `/tmp/odhcpd.leases` via `fprintf(\"…%s…\", lease->hostname)` with **no escaping**. The hostname is decoded by `dn_expand()`, which copies DNS-label bytes **verbatim** — including `0x0a` (newline). A single newline **injects an arbitrary additional line** into the lease file. That file is parsed by LuCI's `rpcd-mod-luci` `getDHCPLeases` (`fgets`+`strtok`, lines beginning `# `) and shown in the **\"Active DHCPv6 Leases\"** admin status page. LuCI renders the host cell through `dom.append` → `node.innerHTML` **without HTML-escaping**, so an attacker-controlled hostname becomes **live markup in the privileged admin DOM** — an unauthenticated, pre-association **stored XSS** in the device management UI. One unauthenticated DHCPv6 REQUEST forges a lease record: ```jsonc // what getDHCPLeases returns after the injection (the forged record): { \"interface\": \"br-lan\", \"hostname\": \"\", \"duid\": \"dd\", \"iaid\": \"1\", \"ip6addr\": \"fd1a:bf1c:9075::1ed\" } ``` ## Environment / affected range - **Component (injection):** `odhcpd` — `src/statefiles.c` `statefiles_write_state6()` (DHCPv6, line ~498) and `statefiles_write_state4()` (DHCPv4, ~533, identical pattern). - **Component (render sink):** LuCI — `luci-mod-status` (`htdocs/luci-static/resources/view/status/include/40_dhcp.js`) + `luci-base` (`htdocs/luci-static/resources/luci.js`, `dom.append`); back-end `rpcd-mod-luci` `getDHCPLeases` (`/usr/lib/rpcd/luci.so`). - **Hunt corpus:** odhcpd `main` @ `1782f3f` (`PKG_SOURCE_DATE=2026-06-04`), zero downstream patches. - **Live-validated build:** OpenWrt **25.12.4** (`r32933-4ccb782af7`, x86/64), kernel 6.12.87, musl; `odhcpd-ipv6only-2026.03.16~edf2e523-r1`; `rpcd-mod-luci-20240305`; `luci-base 26.133`. odhcpd runs on `br-lan`, `dhcp.lan.dhcpv6='server'`, `leasefile=/tmp/odhcpd.leases` — **all defaults**. - **Affected range:** `statefiles.c` is **byte-identical at upstream HEAD `03dacc2`** — present and **unfixed**. The deployed 25.12.4 binary `/usr/sbin/odhcpd` carries the exact format strings (`# %s %s %x %s%s …` and the `broken\\x20` marker). - **CWE-117** (improper output neutralization for logs) / **CWE-150** (improper neutralization of escape sequences) in odhcpd → **CWE-79** (stored XSS) in LuCI. ## Topology The attack rides the LAN as an ordinary unauthenticated DHCPv6 client; the XSS fires when an admin later opens the leases status page. ``` LAN segment br-lan (fw4 zone lan: input ACCEPT) +-------------------------+ +----------------------------------+ | Attacker (on-link) | DHCPv6 SOLICIT/REQUEST | OpenWrt DUT 25.12.4 10.0.2.2 | | fe80::a0a4:d5ff:... | with OPTION_FQDN(39) = | odhcpd [::]:547 (br-lan) | | unauth DHCPv6 client | \"x\\n# br-lan dd 1 Affected packages: :odhcpd/luci","url":"https://github.com/openwrt/openwrt/security/advisories/GHSA-hhmc-92hw-535f","published_at":"2026-06-29T22:56:13Z","updated_at":"2026-07-14T22:51:15Z","fetched_at":"2026-11-22T13:40:33.544620Z","severity":"critical","cvss_score":9.6,"epss":0.0058,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":"openwrt","product":"odhcpd/luci","vuln_id":"CVE-2026-62948","vuln_ids":["CVE-2026-62948","GHSA-HHMC-92HW-535F"],"tags":["repo-advisory","","CWE-79","CWE-117","CWE-150","security","repo:openwrt/openwrt"],"cluster_id":11482,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/12265","html":"https://vulnwatch.ve1ve2.com/item/12265"}}]}