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

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
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