Summary
Skipper's default configuration prior to version 0.23.0 allowed inline Lua scripts from user-controlled sources (such as Kubernetes Ingress resources) to be executed within the proxy process.
When untrusted users can define Lua filters, they can read files accessible to the Skipper process, including logs that may contain sensitive secrets, leading to unauthorized disclosure of confidential data.
Affected context
This vulnerability occurs in Skipper deployments where:
- The default Lua source configuration includes
inline(e.g.,-lua-sources=inline,file) and - Untrusted or semi-trusted tenants can create or modify Lua filters, such as via Kubernetes Ingress resources, and
- Skipper has filesystem access to logs or configuration containing secrets.
In such environments, Lua scripts run with the same privileges and filesystem visibility as the Skipper process, which may include access to sensitive runtime data and logs.
Exploit preconditions
- Attack surface: Skipper instances that expose Lua filter configuration indirectly (e.g., via Kubernetes Ingress or other dynamic routing definitions).
- Required access: Ability to define or modify Lua filters from a context not fully trusted by the Skipper operator (multi-tenant clusters, shared ingress controllers, or delegated routing configuration).
- Trigger point: The Skipper proxy evaluates the user-defined inline Lua filter as part of processing HTTP requests.
- Why exploitation is possible: Inline Lua is executed with Skipper's process privileges, without strict sandboxing or filesystem isolation, allowing scripts to read accessible files such as logs that may contain secrets.
Why this happens
The underlying issue stems from allowing untrusted input (user-defined Lua filters) to be treated as executable code within the Skipper process.
This maps to CWE-94: Improper Control of Generation of Code ('Code Injection'), as Skipper's default configuration trusted inline Lua sources that could be controlled by untrusted parties.
Combined with CWE-250: Execution with Unnecessary Privileges, the Lua environment inherits the proxy's filesystem and privilege context, and CWE-522: Insufficiently Protected Credentials when secrets are stored or logged in locations readable by these scripts.
The result is an insecure pattern where configuration behaves like code, and that code runs with broad access to sensitive operational data.
Potential impact
- Untrusted users can read files accessible to the Skipper process, including log files.
- Disclosure of secrets written to logs, such as tokens, credentials, or API keys.
- Access to configuration data that may reveal internal topology, service endpoints, or debugging information.
- Lateral movement opportunities if exposed secrets are reused across services or environments.
- Potential misuse of the proxy's privileges to inspect sensitive traffic metadata or environment information.
General mitigation guidance
Effective mitigation focuses on limiting where executable scripting can come from and how much power it has:
- Prefer disabling inline script sources for untrusted configuration paths; restrict Lua sources to vetted, file-based scripts managed by operators.
- Introduce strict trust boundaries around who can define or modify Lua filters (e.g., segregate ingress controllers per trust level).
- Avoid logging sensitive information (secrets, tokens, credentials) to locations accessible by the proxy at runtime.
- Apply least-privilege principles to the Skipper process: minimize filesystem access and ensure logs or secret stores are not broadly readable.
- Where scripting is necessary, consider sandboxing or constraining the runtime (e.g., restricted APIs, no direct filesystem access) to limit data exposure.
How teams detect issues like this
Organizations can look for this class of issue using:
- Configuration review: Inspect Skipper deployment parameters for
-lua-sources=inlineand verify who can influence Lua filters (Ingress definitions, routing CRDs, etc.). - Static analysis / policy checks: Enforce policies in CI/CD or admission controllers that block or flag inline Lua usage in multi-tenant or untrusted contexts.
- Code and infrastructure review: Examine Lua filter libraries and Skipper sidecar configurations for file access calls or log scraping patterns.
- Log and access monitoring: Monitor for unusual access patterns to log files or other sensitive paths originating from the Skipper process or Lua filter execution.

