Summary
Spinnaker's Echo service used Spring Expression Language (SPeL) without restricting the set of classes available to expressions, effectively exposing the full JVM.
In affected versions, a user able to influence SPeL expressions for expected artifacts can leverage arbitrary Java classes to execute commands, access files, and deeply interact with the underlying system.
Affected context
The vulnerability occurs within Spinnaker's Echo service when it evaluates SPeL expressions related to expected artifacts.
In affected deployments:
- Echo is enabled and processes user- or pipeline-controlled expressions.
- The expression evaluation context is not restricted to a safe subset of classes.
- Expressions are evaluated on servers with access to underlying system resources (filesystem, network, process execution).
Risk is highest where untrusted or semi-trusted users can create or modify pipelines, notifications, or artifact configurations that Echo evaluates.
Exploit preconditions
- Attack surface: Spinnaker Echo service via features that cause SPeL expression evaluation (expected artifacts and related configuration).
- Required access: Ability to create or modify content that Echo interprets as SPeL (e.g., pipeline definitions, artifact expressions, or templates) through the UI, API, or configuration.
- Trigger point: When Echo evaluates an expression in the vulnerable context during pipeline execution or artifact processing.
- Why exploitation is possible: The SPeL evaluation context exposes unrestricted access to JVM types and methods instead of a constrained, whitelisted set, allowing expressions to instantiate arbitrary classes and invoke sensitive operations.
Why this happens
This issue stems from evaluating Spring Expression Language with a fully privileged execution context.
Instead of whitelisting a minimal set of safe helper classes and operations, the Echo service allowed expressions to reference arbitrary Java types available on the classpath and invoke their methods.
This maps to CWE-94: Improper Control of Generation of Code ('Code Injection'), because user-influenced expression strings are effectively treated as executable code in a powerful runtime environment.
The abstract pattern is: an expression engine meant for simple templating or data selection is wired directly into a rich runtime (the JVM) without appropriate sandboxing, type restrictions, or capability reduction, turning configuration fields into a code execution mechanism.
Potential impact
- Execution of arbitrary commands via accessible Java APIs or runtime facilities.
- Reading, modifying, or deleting files accessible to the Spinnaker Echo process.
- Accessing sensitive environment variables, credentials, or configuration data.
- Lateral movement within the deployment environment by abusing network-accessible resources.
- Full compromise of the Spinnaker control plane if Echo has high privileges or shares trust with other services.
- Use of the compromised system as a pivot point for further attacks within the infrastructure.
General mitigation guidance
Effective mitigation focuses on constraining expression evaluation capabilities and reducing the blast radius of any remaining expression logic:
- Configure SPeL evaluation to use a restricted set of classes and methods, following a strict allowlist model.
- Treat any user- or tenant-controlled expression as untrusted, applying sandboxing, capability reduction, or both.
- Prefer safer templating mechanisms that do not expose arbitrary code execution primitives for user-configurable fields.
- Separate high-privilege operations from expression-driven configuration; ensure expressions can only operate on data, not control program flow or invoke system APIs.
- Run Echo and related services with least-privilege OS accounts and minimal filesystem and network permissions to limit potential damage.
- Apply strong access control to who can define or edit pipelines, artifacts, and notification configurations, especially in multi-tenant or shared environments.
- Consider defense-in-depth controls such as outbound network restrictions and secrets management that minimize the impact of any single service compromise.
How teams detect issues like this
Detection strategies generally rely on a combination of code-level and runtime monitoring approaches:
- Static analysis & code review:
- Flag any use of expression languages (such as SPeL) that are configured without explicit type or method restrictions.
- Look for configuration of expression evaluators that expose full classpath access or reflection capabilities.
- Review pipeline and artifact processing paths for any direct evaluation of user-supplied expressions.
- Configuration and policy checks:
- Enforce policies that require expression engines to run with whitelisted helper types only.
- Periodically audit Spinnaker configurations and pipeline definitions for unexpected or overly complex SPeL usage.
- Runtime monitoring:
- Monitor Echo and related services for unusual command execution, unexpected file access, or atypical network connections that may indicate abuse of expression evaluation.
- Correlate security logs with pipeline or artifact evaluation events to identify potential exploitation attempts.
- Automated SAST/IAST tools can aid in detecting unrestricted expression evaluation patterns, especially where expression engines are widely used across services.

