/

CVE-2026-61876

Severity:

HIGH RISK

(8.8)

Stored Cross-Site Scripting (CWE-79) in LuCI DHCPv6 UI

CVE-2026-61876

Awaiting Analysis

Vulnerability type

Category:

Cross-Site Scripting (XSS)

CWE:

CWE-79

Impact:

Stored Cross-Site Scripting in Web Management UI

Severity:

HIGH RISK

(8.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

LuCI fails to HTML-encode DHCPv6 lease hostnames before rendering them in status tables, enabling injected markup to execute in the administrator's browser.

An attacker on the adjacent network can send a crafted DHCPv6 Client FQDN containing script tags, which will run when an administrator views the DHCP lease page in the LuCI web interface.

Affected context

This vulnerability arises in LuCI's web-based management interface when displaying DHCPv6 lease information in status tables.

The affected context involves environments where:

  • LuCI is used as the administrative interface for routers or network devices
  • DHCPv6 is enabled and processes client-supplied FQDN/hostname data
  • Administrators regularly view DHCP lease or status pages through a web browser

In these conditions, unencoded client hostnames can inject arbitrary HTML into the rendered page.

Exploit preconditions

  • Attack surface: LuCI web interface displaying DHCPv6 lease status pages
  • Required access: Ability to send DHCPv6 requests on the local or adjacent network (e.g., as a connected client or attacker on the same segment)
  • Trigger point: Administrator opens or refreshes the DHCPv6 lease/status page in the LuCI interface
  • Why exploitation is possible: Client-supplied DHCPv6 FQDN/hostname fields are reflected into HTML without proper encoding or sanitization, allowing attacker-controlled markup to be interpreted by the browser

Why this happens

The underlying issue is an output encoding failure in a web management interface.

LuCI takes user-controlled data from DHCPv6 lease records (such as Client FQDN/hostname) and injects it directly into HTML context in the status tables without applying the appropriate escaping or encoding.

This corresponds to CWE-79: Improper Neutralization of Input During Web Page Generation (Cross-Site Scripting), where untrusted data is included in the HTML response without neutralizing characters that have special meaning in HTML or JavaScript.

Potential impact

  • Attackers can execute arbitrary JavaScript in the administrator's browser session
  • Malicious scripts may steal or misuse session information and browser-stored data within the LuCI context
  • Administrative actions could be performed on behalf of the logged-in user via CSRF-like scripted requests
  • Users may be redirected to phishing or malware-hosting sites from the management interface
  • Long-lived malicious payloads may persist as long as the crafted DHCPv6 lease entry remains visible

General mitigation guidance

Defensive measures generally focus on robust output encoding and strict handling of untrusted data in web interfaces:

  • Apply context-aware HTML escaping for all user-controlled fields before rendering them in the UI, especially in tables and status views
  • Use templating frameworks or helper functions that enforce automatic output encoding by default
  • Treat all DHCP-derived hostnames and FQDNs as untrusted input and avoid rendering them as raw HTML
  • Limit the browser's ability to execute dynamic content in administrative pages, for example by adopting a restrictive Content Security Policy tailored to the management UI
  • Separate display logic from data collection, ensuring that network-originated values pass through centralized validation and encoding routines

How teams detect issues like this

Detection efforts can center on both code-level and behavior-level indicators:

  • Use static analysis or linters that flag direct insertion of untrusted variables into HTML templates without encoding
  • During code review, look for concatenation of user or network-sourced data into HTML output, especially in administrative status or logging pages
  • Establish secure coding guidelines mandating context-aware escaping of all variables rendered in views
  • Employ automated security testing and dynamic analysis that injects test payloads into DHCPv6 or similar network inputs to see if they surface unencoded in the UI
  • Integrate web application security scanners into QA processes to identify XSS patterns in management interfaces

Sources

SourceLink
github.comgithub.com/openwrt/luci/security/advisories/GHSA-686p-p8p9-x6fh
vulncheck.comvulncheck.com/advisories/luci-dhcpv6-lease-hostname-stored-cross-site-scripting

Frequently asked

questions

It is primarily exploitable from an adjacent or local network context, as the attacker must be able to send DHCPv6 traffic to the affected device; however, remote scenarios might exist if DHCPv6 services are exposed across wider network boundaries.

The attacker needs the ability to participate on the same or an adjacent network segment as the LuCI-managed device and send crafted DHCPv6 requests; no direct login to the LuCI interface is required, but exploitation relies on an authenticated administrator viewing the affected page.

The safest pattern is to ensure strict, context-aware HTML encoding of all DHCPv6 hostname and FQDN values before rendering them, using standardized escaping routines or templating frameworks that default to safe output.

Future prevention relies on adopting a secure-by-default view layer that encodes output automatically, enforcing coding standards that treat all external input as untrusted, integrating security-focused code review, and using automated tools to detect unescaped variables in HTML-generating code paths.

Find out what's already
exploitable in your codebase.