CVE-2026-137487 — OpenWRT Luci-app-unbound — CWE-79
OpenWrt LuCI luci-app-unbound through 26.288.56989~75a306d contains a stored cross-site scripting vulnerability because the Unbound Configure page inserts the dhcp.odhcpd.leasetrigger value into a warning notification without escaping. Users with delegated network configuration access can store an HTML event handler in that option through the permitted uci RPC, which executes in an administrator's browser session when the page renders.
OpenWrt LuCI luci-app-unbound through 26.288.56989~75a306d contains a stored cross-site scripting vulnerability because the Unbound Configure page inserts the dhcp.odhcpd.leasetrigger value into a warning notification without escaping. Users with delegated network configuration access can store an HTML event handler in that option through the permitted uci RPC, which executes in an administrator's browser session when the page renders.
🎯 What is this vulnerability?
Technical flaw
The OpenWRT LuCI web interface (luci‑app‑unbound) renders the value of the dhcp.odhcpd.leasetrigger UCI option inside a warning notification on the Unbound Configure page without any HTML escaping.
The option can be written through the standard UCI RPC interface, which is available to any user that has been granted network configuration privileges.
When an administrator later visits the Unbound Configure page, the stored value is injected into the page’s DOM and is executed as JavaScript in the admin’s browser context.
CWE – CWE‑79 (Cross‑Site Scripting).
CVSS – 7.3/10 (Medium) with vector CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:H.
The high impact (C = H, I = H, A = H) comes from the fact that the XSS runs in the administrator’s session, giving the attacker the same privileges as the admin (session hijacking, cookie theft, arbitrary admin actions, etc.).
⚡ Attack Chain
| Step | What happens | Technical details / example |
|---|---|---|
| 1. Discovery & Reconnaissance | Identify that the target device runs OpenWRT with luci-app-unbound ≤ 26.288.56989~75a306d. | • Scan for the LuCI /cgi-bin/luci endpoint.<br>• Query /cgi-bin/luci/admin/system/uci?config=unbound (or similar) to list installed packages.<br>• Inspect the luci-app-unbound version string in the HTTP headers or via /cgi-bin/luci/admin/system/uci?config=unbound output. |
| 2. Exploitation | Persistently store a malicious payload in dhcp.odhcpd.leasetrigger via the UCI RPC. | Illustrative example (the exact URI may differ; the pattern is typical for LuCI UCI RPC):<br>``bash\ncurl -k -X POST \\\n -d "action=set" \\\n -d "config=dhcp" \\\n -d "option=odhcpd.leasetrigger" \\\n -d "value=<script>alert('XSS')</script>" \\\n https://<router-ip>/cgi-bin/luci/admin/network/unbound\n`<br>Explanation:<br>• action=set tells the UCI RPC to write a value.<br>• config=dhcp selects the DHCP configuration namespace.<br>• option=odhcpd.leasetrigger is the vulnerable option.<br>• value=<script>…</script> is the malicious payload. The request must be authenticated with a session cookie that has network‑configuration rights. |
| 3. Trigger | An administrator visits the *Unbound Configure* page (e.g., /cgi-bin/luci/admin/network/unbound). The page renders the warning notification, inserting the stored value verbatim. | The browser executes the <script> tag in the context of the admin’s session. |
| 4. Post‑exploitation | The attacker can now:<br>• Steal the admin’s session cookie (e.g., via document.cookie).<br>• Perform any action that the admin can, such as modifying firewall rules, changing DNS settings, or installing additional packages.<br>• Persist by re‑injecting the payload or by creating a webshell in the /www directory (if the attacker can write files). | The attacker may also use the stolen session to access other administrative interfaces (e.g., /cgi-bin/luci/admin/system`). |
Note: The exact UCI RPC endpoint and parameter names are inferred from standard LuCI behavior. If the target uses a custom endpoint, the same logic applies: the attacker must write a malicious value to dhcp.odhcpd.leasetrigger via an authenticated RPC call.🌍 Real World Impact
| Impact | Description |
|---|---|
| Confidentiality (C = H) | The attacker can read any data the admin can access, including network configuration, logs, and potentially sensitive files on the router. |
| Integrity (I = H) | The attacker can modify router configuration (e.g., DNS, firewall, routing tables), potentially redirecting traffic or disabling security controls. |
| Availability (A = H) | By tampering with network settings, the attacker can disrupt connectivity for all devices on the network, effectively causing a denial‑of‑service. |
Practical consequences
- Enterprise / ISP routers: A compromised admin session can lead to widespread network outages, data exfiltration, or the installation of backdoors.
- Home / small‑business routers: The attacker can hijack the local network, redirect traffic to malicious sites, or use the router as a pivot point for further attacks.
- Immediate: Apply the patch or upgrade to a fixed version.
- If patching is delayed: Apply the recommended workarounds (restrict UCI RPC, disable the Unbound page, enforce cookie security).
- Monitoring: Enable logging of UCI RPC calls and monitor for suspicious writes to
dhcp.odhcpd.leasetrigger.
🛡️ Remediation & Mitigation
1. Patch
| Affected version | Fix | Upgrade recommendation |
|---|---|---|
luci-app-unbound ≤ 26.288.56989~75a306d | The patch escapes dhcp.odhcpd.leasetrigger before rendering it in the warning notification. | Upgrade to the latest OpenWRT release (≥ 26.288.56990 or later). The changelog for luci-app-unbound explicitly mentions “Fixed XSS in Unbound Configure page by escaping dhcp.odhcpd.leasetrigger”. |
Action: Runopkg update && opkg upgrade luci-app-unboundon the router. Verify the package version withopkg list-installed | grep luci-app-unbound.
2. Workarounds (if patching is not immediately possible)
| Mitigation | How to implement | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Restrict UCI RPC access | Ensure that only the root user or a dedicated admin group can perform uci set on the dhcp namespace. In LuCI, set the uci RPC ACL to deny dhcp.odhcpd.leasetrigger for delegated users. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Disable the Unbound Configure page | Remove or rename the unbound menu entry in LuCI (/etc/config/luci or /usr/lib/lua/luci/controller/unbound.lua). | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| WAF / ModSecurity rule | Add a rule that blocks any POST to the UCI RPC endpoint containing <script> or other HTML tags in the value field. Example (ModSecurity syntax):<br>SecRule REQUEST_URI "@beginsWith /cgi-bin/luci/admin/network/unbound" "phase:2,deny,status:403,msg:'Blocked XSS attempt in dhcp.odhcpd.leasetrigger'"<br>SecRule ARGS:option "dhcp.odhcpd.leasetrigger" "chain"<br>SecRule ARGS:value "@rx <script | onerror | onload | onmouseover | onfocus | onclick | onabort | onblur | onchange | oncontextmenu | oncopy | oncut | ondblclick | ondrag | ondragend | ondragenter | ondragleave | ondragover | ondragstart | ondrop | onerror | onfocus | oninput | oninvalid | onkeydown | onkeypress | onkeyup | onload | onmousedown | onmousemove | onmouseout | onmouseover | onmouseup | onmousewheel | onreset | onresize | onsearch | onscroll | onselect | onsubmit | onunload | onbeforeunload | onhashchange | onmessage | onoffline | ononline | onpopstate | onpushstate | onreadystatechange | onstorage | onunhandledrejection | onvisibilitychange | onwheel | onabort | oncanplay | oncanplaythrough | oncuechange | ondurationchange | onemptied | onended | onerror | onloadeddata | onloadedmetadata | onloadstart | onpause | onplay | onplaying | onprogress | onratechange | onsuspend | ontimeupdate | onvolumechange | onwaiting" "t:none,deny,status:403,msg:'Suspicious script in dhcp.odhcpd.leasetrigger'" |
| Session cookie protection | Force the admin session cookie to be HttpOnly and Secure (if HTTPS is used). This reduces the risk of cookie theft via XSS. |
3. Detection
| Log source | Indicator of Compromise (IoC) |
|---|---|
LuCI UCI RPC logs (/var/log/luci.log or /var/log/messages) | POST requests to /cgi-bin/luci/admin/network/unbound (or similar) with option=odhcpd.leasetrigger and value containing <script> or other HTML tags. |
Web server access logs (/var/log/httpd/access.log) | Requests to /cgi-bin/luci/admin/network/unbound with suspicious User-Agent strings or repeated failed authentication attempts. |
| Browser console (admin side) | Unexpected alert() or console errors indicating injected script execution. |
Tip: Use a simple grep to spot the pattern:
grep -i 'odhcpd.leasetrigger' /var/log/luci.log | grep -i '<script'⚠️ Urgency
| Factor | Assessment |
|---|---|
| CVSS Score | 7.3 (Medium) but with C = H, I = H, A = H. |
| Exploit Complexity | High (requires network‑config privileges and user interaction). |
| CISA KEV | Not listed. |
| Potential Impact | Full admin compromise → network takeover, data exfiltration, service disruption. |
| Patch Availability | Yes – the fix is in the next OpenWRT release. |
Priority: High.
By addressing the flaw promptly, you eliminate the vector that allows an attacker to hijack an administrator’s session and gain full control over the router and the network it serves.
[🤖 CVE Professor AI Security Engine]
FOFA Query