Wire UI has a JS XSS Vulnerability on route /wireui/button?label=Content
The advisory, in context
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.
Affected packages
Start with the recorded fix for your release branch. Check your installed version and test compatibility before upgrading. Fixing this advisory does not rule out other vulnerabilities in the release.
Earlier releases before 1.19.3
Fixed in 1.19.3
130 explicitly affected versions
0.11.2, 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, v0.0.1, v0.0.1-alpha, v0.0.10, v0.0.11, v0.0.12, v0.0.13, 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.1.0, 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, 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, v1.0.0, v1.0.1, v1.1.0, v1.1.1, v1.1.2, v1.1.3, 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.10, v1.17.11, v1.17.12, v1.17.13, 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.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, 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
View affected-version evidence
{
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "1.19.3"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"0.11.2",
"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",
"v0.0.1",
"v0.0.1-alpha",
"v0.0.10",
"v0.0.11",
"v0.0.12",
"v0.0.13",
"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.1.0",
"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",
"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",
"v1.0.0",
"v1.0.1",
"v1.1.0",
"v1.1.1",
"v1.1.2",
"v1.1.3",
"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.10",
"v1.17.11",
"v1.17.12",
"v1.17.13",
"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.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",
"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"
]
}From 2.0.0 before 2.1.3
Fixed in 2.1.3
9 explicitly affected versions
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
View affected-version evidence
{
"ranges": [
{
"events": [
{
"introduced": "2.0.0"
},
{
"fixed": "2.1.3"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"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"
]
}References
- https://github.com/wireui/wireui/security/advisories/GHSA-rw5h-g8xq-6877
- https://nvd.nist.gov/vuln/detail/CVE-2024-45803
- https://github.com/wireui/wireui/commit/784c4f110e58eb41d0f2bdecd4655ea417f16e7e
- https://github.com/wireui/wireui/commit/a457654912055f4dcc559da04d4e319f76b80fc5
- https://github.com/wireui/wireui