GHSA-9fg7-wgm7-57fh: RSS status feed does not set content type, leading to a Stored XSS in Public Status Page RSS Feed via CDATA escaped Monitor Name IF USING AN UNSECURE CLIENT
- Published:
- Fetched:
- Updated:
- Affects:
- louislam uptime-kuma
https://github.com/louislam/uptime-kuma/security/advisories/GHSA-9fg7-wgm7-57fh ↗
RSS status feed does not set content type, leading to a Stored XSS in Public Status Page RSS Feed via CDATA escaped Monitor Name IF USING AN UNSECURE CLIENT ### Summary The RSS feed for public status pages returns a default `text/html` content type instead of a safe RSS/XML content type. Monitor names are already CDATA-escaped, so the content itself is safe. However, serving the feed as `text/html` can cause browsers to interpret it incorrectly, potentially exposing users to cross-site scripting if the feed is embedded in a web context. ### Description Monitor names are stored safely and rendered within CDATA sections in RSS feed items. The feed is generated dynamically and returned using `response.send()`. Because no explicit content type is set, the response defaults to `text/html`. While the content is already escaped, serving it as HTML can cause browsers to parse the feed incorrectly, possibly leading to **script execution in certain contexts**, such as embedded feed readers or if the feed is opened directly in a browser. Setting the correct RSS/XML content type ensures browsers interpret the feed safely and reduces risk. ### Affected Code ```js // server/model/status_page.js response.send(await StatusPage.renderRSS(statusPage, slug)); // No Content-Type override (defaults to text/html) ``` ### Impact * Incorrect content type can lead to unsafe rendering in some browsers or feed readers * Low likelihood of XSS due to CDATA escaping, but setting a proper type mitigates potential risk * Affects anyone consuming the RSS feed in a browser context Severity is assessed as **Low**, since user content is already escaped and the risk requires a specific client behavior. ### Recommended Fix * Explicitly set the content type to a safe RSS/XML type: ```js response.type('application/rss+xml'); ``` * Ensure all user-controlled content remains properly escaped in CDATA sections * Optionally, apply a Content Security Policy (CSP) to further mitigate browser risks ### CWE * **CWE-116** – Improper Encoding or Escaping of Output ### References * OWASP XSS Prevention Cheat Sheet – CDATA in XML/RSS * RFC 822 / RSS Security Considerations ### Credits Reported by: Bugbunny.ai Affected packages: :uptime-kuma Patched: uptime-kuma 2.1.0