Summary
A critical Server-Side Template Injection vulnerability in Centreon's centreon-open-tickets module allows arbitrary code execution when the message_confirm field is rendered via Smarty without a security policy.
Any authenticated user who can control this field may execute server-side code, expose environment secrets, and disrupt the Centreon Infra Monitoring platform.
Affected context
The vulnerability appears in Centreon's centreon-open-tickets module where user-controlled content is persisted and later processed by the Smarty templating engine.
It is relevant in deployments where authenticated users can supply or modify the message_confirm field and where Smarty is configured without a restrictive security policy.
Risk increases when the application runs with access to sensitive environment variables, secrets, or critical monitoring infrastructure.
Exploit preconditions
- Attack surface: Web interface of the Centreon Infra Monitoring product (centreon-open-tickets module)
- Required access: Authenticated access with permissions to create or modify ticket data, including
message_confirm - Trigger point: Rendering of stored
message_confirmdata through Smarty templates during ticket workflows - Why exploitation is possible: The field is stored unsanitized and interpreted by Smarty with no security policy, allowing template expressions to be treated as executable code on the server
Why this happens
This issue stems from treating untrusted, user-supplied data as part of server-side templates without appropriate isolation or sanitization.
In the affected module, the message_confirm field is persisted and then passed directly into Smarty, a powerful templating engine capable of executing logic on the server.
With no security policy or sandboxing enabled, injected template code can invoke arbitrary functions and interact with the runtime environment.
Conceptually, this maps to CWE-94: Improper Control of Generation of Code, where unvalidated input is allowed to influence server-side code execution paths.
Potential impact
- Remote execution of arbitrary code on the Centreon server
- Disclosure of environment variables, configuration data, and embedded secrets
- Compromise of credentials used to access monitored infrastructure or integrations
- Denial of service through deliberate process crashes or resource exhaustion
- Full takeover of the monitoring platform and potential pivot into connected systems
General mitigation guidance
Mitigation typically focuses on removing direct execution of user-controlled data in template engines and enforcing strict separation between data and logic.
Common defensive patterns include:
- Escaping or encoding user-input fields before rendering in server-side templates so they are treated as plain text
- Enabling and configuring a restrictive Smarty security policy or sandbox that disallows dangerous functions and code constructs
- Using a templating approach where application code constructs the logic and templates only handle display, avoiding dynamic evaluation of user content
- Reducing runtime privileges of the Centreon application so that, even if template injection occurs, the process has minimal access to sensitive resources
- Centralizing validation rules for rich-text or message fields to restrict allowable syntax and block template directives altogether
How teams detect issues like this
Detection commonly involves a combination of code-focused and runtime techniques:
- Static analysis rules that flag passing user-controlled or database-derived fields directly into template engines capable of execution
- Code review checklists that require verification of template engine security policies and explicit escaping of dynamic content
- Security tests that attempt to inject benign template expressions into message or description fields and observe whether server-side evaluation occurs
- Policy enforcement in CI/CD pipelines to prevent disabling of template sandboxes or addition of high-risk engine plugins
- Runtime monitoring for unusual template evaluation errors, unexpected function calls from templating contexts, or anomalous access to environment variables

