# CVE-2023-49276: Attribute Injection leading to XSS(Cross-Site-Scripting) in uptime-kuma

> Attackers can inject malicious scripts via unsanitized Google Analytics IDs in the custom status interface, leading to XSS attacks.

- **Severity:** Medium 6.3 (`CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 1 Dec 2023
- **Updated:** 2 Aug 2024
- **Also known as:** GHSA-v4v2-8h88-65qj

## What is CVE-2023-49276?

CVE-2023-49276 is a medium-severity cross-site scripting vulnerability in louislam uptime-kuma, published on 1 Dec 2023. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

### Official description

Uptime Kuma is an open source self-hosted monitoring tool. In affected versions the Google Analytics element in vulnerable to Attribute Injection leading to Cross-Site-Scripting (XSS). 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. This vulnerability has been addressed in commit `f28dccf4e` which is included in release version 1.23.7. Users are advised to upgrade. There are no known workarounds for this vulnerability.

Weakness: CWE-79 (Improper Neutralization of Input During Web Page Generation)

## Which versions are affected by CVE-2023-49276?

2 open source packages ship an affected version, including uptime-kuma. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `uptime-kuma` | npm | From 1.20.0 | 1.23.7 |
| `uptime-kuma` | npm | From 1.20.0 | 1.23.7 |

Products: Uptime.kuma Uptime Kuma.

## How do I fix CVE-2023-49276?

Upgrade uptime-kuma to 1.23.7 or later.

## Is CVE-2023-49276 being exploited?

There is no known exploitation of CVE-2023-49276 in the wild and no public exploit code.

## Other vulnerabilities in louislam uptime-kuma

- [CVE-2023-44400](https://insights.sbomify.com/CVE-2023-44400/): Uptime Kuma has Persistentent User Sessions (medium 6.7)
- [CVE-2026-33130](https://insights.sbomify.com/CVE-2026-33130/): Uptime Kuma: SSTI in Notification Templates Allows Arbitrary File Read (Incomplete Fix for GHSA-vffh-c9pq-4crh) (medium 6.5)
- [CVE-2026-32230](https://insights.sbomify.com/CVE-2026-32230/): Uptime Kuma is Missing Authorization Checks on Ping Badge Endpoint, Leaks Ping times of monitors without needing to be on a status page (medium 5.3)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2023-49276 and fix it if it is affected.

What it is: CVE-2023-49276 is a medium-severity cross-site scripting vulnerability in louislam uptime-kuma, published on 1 Dec 2023. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2023-49276 in the wild and no public exploit code.

Affected packages and fixed versions:
- uptime-kuma (npm): affected from 1.20.0; fixed in 1.23.7
- uptime-kuma (npm): affected from 1.20.0; fixed in 1.23.7

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2023-49276/ (Markdown: https://insights.sbomify.com/CVE-2023-49276/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2023-49276
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2023-49276
- OSV: https://osv.dev/vulnerability/CVE-2023-49276

---
From sbomify Insights: https://insights.sbomify.com/CVE-2023-49276/
Summaries are generated and may contain mistakes; the official description above is the record.
