GHSA-rw5h-g8xq-6877

Suggest an improvement
Source
https://github.com/advisories/GHSA-rw5h-g8xq-6877
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/09/GHSA-rw5h-g8xq-6877/GHSA-rw5h-g8xq-6877.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-rw5h-g8xq-6877
Aliases
Published
2024-09-17T18:33:14Z
Modified
2024-09-17T22:33:53.021208Z
Severity
  • 6.1 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N CVSS Calculator
  • 5.1 (Medium) CVSS_V4 - CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N CVSS Calculator
Summary
Wire UI has a JS XSS Vulnerability on route /wireui/button?label=Content
Details

Summary

A potential Cross-Site Scripting (XSS) vulnerability has been identified in the /wireui/button endpoint, specifically through the label query parameter. Malicious actors could exploit this vulnerability by injecting JavaScript into the label parameter, leading to the execution of arbitrary code in the victim's browser.

Details

The /wireui/button endpoint dynamically renders button labels based on user-provided input via the label query parameter. Due to insufficient sanitization or escaping of this input, an attacker can inject malicious JavaScript. The following URL demonstrates the vulnerability:

https://wireui.dev/wireui/button?label=Cancel&1%25%7ds8dk0%3E%3Cscript%3Ealert(1)%3C/script%3Ez1qt3=1

By crafting such a request, an attacker can inject arbitrary code that will be executed by the browser when the endpoint is accessed.

Proof of Concept (PoC)

To demonstrate the vulnerability, visit the following URL:

/wireui/button?label=<script>alert(1)</script>

Upon loading the page, the injected JavaScript will execute, displaying an alert with the message "1." This confirms the vulnerability and highlights that user input is not being properly escaped or sanitized.

Impact

If exploited, this vulnerability could allow an attacker to execute arbitrary JavaScript code in the context of the affected website. This could lead to:

  • Session Hijacking: Stealing session cookies, tokens, or other sensitive information.
  • User Impersonation: Performing unauthorized actions on behalf of authenticated users.
  • Phishing: Redirecting users to malicious websites.
  • Content Manipulation: Altering the appearance or behavior of the affected page to mislead users or execute further attacks.

The severity of this vulnerability depends on the context of where the affected component is used, but in all cases, it poses a significant risk to user security.

References

Affected packages

Packagist / wireui/wireui

Package

Name
wireui/wireui
Purl
pkg:composer/wireui/wireui

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
1.19.3

Affected versions

v0.*

v0.0.1-alpha
v0.0.1
v0.0.2
v0.0.3
v0.0.4
v0.0.5
v0.0.6
v0.0.7
v0.0.8
v0.0.9
v0.0.10
v0.0.11
v0.0.12
v0.0.13
v0.1.0
v0.2.0
v0.3.0
v0.4.0
v0.5.0
v0.5.1
v0.6.0
v0.6.1
v0.6.2
v0.6.3
v0.6.4
v0.10.0
v0.11.0
v0.11.1
v0.11.3
v0.11.4
v0.11.5
v0.11.6
v0.12.0
v0.13.0
v0.13.1
v0.13.2
v0.13.3
v0.13.4
v0.14.0
v0.14.1
v0.14.2
v0.14.3
v0.15.0
v0.16.0
v0.16.1
v0.16.2
v0.17.0
v0.17.1

0.*

0.7.0
0.7.1
0.8.0
0.8.1
0.8.2
0.9.0
0.9.1
0.9.2
0.9.3
0.9.4
0.11.2

v1.*

v1.0.0
v1.0.1
v1.1.0
v1.1.1
v1.1.2
v1.1.3
v1.2.0
v1.2.1
v1.2.2
v1.3.0
v1.3.1
v1.3.2
v1.4.0
v1.5.0
v1.6.0
v1.6.1
v1.7.0
v1.8.0
v1.8.1
v1.9.0
v1.10.0
v1.11.0
v1.11.1
v1.11.2
v1.11.3
v1.12.0
v1.12.1
v1.12.2
v1.12.3
v1.12.4
v1.12.5
v1.13.0
v1.13.1
v1.13.2
v1.13.3
v1.14.0
v1.14.1
v1.14.2
v1.14.3
v1.15.0
v1.15.1
v1.16.0
v1.16.1
v1.16.2
v1.17.0
v1.17.1
v1.17.2
v1.17.3
v1.17.4
v1.17.5
v1.17.6
v1.17.7
v1.17.8
v1.17.9
v1.17.10
v1.17.11
v1.17.12
v1.17.13
v1.18.0
v1.18.1
v1.18.2
v1.18.3
v1.18.4
v1.18.5
v1.18.6
v1.18.7
v1.18.8
v1.18.9
v1.19.0
v1.19.1
v1.19.2

Packagist / wireui/wireui

Package

Name
wireui/wireui
Purl
pkg:composer/wireui/wireui

Affected ranges

Type
ECOSYSTEM
Events
Introduced
2.0.0
Fixed
2.1.3

Affected versions

v2.*

v2.0.0
v2.0.1
v2.0.2
v2.0.3
v2.0.4
v2.0.5
v2.1.0
v2.1.1
v2.1.2