Summary
Feast 0.53.0 contains an unsafe YAML deserialization flaw in the Kubernetes materializer job that uses yaml.load(..., Loader=yaml.Loader) to parse configuration files.
If an attacker can modify /var/feast/feature_store.yaml or /var/feast/materialization_config.yaml, they may be able to instantiate arbitrary Python objects and execute OS commands on the worker pod before configuration validation occurs.
Affected context
This vulnerability affects Feast deployments that run the Kubernetes materializer job and rely on YAML configuration files mounted or provided at runtime.
The issue arises where feature_store.yaml and materialization_config.yaml are treated as trusted input and deserialized using a fully powered YAML loader without prior schema enforcement or isolation.
Environments that share or dynamically generate these configuration files—such as CI/CD pipelines, shared volumes, or multi-tenant clusters—are at elevated risk, particularly if an attacker can influence or overwrite these YAML files.
Exploit preconditions
- Attack surface: Kubernetes worker pods running the Feast Kubernetes materializer job.
- Required access: Ability to modify or control the contents of
/var/feast/feature_store.yamland/or/var/feast/materialization_config.yaml(e.g., via compromised CI, writable volumes, misconfigured permissions, or supply-chain tampering). - Trigger point: Startup or execution of the materializer job when it deserializes the YAML configuration files using
yaml.load(..., Loader=yaml.Loader). - Why exploitation is possible: The generic YAML loader allows construction of arbitrary Python objects during deserialization, and this process occurs before configuration validation or schema checks, enabling embedded object constructors to execute code.
Why this happens
The root cause is the use of a powerful, non-restrictive YAML deserialization API (yaml.load with yaml.Loader) on data that can be influenced by external parties.
This maps directly to CWE-502: Deserialization of Untrusted Data, where serialized data (YAML in this case) is deserialized into active runtime objects without limiting which types can be created or what side effects they may have.
Instead of treating configuration as passive data, the deserialization mechanism permits arbitrary object instantiation, allowing attacker-controlled YAML tags or constructors to trigger code execution during parsing.
The lack of a safe parsing mode and the absence of a strict schema or type allowlist turn configuration parsing into an unintended execution mechanism.
Potential impact
- Execution of arbitrary OS commands within the affected Kubernetes worker pod.
- Complete compromise of the Feast materializer job runtime, including access to data and credentials available in that pod.
- Data poisoning of feature stores by injecting, altering, or deleting features during materialization.
- Lateral movement within the Kubernetes cluster if the compromised pod has elevated permissions or accessible network paths.
- Supply-chain sabotage, such as manipulating downstream ML models, analytics, or decisions that depend on corrupted feature data.
- Denial of service for data pipelines or feature materialization processes.
General mitigation guidance
Effective mitigation centers on treating configuration as untrusted data and constraining deserialization behavior.
Safer parsing and data handling patterns:
- Use safe or restricted YAML parsing APIs that treat documents as plain data structures (e.g., mappings, lists, strings, numbers) and disallow arbitrary object construction.
- Introduce explicit schema or type validation for configuration files, rejecting unexpected fields, structures, or tags early in the load process.
- Avoid relying on language-level object constructors within configuration; keep configuration declarative and side-effect free.
Reducing configuration trust and exposure:
- Minimize who and what can write to configuration paths, using strict file permissions, dedicated service accounts, and read-only mounts where feasible.
- Separate build-time and runtime configuration, and avoid letting untrusted automation or tenants directly modify runtime configuration files.
- Treat configuration repositories and pipelines as part of the supply chain, applying integrity checks, code review, and change approvals.
Limiting blast radius:
- Run the Kubernetes materializer job with least-privilege permissions (Kubernetes RBAC, minimal cloud roles, narrow network policies).
- Isolate sensitive secrets from the materializer job when not strictly required, and restrict OS-level capabilities in the container where possible.
- Apply defense-in-depth controls such as read-only root filesystems and locked-down volumes to make configuration tampering harder.
How teams detect issues like this
Detection is best approached through a combination of code-level review, automated analysis, and runtime monitoring.
Static and code-review signals:
- Search for calls to dangerous deserialization APIs such as
yaml.loadwith unrestricted loaders (e.g.,yaml.Loader,FullLoader) in configuration-related code paths. - Flag any configuration parsing logic that permits custom YAML tags, Python object hooks, or reflection-based construction.
- Incorporate secure coding guidelines into code review checklists, ensuring reviewers question any dynamic deserialization of external data.
Automated analysis and policy enforcement:
- Configure static application security testing (SAST) tools or linters to detect unsafe deserialization patterns and enforce the use of safe loaders by policy.
- Add CI checks that fail builds when prohibited deserialization APIs are introduced into the codebase.
- Maintain internal security rulesets (e.g., Semgrep or similar) targeting unsafe YAML parsing and deserialization functions.
Runtime and operational monitoring:
- Monitor Kubernetes audit logs and pod logs for anomalous command execution patterns originating from the materializer containers.
- Use file integrity monitoring on configuration directories to detect unexpected modifications to YAML files used by Feast jobs.
- Track and alert on unusual changes in feature data quality or distribution that might indicate data poisoning stemming from compromised materialization.

