Summary
Tautulli versions prior to 2.17.1 contain a stored cross-site scripting vulnerability where attacker-controlled log entries are rendered into an admin-only HTML log viewer without proper escaping.
An authenticated low-privilege or guest user can inject malicious HTML or JavaScript into the application log and have it execute in an administrator's browser when the log viewer page is opened.
Affected context
This vulnerability occurs in Tautulli deployments that:
- Run a version prior to 2.17.1
- Enable or allow access to the
log_js_errorsendpoint for authenticated users (including guests when guest access is enabled) - Use the administrator-only
logFileview to inspect logs through the web UI
In this context, user-supplied strings written into the main application log are later embedded into an HTML response without escaping when an administrator views the log through the built-in log viewer.
Exploit preconditions
- Attack surface: Tautulli web interface (HTTP/S endpoints)
- Required access: Any authenticated account with access to
log_js_errors, including guest users when guest mode is enabled - Trigger point: Administrator visits the
logFilelog viewer in the Tautulli web UI, which renders previously injected log lines - Why exploitation is possible: The application:
- Accepts attacker-controlled strings via
log_js_errorsand writes them directly to the main log file - Later reads these log entries into an admin-only HTML view and interpolates them into the page without proper HTML/JavaScript escaping or output encoding
Why this happens
The underlying bug is a classic stored cross-site scripting issue where untrusted data is persisted and later rendered into an HTML context without appropriate output encoding.
In this case, the log_js_errors endpoint treats user-controlled input as safe log content and writes it verbatim to the main log file.
The administrator-only logFile view then embeds this log content directly into an HTML page, failing to escape special characters or otherwise neutralize script-executable payloads.
This maps to CWE-79: Improper Neutralization of Input During Web Page Generation (Cross-site Scripting), where application output rendering does not distinguish between data and executable markup.
Potential impact
- Execution of arbitrary JavaScript in the administrator's browser when viewing logs
- Theft of administrator session cookies or tokens (depending on browser and cookie flags)
- Forged administrative actions via DOM manipulation or cross-site request forgery within the admin's session
- Unauthorized configuration changes or exposure of sensitive monitoring data in Tautulli
- Pivoting to other services or accounts if the admin reuses credentials or if additional data is accessible from the compromised browser context
General mitigation guidance
Effective mitigation focuses on enforcing strict output encoding for any untrusted data rendered in HTML views and reducing trust in log content:
- Treat all log data as untrusted input, even if generated by internal endpoints, and apply context-appropriate output encoding (e.g., HTML-escape or render logs as plain text).
- Avoid mixing untrusted content directly into HTML markup; use templating mechanisms that automatically escape variables by default.
- Separate log viewing concerns from raw log storage by introducing a sanitization or normalization step before rendering any stored text.
- Restrict low-privilege and guest access to endpoints that write directly to shared logs, particularly those designed for error reporting or diagnostics.
- Apply the principle of least privilege for application roles so that only necessary users can reach log-writing endpoints and sensitive admin views.
How teams detect issues like this
Detection can focus on both code-level patterns and runtime behavior:
- Static analysis: Flag any views or templates that render log file content, request parameters, or other persisted user-controlled data without explicit HTML encoding.
- Code review: Examine log viewing and diagnostic endpoints to ensure they treat logs as untrusted text and avoid injecting log lines into HTML without escaping.
- Security testing: Use automated or manual web testing tools to inject benign script-like strings into log-generating endpoints, then observe whether they appear unescaped in rendered pages.
- Policy enforcement: Establish development guidelines requiring context-aware output encoding for all template variables and require review for any feature that persists and re-renders user input (e.g., logs, audit trails, comments).

