/

CVE-2026-33046

Severity:

HIGH RISK

(8.8)

Server-Side Code Injection via LaTeX Rendering in Indico

CVE-2026-33046

Analyzed

Vulnerability type

Category:

Server-Side Code Injection via LaTeX Rendering

CWE:

CWE-22, CWE-78

Impact:

Remote Code Execution and Local File Disclosure

Severity:

HIGH RISK

(8.8)

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

Indico's server-side LaTeX rendering can be abused with specially crafted LaTeX snippets that bypass its sanitizer and trigger vulnerable TeXLive behavior.

When server-side LaTeX is enabled, an attacker may read local files or execute arbitrary code with the privileges of the Indico service user on the server.

Affected context

This vulnerability affects Indico deployments that:

  • Have server-side LaTeX rendering enabled (i.e., XELATEX_PATH is set in indico.conf)
  • Use the built-in, non-containerized LaTeX renderer on the same host as the main Indico application
  • Accept user-supplied LaTeX content for things like conference material, badges, or other rendered documents

In such setups, crafted LaTeX input can reach TeXLive in a way that bypasses Indico's sanitizer and interacts with the local filesystem or executes commands.

Exploit preconditions

  • Attack surface: Web-exposed LaTeX-based features (e.g., submission forms, templates, or fields rendered via LaTeX) where users can provide LaTeX content.
  • Required access: Ability to submit or influence LaTeX snippets rendered by the server (typically authenticated users, but depends on site configuration).
  • Trigger point: Indico's server-side LaTeX rendering pipeline, which invokes TeXLive/XeLaTeX with user-controlled input.
  • Why exploitation is possible:
  • The LaTeX sanitizer can be circumvented using obscure or less-common LaTeX syntax and primitives.
  • TeXLive provides capabilities to read local files or interact with the system when invoked with insufficient restrictions.
  • The LaTeX renderer runs with the privileges of the Indico service user, giving that LaTeX code access to the application's environment and filesystem scope.

Why this happens

The underlying problem is the combination of:

  • Insufficient input sanitization and isolation for a powerful embedded language (LaTeX), and
  • Execution of that language in a high-privilege context on the server.

From a vulnerability-class perspective:

  • It maps to CWE-78 (Improper Neutralization of Special Elements used in an OS Command) because LaTeX constructs can ultimately be abused to invoke system-level commands or equivalent effects through TeXLive.
  • It relates to CWE-22 (Improper Limitation of a Pathname to a Restricted Directory) because crafted LaTeX can read local files from paths not intended for exposure.

Abstractly, this is a server-side template / document-rendering injection issue: a complex, Turing-complete or near-Turing-complete templating engine (LaTeX/TeXLive) processes untrusted input with incomplete filtering and without strong sandboxing, giving attackers a path to escalate from content rendering to filesystem and command-level access.

Potential impact

  • Reading sensitive local files that the Indico service user can access (configuration files, logs, or other data).
  • Executing arbitrary OS-level commands with the privileges of the Indico service user.
  • Stealing secrets such as API keys, database credentials, or session tokens stored in readable configuration files.
  • Altering or destroying application data accessible via the compromised account.
  • Pivoting further inside the environment, depending on the permissions and network reach of the compromised service.

General mitigation guidance

Effective mitigation focuses on removing or isolating the risky LaTeX execution path and hardening how untrusted content is handled:

  • Prefer using a containerized or otherwise sandboxed LaTeX renderer that is isolated from the main host OS and file system, and runs with minimal privileges.
  • Where possible, disable server-side LaTeX rendering entirely if the feature is not strictly required, thereby eliminating the attack surface.
  • Apply strict input handling for LaTeX fields:
  • Avoid accepting raw, arbitrary LaTeX in high-risk contexts.
  • Prefer restricted subsets or higher-level markup that is translated to LaTeX in a controlled way.
  • Enforce a least-privilege execution context for rendering:
  • Run the LaTeX renderer as a separate, low-privilege user with minimal file-system access and no direct network or shell access where feasible.
  • Use defense-in-depth controls around the rendering pipeline:
  • Timeouts and resource limits for LaTeX processes.
  • Temporary directories with limited access and automated cleanup.
  • Clear separation between application data and OS/system files.

How teams detect issues like this

Detection typically combines code-level analysis, configuration review, and runtime monitoring:

  • Static and configuration analysis:
  • Search for code paths that pass user-controllable LaTeX directly or with minimal sanitization to the LaTeX renderer.
  • Flag uses of TeXLive/XeLaTeX or similar tooling where:
  • Input originates from HTTP-request parameters or user-editable templates.
  • There is no clear sandbox (container, chroot, dedicated low-privilege user).
  • Review indico.conf (and equivalents) for settings that enable server-side LaTeX and verify whether containerized rendering is used.
  • Code review signals:
  • Custom LaTeX sanitization or filtering logic that attempts to blacklist commands rather than strictly whitelisting safe constructs.
  • Direct invocation of TeX/LaTeX binaries without explicit security flags, sandboxing, or resource limits.
  • Runtime and log monitoring:
  • Monitor LaTeX rendering logs for unusual commands, packages, or file access patterns.
  • Watch for error logs indicating unexpected file reads or long-running LaTeX processes.
  • Use host or container-level monitoring to detect anomalous process trees originating from LaTeX rendering processes.

Automated security scanning and policy enforcement in CI/CD can help surface patterns where complex interpreters like TeX are fed untrusted input without robust isolation.

Sources

SourceLink
github.comgithub.com/indico/indico/commit/0adb70f0ed66e129361d447868f5f3eb90dc5e96
github.comgithub.com/indico/indico/commit/1dbb12525b3de14229bf4d1ae192988068f975f6
github.comgithub.com/indico/indico/commit/5f24d23ce9c4b0e4b68b3d0b58987a948fc57c8a
github.comgithub.com/indico/indico/commit/fb169ced710c30cf792ce4b9f48688db0633cfd8
github.comgithub.com/indico/indico/releases/tag/v3.3.12
github.comgithub.com/indico/indico/security/advisories/GHSA-rm2q-f7jv-3cfp

Frequently asked

questions

Exploitability depends on whether server-side LaTeX rendering is enabled and exposed to user-controlled input. If XELATEX_PATH is set and users can supply LaTeX content, the issue can be remotely exploitable through the web interface. If LaTeX rendering is disabled or fully isolated in a locked-down container, the risk is significantly reduced.

In many deployments, only authenticated users can submit LaTeX content, so a valid account may be required. However, the precise requirement depends on how the site is configured and where LaTeX input is accepted. Any role or endpoint that can influence LaTeX-rendered fields becomes a potential entry point.

The safest pattern is to avoid executing untrusted LaTeX on the main host altogether. This typically means either disabling server-side LaTeX rendering or delegating it to a strongly sandboxed environment (such as a dedicated container with minimal privileges and tightly controlled file-system access), while also applying strict validation to any remaining LaTeX input.

Treat complex document and template engines like TeX/LaTeX as powerful interpreters: never run them on untrusted input without robust sandboxing and tight privilege boundaries. Use whitelisting-based validation for user-supplied markup, separate rendering workloads from core application processes, and incorporate security reviews for any feature that executes or interprets user-controlled content on the server side.

Find out what's already
exploitable in your codebase.