/

CVE-2026-28505

Severity:

CRITICAL RISK

(10.0)

Improper Code Execution Control in Tautulli Notification

CVE-2026-28505

Analyzed

Vulnerability type

Category:

Improper Code Execution Control

CWE:

CWE-94, CWE-95

Impact:

Arbitrary Code Execution within the Tautulli Process

Severity:

CRITICAL RISK

(10.0)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Tautulli's notification template engine implements a sandboxed eval-like function that attempts to restrict what Python code can run in customized notification texts.

Due to incomplete inspection of nested lambda code objects, an attacker who can control notification templates may be able to execute arbitrary Python code despite the sandbox restrictions.

Affected context

This vulnerability appears in Tautulli's notification handling subsystem, specifically in the str_eval() function used to render dynamic notification text templates.

It becomes relevant when:

  • Users or integrated systems can supply or influence template expressions evaluated by str_eval()
  • The application relies on str_eval()'s sandbox to block access to dangerous attributes and callables
  • Lambda expressions or other nested constructs are permitted in template expressions

The issue affects environments where template authorship is not fully trusted, or where a lower-privileged user can create or modify notification templates.

Exploit preconditions

  • Attack surface: Notification text templates evaluated by Tautulli's str_eval() function.
  • Required access: Ability to create, edit, or indirectly control notification templates or expressions (e.g., through UI, configuration, or synced settings).
  • Trigger point: Submission of a crafted expression that uses lambda or nested code objects so that dangerous attribute accesses reside in code.co_consts rather than code.co_names.
  • Why exploitation is possible: The sandbox only inspects code.co_names of the top-level compiled code object to restrict names, but it does not recursively inspect nested code objects (e.g., from lambdas). As a result, restricted attributes and callables can be referenced inside nested code, bypassing the intended name-based restrictions.

Why this happens

The core issue is an overreliance on Python bytecode metadata (code.co_names) to enforce a security policy for dynamic expression evaluation.

The str_eval() function compiles user-controlled expressions and attempts to detect and block dangerous names by examining the top-level code object's co_names. However, lambda expressions and other nested constructs generate separate code objects whose attribute accesses and references may appear in code.co_consts instead.

Because the sandbox does not traverse or analyze these nested code objects, it leaves an unchecked path for invoking restricted attributes or functions. This maps to:

  • CWE-94: Improper Control of Generation of Code ('Code Injection') — user-influenced input ultimately controls dynamically evaluated code.
  • CWE-95: Improper Neutralization of Directives in Dynamically Evaluated Code — filters and checks fail to neutralize dangerous directives in evaluated expressions, especially within nested contexts.

Potential impact

  • Execution of arbitrary Python code within the Tautulli process context
  • Reading or modification of Tautulli configuration, logs, and in-memory data
  • Access to environment variables, including secrets or tokens available to the process
  • Local file read/write where the Tautulli service account has permissions
  • Use of Tautulli as a pivot to further compromise the underlying host or connected services

General mitigation guidance

Effective mitigation focuses on eliminating or strictly constraining dynamic code evaluation for user-controlled template data:

  • Prefer non-evaluating templating mechanisms (e.g., simple variable interpolation and filters) rather than eval()-style execution of arbitrary expressions.
  • If expression evaluation is required, use a dedicated, security-focused expression language or sandbox that does not expose Python's full execution environment.
  • Treat all template input as untrusted: clearly separate trusted system-defined functions/variables from user-supplied content, and expose only a narrow whitelist of safe operations.
  • Avoid implementing ad-hoc eval sandboxes based solely on bytecode inspection or name filtering; instead, use interpreters or libraries designed for restricted execution.
  • Run the Tautulli process with least-privilege OS permissions to reduce the blast radius if code execution occurs.

How teams detect issues like this

Organizations can look for and monitor insecure dynamic evaluation patterns and template abuse by:

  • Static analysis focused on:
  • Use of eval(), exec(), or custom equivalents that accept non-constant input
  • Custom sandbox implementations that rely on introspection of code objects or simple name-based filtering
  • Code review practices that flag:
  • Any path where user-supplied text is compiled or evaluated as code
  • Complex notification or templating logic implementing partial Python interpreters
  • Security testing:
  • Fuzzing and targeted tests of template/notification input fields with nested expressions and lambda constructs
  • Attempting to reference restricted attributes through multiple levels of indirection or nested scopes
  • Policy enforcement:
  • Coding guidelines that disallow direct or indirect evaluation of user-controlled strings as Python code
  • CI checks that fail builds if disallowed evaluation APIs or patterns are introduced

Sources

SourceLink
github.comgithub.com/Tautulli/Tautulli/releases/tag/v2.17.0
github.comgithub.com/Tautulli/Tautulli/security/advisories/GHSA-m62j-gwm9-7p8m

Frequently asked

questions

It can be, depending on how Tautulli is exposed. If attackers can remotely create or modify notification templates, or influence fields that end up in str_eval(), they may trigger arbitrary code execution remotely. In more locked-down setups, exploitability may be limited to authenticated or local users.

The attacker must be able to control, directly or indirectly, the expressions passed into the str_eval() notification template mechanism. This typically requires some degree of configuration or template-editing capability within Tautulli or an integrated system that feeds these templates.

Remove or replace direct dynamic code evaluation of templates with a non-Turing-complete templating system, exposing only a well-defined set of safe variables and filters. Avoid ad-hoc evaluation sandboxes and do not rely on bytecode-level name filtering to enforce security boundaries.

Design features so that user-supplied data is treated strictly as data, not as executable code. When dynamic behavior is needed, use restricted expression languages or template engines built with security in mind, enforce allowlists of safe operations, and institutionalize code review rules that prohibit evaluating user-controlled strings as code.

Find out what's already
exploitable in your codebase.