/

CVE-2026-54680

Severity:

CRITICAL RISK

(9.9)

Config Injection (CWE-74) in Kubernetes Logging

CVE-2026-54680

Deferred

Vulnerability type

Category:

Injection

CWE:

CWE-74, CWE-77

Impact:

Remote Code Execution within Logging Aggregator

Severity:

CRITICAL RISK

(9.9)

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

A configuration injection flaw in the Logging operator's FluentRender component writes CRD string values directly into fluent.conf without proper escaping.

In environments where users can create Flow resources, this can allow injection of a Fluentd <match **> block using @type exec, leading to arbitrary command execution in the Fluentd aggregator.

A configuration injection flaw in the Logging operator's FluentRender component writes CRD string values directly into fluent.conf without proper escaping.

In environments where users can create Flow resources, this can allow injection of a Fluentd <match **> block using @type exec, leading to arbitrary command execution in the Fluentd aggregator.

Affected context

The vulnerability occurs in Kubernetes clusters that use the Logging operator to automate Fluentd-based logging pipelines.

It is relevant when:

  • Fluentd configurations are generated from Custom Resources (CRDs) such as Flow
  • User-provided strings (e.g., record_transformer.records) are rendered directly into fluent.conf
  • There is no escaping or sanitization of special Fluentd config syntax

In such setups, tenants or applications that can define Flow resources may influence the Fluentd aggregator's runtime behavior.

The vulnerability occurs in Kubernetes clusters that use the Logging operator to automate Fluentd-based logging pipelines.

It is relevant when:

  • Fluentd configurations are generated from Custom Resources (CRDs) such as Flow
  • User-provided strings (e.g., record_transformer.records) are rendered directly into fluent.conf
  • There is no escaping or sanitization of special Fluentd config syntax

In such setups, tenants or applications that can define Flow resources may influence the Fluentd aggregator's runtime behavior.

Exploit preconditions

  • Attack surface: Kubernetes API via Logging operator CRDs, specifically Flow resources
  • Required access: Ability to create or modify Flow objects in the target namespace or cluster
  • Trigger point: Automated rendering of Fluentd configuration by FluentRender and subsequent reload/start of Fluentd
  • Why exploitation is possible: User-controlled strings are injected verbatim into fluent.conf, allowing attackers to break out of intended configuration sections and define arbitrary Fluentd blocks (including <match **> with @type exec), which Fluentd then interprets as valid configuration and executes.
  • Attack surface: Kubernetes API via Logging operator CRDs, specifically Flow resources
  • Required access: Ability to create or modify Flow objects in the target namespace or cluster
  • Trigger point: Automated rendering of Fluentd configuration by FluentRender and subsequent reload/start of Fluentd
  • Why exploitation is possible: User-controlled strings are injected verbatim into fluent.conf, allowing attackers to break out of intended configuration sections and define arbitrary Fluentd blocks (including <match **> with @type exec), which Fluentd then interprets as valid configuration and executes.

Why this happens

The underlying bug is a configuration injection issue aligning with CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component.

FluentRender in pkg/sdk/logging/model/render/fluent.go treats CRD-provided strings as trusted and writes them directly into the Fluentd configuration file.

Because special characters and block delimiters are not escaped, the configuration file's structure can be altered by attackers, enabling them to introduce new Fluentd directives.

This insecure pattern also relates to CWE-77: Command Injection, since it ultimately allows untrusted data to control command execution via Fluentd's @type exec plugin.

The underlying bug is a configuration injection issue aligning with CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component.

FluentRender in pkg/sdk/logging/model/render/fluent.go treats CRD-provided strings as trusted and writes them directly into the Fluentd configuration file.

Because special characters and block delimiters are not escaped, the configuration file's structure can be altered by attackers, enabling them to introduce new Fluentd directives.

This insecure pattern also relates to CWE-77: Command Injection, since it ultimately allows untrusted data to control command execution via Fluentd's @type exec plugin.

Potential impact

  • Attackers may execute arbitrary OS commands within Fluentd aggregator containers.
  • Logging infrastructure can be repurposed as a foothold for lateral movement in the cluster.
  • Log data may be tampered with, exfiltrated, or selectively suppressed.
  • Compromise of credentials, tokens, or other secrets accessible to the Fluentd pod.
  • Disruption or denial of logging services impacting observability and incident response.
  • Attackers may execute arbitrary OS commands within Fluentd aggregator containers.
  • Logging infrastructure can be repurposed as a foothold for lateral movement in the cluster.
  • Log data may be tampered with, exfiltrated, or selectively suppressed.
  • Compromise of credentials, tokens, or other secrets accessible to the Fluentd pod.
  • Disruption or denial of logging services impacting observability and incident response.

General mitigation guidance

Effective mitigation focuses on limiting the expressive power of user-controlled configuration fields and enforcing strict separation between data and control.

