/

CVE-2026-34724

Severity:

HIGH RISK

(7.2)

Server-Side Template Injection in Zammad AI Agent Type

CVE-2026-34724

Analyzed

Vulnerability type

Category:

Server-Side Template Injection

CWE:

CWE-94, CWE-1336

Impact:

Remote Code Execution on Application Server

Severity:

HIGH RISK

(7.2)

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

Zammad contained a server-side template injection vulnerability in its AI Agent type enrichment feature that could lead to remote code execution on the server.

The issue becomes exploitable when an attacker can control or significantly influence type_enrichment_data, a capability typically restricted to high-privilege administrative users or compromised configuration channels.

Affected context

This vulnerability manifests in Zammad deployments that:

  • Enable and use the AI Agent or related type enrichment functionality
  • Process type_enrichment_data through a server-side templating engine
  • Allow high-privilege users or automated systems to define or modify enrichment templates or configuration values

The risk is most pronounced in environments where administrative or integration interfaces can be misused, or where configuration is synchronized from external, partially trusted systems.

Exploit preconditions

  • Attack surface: Web-based application paths that invoke the AI Agent / type enrichment logic on the Zammad server.
  • Required access: Ability to control or influence type_enrichment_data, typically requiring administrative-level access, API keys, or compromise of configuration/integration systems.
  • Trigger point: Evaluation or rendering of the enrichment data by the underlying server-side template engine as part of AI Agent processing.
  • Why exploitation is possible: Untrusted or insufficiently validated template content is interpreted by a powerful server-side template engine that can execute arbitrary expressions or commands, enabling code execution in the application context.

Why this happens

The core issue is the execution of attacker-influenced template content on the server side, aligning with CWE-94: Improper Control of Generation of Code ('Code Injection').

The AI Agent type enrichment logic appears to treat type_enrichment_data as trusted input, passing it directly or with weak validation into a server-side templating engine capable of executing dynamic expressions.

Because template syntax can be used to access internal objects, invoke methods, or execute commands, any control over this content effectively becomes control over server-side code execution.

This pattern also relates to CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine, where user-controlled or externally sourced data is embedded into templates without strict sanitization, context-aware encoding, or use of a restricted expression dialect.

Potential impact

  • Remote execution of arbitrary code within the Zammad application server process.
  • Reading or modification of sensitive ticket data, user information, and configuration stored by the helpdesk system.
  • Use of the compromised Zammad server as a foothold for lateral movement within the hosting environment.
  • Exfiltration of credentials, API keys, or integration tokens configured within Zammad.
  • Disruption of helpdesk operations, including denial of service or tampering with AI Agent behavior and responses.

General mitigation guidance

Effective mitigation generally involves removing the capability for untrusted template execution and reducing the power of any templating mechanisms that remain:

  • Avoid interpreting configuration or enrichment data as executable template code; treat it as plain data wherever possible.
  • Where templating is required, use a restricted template engine or sandboxed expression language that cannot access arbitrary server objects or execute system commands.
  • Enforce strict validation and whitelisting for configuration fields like type_enrichment_data, limiting allowed syntax, operations, and data types.
  • Ensure that only least-privilege roles can modify AI Agent or enrichment configurations, and review which integrations or automated systems can influence them.
  • Segment the component that evaluates templates from core infrastructure and run it under a locked-down runtime account with minimal OS and network permissions.
  • Prefer declarative configuration formats over script-like or expression-capable templates, especially for security-sensitive features such as AI-driven automations.

How teams detect issues like this

Detection of similar vulnerabilities typically combines code-centric and operational approaches:

  • Static analysis: Search for usages of server-side template engines where configuration or database-backed fields are rendered without strict separation of code and data. Flag patterns where administrative configuration values are passed directly into template rendering functions.
  • Code review: Pay particular attention to AI/automation modules, enrichment features, and dynamic configuration pathways. Indicators include string interpolation, concatenation, or direct template evaluation of fields like type_enrichment_data.
  • Policy enforcement: Introduce secure coding guidelines that prohibit use of full-power template engines for user or admin-supplied content, and require sandboxed or read-only expression engines for automation rules and AI features.
  • Runtime monitoring: Instrument server logging and application security tools to detect anomalous template expressions, suspicious method access via templates, or unusual process and file system activity originating from template evaluation paths.

Sources

SourceLink
github.comgithub.com/zammad/zammad/security/advisories/GHSA-fg9w-jg8f-4j94

Frequently asked

questions

It can be, but only in environments where an attacker can reach and influence the interfaces that control type_enrichment_data. Because this is typically an administrative or highly privileged configuration path, external attackers usually need to first compromise an admin account, integration, or upstream config source.

Exploitation generally requires high-privilege access: the ability to create or modify AI Agent or type enrichment configurations, or control an integration that writes to type_enrichment_data. Ordinary end users or unauthenticated visitors typically cannot reach this attack surface directly.

The most robust fix is to stop treating configuration or enrichment data as executable template code. Replace powerful template engines with constrained, data-oriented formats, or use sandboxed expression languages that cannot invoke arbitrary methods or commands, combined with strict validation of allowed syntax.

Design AI, automation, and configuration features so that user-controlled content is always data, never code. Use template engines in a locked-down mode, enforce least privilege on configuration interfaces, perform security-focused code reviews of dynamic rendering logic, and adopt static analysis or automated checks that flag new instances of user-influenced template evaluation.

Find out what's already
exploitable in your codebase.