Summary
A command injection vulnerability in Prowler's Kubernetes provider allows attacker-controlled kubeconfig authentication settings to invoke operating system commands on a shared worker.
The issue becomes risky when an attacker can submit or modify provider configuration containing legacy GCP authentication fields that are processed during a connection test.
Affected context
The vulnerability affects Prowler deployments using the Kubernetes provider before the relevant security fix, where provider connection testing accepts kubeconfig content and loads it through the Kubernetes Python client. The exposure depends on whether an untrusted user or tenant can provide Kubernetes configuration that reaches the legacy GCP authentication provider path on a shared worker.
Exploit preconditions
- Attack surface: Prowler's Kubernetes provider connection-test API
- Required access: Ability to submit or influence a provider configuration containing kubeconfig content
- Trigger point: Loading the kubeconfig during a provider connection test
- Why exploitation is possible: Validation checks recognize only standard
execblocks, while legacy GCP authentication settings can still cause the Kubernetes client to invoke a configured command through a subprocess
Why this happens
The vulnerability results from incomplete validation of executable authentication configuration in kubeconfig data. The application checks for one supported command-execution representation but does not reject equivalent legacy GCP auth-provider settings before passing the configuration to a client library.
During parsing and authentication, the Kubernetes Python client can interpret attacker-controlled command fields and launch them through a subprocess. This behavior maps to CWE-78: Improper Neutralization of Special Elements used in an OS Command, because untrusted configuration reaches an operating-system command execution sink.
Potential impact
- Arbitrary commands may execute with the privileges of the shared worker
- Credentials, tokens, or cloud metadata accessible to the worker could be exposed
- Other tenants, scans, or workloads on the worker could be affected
- The Prowler service or connected cloud environments could be compromised
- Attackers could establish persistence or conduct lateral movement
General mitigation guidance
Mitigation generally focuses on treating kubeconfig content as untrusted data and preventing any configuration-controlled command execution.
Common defensive patterns include:
- Rejecting all executable authentication mechanisms unless explicitly required and tightly allowlisted
- Detecting both current and legacy command-bearing kubeconfig formats
- Using non-executable, short-lived authentication mechanisms where feasible
- Applying strict schema and semantic validation before client-library loading
- Isolating connection-test workers and restricting their filesystem, network, and cloud permissions
- Enforcing tenant separation and least privilege for shared workers
- Preventing untrusted users from supplying arbitrary provider configuration
How teams detect issues like this
Organizations can look for this class of issue through:
- Static analysis and code review rules for subprocess APIs reached from configuration or request data
- Searches for kubeconfig parsing paths that accept
execor legacyauth-providercommand fields - Tests covering alternate configuration representations and parser-library behavior
- API policy checks that restrict provider configuration fields and executable authentication methods
- Runtime monitoring for unexpected child processes spawned by connection-test workers
- Audit correlation between provider-configuration submissions and process execution events
Automated security review tools may help identify incomplete validation and command-execution data flows.

