Skip to content

Reflected Cross Site Scripting in OpenWRT LuCI Web Interface.

Moderate
abbcdec published GHSA-9gqg-pp5p-q9hg Mar 24, 2023

Package

/luci-app-openvpn/luasrc/view/openvpn/pageswitch.htm (OpenWRT LuCI)

Affected versions

OpenWrt 22.03.3

Patched versions

None

Description

Impact

An attacker can send this URL with a malicious payload to genuine Luci user which can lead to execution of payload on Luci console. It can lead to session hijacking attacks. The vulnerability can further help attackers to bypass protection mechanism like same origin policy (CSP) and Anti-CSRF tokens.

Proof of Concept

  1. Login to Luci Console using valid credentials.
  2. Paste below payload in Browser window.

Payload: <img src=a onerror=alert('xss')>

https://{your-luci-ip}/cgi-bin/luci/root/vpn/openvpn/basic/sample_serverjyo69%3Cimg%20src%3da%20onerror%3dalert('xss')%3Ezja1d

You will see JavaScript being executed and XSS pop-up will appear. Please find attached Proof of concept video for more details.

luci-reflected-xss

Patches

openwrt/luci@25983b9
openwrt/luci@749268a

Workarounds

It is recommended to pull the patch from the OpenWRT LuCi Repository to mitigate this vulnerability.

Severity

Moderate
5.4
/ 10

CVSS base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N

CVE ID

CVE-2023-24181

Weaknesses

Credits