Skip to content

Attribute Injection leading to XSS(Cross-Site-Scripting)

Moderate severity GitHub Reviewed Published Nov 24, 2023 in louislam/uptime-kuma • Updated Dec 7, 2023

Package

npm uptime-kuma (npm)

Affected versions

>= 1.20.0, <= 1.23.6

Patched versions

1.23.7

Description

Summary

Google Analytics element Attribute Injection leading to XSS

Details

Since the custom status interface can set an independent Google Analytics ID and the template has not been sanitized, there is an attribute injection vulnerability here, which can lead to XSS attacks.
image

PoC

  1. Run the latest version of the louislam/uptime-kuma container and initialize the account password.
  2. Create a new status page.
  3. Edit the status page and change the Google Analytics ID to following payload(it only works for firefox. Any attribute can be injected, but this seems the most intuitive):
123123" onafterscriptexecute=alert(window.name+1),eval(window.name) a="x
  1. Click Save and return to the interface. XSS occurs.
    screenshots:
    image

9d0603e634fb7da2e83a0a45dc0a36ac

References

@louislam louislam published to louislam/uptime-kuma Nov 24, 2023
Published to the GitHub Advisory Database Nov 24, 2023
Reviewed Nov 24, 2023
Published by the National Vulnerability Database Dec 1, 2023
Last updated Dec 7, 2023

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
None
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:N/UI:R/S:C/C:L/I:L/A:N

EPSS score

0.053%
(22nd percentile)

Weaknesses

CVE ID

CVE-2023-49276

GHSA ID

GHSA-v4v2-8h88-65qj

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.