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_PATHis set inindico.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.