Common defensive patterns include:

  • Escaping or sanitizing special characters and block delimiters in CRD string fields before rendering them into Fluentd configuration files.
  • Using structured templates and whitelisting for allowed directives, rather than emitting free-form configuration from user input.
  • Treating configuration derived from multi-tenant or application-level CRDs as untrusted, applying validation to block potentially dangerous Fluentd plugins and parameters.
  • Running logging components with least privilege, restricting filesystem and network access to reduce the blast radius if misconfigurations occur.
  • Isolating tenants using namespace-bound RBAC policies that prevent them from controlling cluster-wide logging resources.

Effective mitigation focuses on limiting the expressive power of user-controlled configuration fields and enforcing strict separation between data and control.

Common defensive patterns include:

  • Escaping or sanitizing special characters and block delimiters in CRD string fields before rendering them into Fluentd configuration files.
  • Using structured templates and whitelisting for allowed directives, rather than emitting free-form configuration from user input.
  • Treating configuration derived from multi-tenant or application-level CRDs as untrusted, applying validation to block potentially dangerous Fluentd plugins and parameters.
  • Running logging components with least privilege, restricting filesystem and network access to reduce the blast radius if misconfigurations occur.
  • Isolating tenants using namespace-bound RBAC policies that prevent them from controlling cluster-wide logging resources.

How teams detect issues like this

Detection typically involves a combination of configuration analysis and code-level checks:

  • Static review of the configuration renderer to identify unescaped insertion of CRD fields into fluent.conf, particularly around Flow and record_transformer handling.
  • Automated scanning of generated Fluentd configs for unexpected <match **> blocks, @type exec, and other high-risk plugins originating from tenant-controlled CRDs.
  • Policy enforcement in CI/CD and admission controllers to block Flow specifications that reference dangerous Fluentd types or command-execution paths.
  • Code review signals such as concatenation of user-controlled strings into configuration templates without neutralization, or absence of validation for plugin types and arguments.
  • Use of configuration-linting tools or custom controllers that inspect logging CRDs and corresponding rendered configs for injection patterns.

Detection typically involves a combination of configuration analysis and code-level checks:

  • Static review of the configuration renderer to identify unescaped insertion of CRD fields into fluent.conf, particularly around Flow and record_transformer handling.
  • Automated scanning of generated Fluentd configs for unexpected <match **> blocks, @type exec, and other high-risk plugins originating from tenant-controlled CRDs.
  • Policy enforcement in CI/CD and admission controllers to block Flow specifications that reference dangerous Fluentd types or command-execution paths.
  • Code review signals such as concatenation of user-controlled strings into configuration templates without neutralization, or absence of validation for plugin types and arguments.
  • Use of configuration-linting tools or custom controllers that inspect logging CRDs and corresponding rendered configs for injection patterns.

Sources

SourceLink
github.comgithub.com/kube-logging/logging-operator/commit/cf437d7f1e056c78740bf5716ac8bdebcf002425
github.comgithub.com/kube-logging/logging-operator/releases/tag/6.6.0
github.comgithub.com/kube-logging/logging-operator/security/advisories/GHSA-mjqf-28ph-426h

Frequently asked

questions

It can be exploitable remotely if an attacker has network or API access to the Kubernetes cluster and the permissions needed to create or modify Flow CRDs. They do not need direct access to the Fluentd pod itself; influencing the CRDs is sufficient.

The attacker must be able to create or update Flow resources managed by the Logging operator. In many clusters, this capability may be granted to application or tenant service accounts, making exploitation more feasible in multi-tenant environments.

The safest approach is to treat all CRD-derived configuration inputs as untrusted and strictly separate data from Fluentd control structures. This means escaping special characters, validating allowed directives and plugins, and ensuring that user-provided fields cannot introduce new Fluentd blocks or command-execution types.

Future prevention should focus on secure configuration rendering practices: design configuration schemas that limit free-form text in control-sensitive areas, apply robust validation and escaping before generating config files, enforce RBAC so untrusted tenants cannot control global logging resources, and include security-focused reviews and automated checks for injection patterns in configuration templating code.

It can be exploitable remotely if an attacker has network or API access to the Kubernetes cluster and the permissions needed to create or modify Flow CRDs. They do not need direct access to the Fluentd pod itself; influencing the CRDs is sufficient.

The attacker must be able to create or update Flow resources managed by the Logging operator. In many clusters, this capability may be granted to application or tenant service accounts, making exploitation more feasible in multi-tenant environments.

The safest approach is to treat all CRD-derived configuration inputs as untrusted and strictly separate data from Fluentd control structures. This means escaping special characters, validating allowed directives and plugins, and ensuring that user-provided fields cannot introduce new Fluentd blocks or command-execution types.

Future prevention should focus on secure configuration rendering practices: design configuration schemas that limit free-form text in control-sensitive areas, apply robust validation and escaping before generating config files, enforce RBAC so untrusted tenants cannot control global logging resources, and include security-focused reviews and automated checks for injection patterns in configuration templating code.

Find out what's already
exploitable in your codebase.