Back to skill

Security audit

kubevpn

Security checks for vulnerabilities and agentic risk

Overview

This skill is coherent Kubernetes tooling documentation, but it needs Review because it recommends unsafe installation and high-impact Kubernetes/Docker actions with limited safety guidance.

Install only through a trusted package manager or a verified signed release, not the pipe-to-shell command. Use least-privilege kubeconfigs, avoid inline tokens/passwords, prefer non-production namespaces, use header-based routing when possible, check what resources will be injected or deployed, avoid privileged local containers unless truly required, and run cleanup commands after use.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T03 · Remote Payload Retrieval and Execution

Error
Location
SKILL.md:26
Finding
Unverified Remote Installer Is Piped Directly into a Shell<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, line 26 **Vulnerability Type**: Remote payload retrieval and execution **Risk Level**: Critical ### Vulnerable Code ```bash curl -fsSL https://kubevpn.dev/install.sh | sh # Linux/macOS ``` ### Technical Analysis The installation instructions download a mutable script from an external endpoint and immediately execute it with `sh`. The user has no opportunity to inspect the retrieved content, and the command performs no version pinning, checksum validation, or cryptographic signature verification. HTTPS protects the network connection in transit but does not guarantee that the server, hosting account, DNS infrastructure, or published script has not been compromised. Because the effective payload can change after this Skill has been reviewed, the command creates a direct remote code-execution channel. The installation source may be associated with the documented KubeVPN project, but the repository contains no checksum, signature, pinned artifact, or local copy that would allow the executed payload to be independently verified. ### Attack Path 1. An attacker compromises the `kubevpn.dev` hosting endpoint, its deployment pipeline, DNS, or another component capable of changing `install.sh`. 2. The attacker replaces or modifies the script with malicious shell commands. 3. A user or agent follows the documented installation command. 4. `curl` retrieves the attacker-controlled response. 5. The shell executes the response immediately without integrity verification or review. 6. The payload performs arbitrary actions using the privileges of the invoking account. If the installer obtains or is run with elevated privileges, the compromise may extend to the entire host. ### Impact Assessment Successful exploitation permits arbitrary command execution as the user running the command. Potential consequences include credential theft, modification of user files, installation of malicious binaries, per ...[truncated 369 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove the direct `curl | sh` installation pattern. 2. Direct users to a version-pinned release artifact from the project's documented official release channel. 3. Download the artifact separately so it can be reviewed before execution. 4. Publish and require verification of a SHA-256 checksum or, preferably, a cryptographic signature whose verification key is distributed through a separate trusted channel. 5. Use a workflow similar to: ```bash curl -fL -o kubevpn.tar.gz https://example.invalid/releases/download/vX.Y.Z/kubevpn.tar.gz echo "<EXPECTED_SHA256> kubevpn.tar.gz" | sha256sum --check - ``` 6. Extract and install only after successful verification. 7. Prefer package managers that support signed, versioned packages. 8. Document whether installation requires elevated privileges and ensure elevation is limited to the exact filesystem operation that needs it. ]]>

T05 · Unauthorized Access and Privilege Escalation

Error
Location
references/commands.md:225
Finding
Local Workload Containers Run with Extended Privileges by Default<![CDATA[ ## Vulnerability Details **File Location**: `references/commands.md`, line 225 **Vulnerability Type**: Excessive default container privileges **Risk Level**: High ### Vulnerable Code ```text | `--privileged` | | Run container with extended privileges (default: `true`) | ``` ### Technical Analysis The documented `kubevpn run` workflow reproduces Kubernetes workloads in local Docker containers, including their images, environment variables, volumes, and network connectivity. The command reference states that extended container privileges are enabled by default. Privileged containers substantially weaken the isolation boundary between the container and its host. Depending on the operating system and container runtime, privileged execution may provide broad Linux capabilities, host device access, and the ability to manipulate networking or kernel-facing interfaces. This default exceeds the minimum privileges needed for many application debugging and simulation tasks. It is particularly risky because the workload image may originate from a remote registry or be selected through a Kubernetes workload definition. A compromised image can therefore become locally executed code with elevated container privileges without an explicit privilege opt-in from the user. ### Attack Path 1. An attacker compromises a workload image, image registry, deployment configuration, or account authorized to update the target Kubernetes workload. 2. The target workload is changed to reference an image containing malicious startup code. 3. A developer runs `kubevpn run deployment/<name>` to reproduce or debug the workload locally. 4. KubeVPN pulls and starts the attacker-controlled image. 5. According to the documented default, the container receives extended privileges without the user explicitly requesting them. 6. Malicious code abuses the additional capabilities or device access to inspect or modify host resources, interfere with networking, or attempt a container esca ...[truncated 718 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Change the default to unprivileged container execution. 2. Require an explicit `--privileged` opt-in only for workflows that cannot function with ordinary isolation. 3. Display a clear confirmation and security warning before starting a privileged container. 4. Document the specific features that require elevated access and provide an unprivileged alternative for normal application debugging. 5. Replace full privileged mode with narrowly scoped Linux capabilities, device mappings, and security-policy exceptions where possible. 6. Preserve seccomp, AppArmor or SELinux, capability dropping, and non-root execution by default. 7. Recommend immutable image digests rather than mutable tags when reproducing workloads locally. 8. Warn users to validate the workload image and deployment source before local execution. 9. Avoid exposing unnecessary host paths, credentials, Docker sockets, Kubernetes credentials, or sensitive devices to the container. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (29)

External Script Fetching

High
Category
Supply Chain
Content
```bash
brew install kubevpn                              # macOS
curl -fsSL https://kubevpn.dev/install.sh | sh   # Linux/macOS
kubectl krew install kubevpn/kubevpn              # kubectl plugin
scoop bucket add extras && scoop install kubevpn  # Windows
```
Confidence
97% confidence
Finding
The command fetches a script from the internet and pipes it directly to `sh`, creating a classic remote code execution risk. Because this skill is for developer tooling that bridges into Kubernetes environments, compromise of the local machine could also expose kubeconfigs, cloud credentials, SSH keys, and access to clusters.

Credential Access

High
Category
Privilege Escalation
Content
All connect/proxy/run/sync commands support SSH jump:
```bash
kubevpn connect --ssh-addr 192.168.1.100:22 --ssh-username root --ssh-keyfile ~/.ssh/id_rsa
kubevpn connect --ssh-alias dev                           # uses ~/.ssh/config alias
kubevpn proxy deployment/<name> --ssh-alias dev --headers foo=bar
```
Confidence
90% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Instruction Override

High
Category
Prompt Injection
Content
| `--image-pull-secret-name` | Secret name for pulling image from private registry |
| `--manager-namespace` | Namespace of traffic manager (when installed via Helm) |
| `--transfer-image` | Transfer kubevpn image to a custom registry before use |
| `--debug` | Enable debug mode |
| `--remote-kubeconfig` | Path to kubeconfig on remote SSH server |
| + SSH jump flags | See [SSH Jump Flags](#ssh-jump-flags) |
Confidence
70% confidence
Finding
This pattern attempts to override system instructions or ignore safety constraints. Without LLM analysis, manual review is recommended.

Instruction Override

High
Category
Prompt Injection
Content
| `--image-pull-secret-name` | Secret name for pulling image from private registry |
| `--manager-namespace` | Namespace of traffic manager (when installed via Helm) |
| `--transfer-image` | Transfer kubevpn image to a custom registry before use |
| `--debug` | Enable debug mode |
| `--remote-kubeconfig` | Path to kubeconfig on remote SSH server |
| + SSH jump flags | See [SSH Jump Flags](#ssh-jump-flags) |
Confidence
70% confidence
Finding
This pattern attempts to override system instructions or ignore safety constraints. Without LLM analysis, manual review is recommended.

Instruction Override

High
Category
Prompt Injection
Content
| `--image-pull-secret-name` | Secret name for pulling image from private registry |
| `--manager-namespace` | Namespace of traffic manager (when installed via Helm) |
| `--transfer-image` | Transfer kubevpn image to a custom registry before use |
| `--debug` | Enable debug mode |
| `--remote-kubeconfig` | Path to kubeconfig on remote SSH server |
| + SSH jump flags | See [SSH Jump Flags](#ssh-jump-flags) |
Confidence
70% confidence
Finding
This pattern attempts to override system instructions or ignore safety constraints. Without LLM analysis, manual review is recommended.

Instruction Override

High
Category
Prompt Injection
Content
| `--image-pull-secret-name` | Secret name for pulling image from private registry |
| `--manager-namespace` | Namespace of traffic manager (when installed via Helm) |
| `--transfer-image` | Transfer kubevpn image to a custom registry before use |
| `--debug` | Enable debug mode |
| `--remote-kubeconfig` | Path to kubeconfig on remote SSH server |
| + SSH jump flags | See [SSH Jump Flags](#ssh-jump-flags) |
Confidence
70% confidence
Finding
This pattern attempts to override system instructions or ignore safety constraints. Without LLM analysis, manual review is recommended.

Credential Access

High
Category
Privilege Escalation
Content
| `--manager-namespace` | Namespace of traffic manager (when installed via Helm) |
| `--transfer-image` | Transfer kubevpn image to a custom registry before use |
| `--debug` | Enable debug mode |
| `--remote-kubeconfig` | Path to kubeconfig on remote SSH server |
| + SSH jump flags | See [SSH Jump Flags](#ssh-jump-flags) |

**Examples:**
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
| `--manager-namespace` | Namespace of traffic manager (when installed via Helm) |
| `--transfer-image` | Transfer kubevpn image to a custom registry before use |
| `--debug` | Enable debug mode |
| `--remote-kubeconfig` | Path to kubeconfig on remote SSH server |
| + SSH jump flags | See [SSH Jump Flags](#ssh-jump-flags) |

**Examples:**
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
| `--manager-namespace` | Namespace of traffic manager (when installed via Helm) |
| `--transfer-image` | Transfer kubevpn image to a custom registry before use |
| `--debug` | Enable debug mode |
| `--remote-kubeconfig` | Path to kubeconfig on remote SSH server |
| + SSH jump flags | See [SSH Jump Flags](#ssh-jump-flags) |

**Examples:**
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
| `--manager-namespace` | Namespace of traffic manager (when installed via Helm) |
| `--transfer-image` | Transfer kubevpn image to a custom registry before use |
| `--debug` | Enable debug mode |
| `--remote-kubeconfig` | Path to kubeconfig on remote SSH server |
| + SSH jump flags | See [SSH Jump Flags](#ssh-jump-flags) |

**Examples:**
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
| `--manager-namespace` | Namespace of traffic manager (when installed via Helm) |
| `--transfer-image` | Transfer kubevpn image to a custom registry before use |
| `--debug` | Enable debug mode |
| `--remote-kubeconfig` | Path to kubeconfig on remote SSH server |
| + SSH jump flags | See [SSH Jump Flags](#ssh-jump-flags) |

**Examples:**
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Privileged Container / Container Escape

High
Category
Privilege Escalation
Content
| `--connect-mode` | | `host` or `container` network mode (default: `host`) |
| `--image` | | kubevpn sidecar image |
| `--platform` | | Platform for multi-platform images |
| `--privileged` | | Run container with extended privileges (default: `true`) |
| `--publish` | `-p` | Publish container port(s) to host |
| `--publish-all` | `-P` | Publish all exposed ports to random ports |
| `--expose` | | Expose a port or range |
Confidence
93% confidence
Finding
The `run` command documents `--privileged` with a default of `true`, meaning locally launched containers may receive broad host-level capabilities by default. In a development tool that also imports pod env vars, volumes, and networking from clusters, this materially increases the risk of container escape, host tampering, and abuse of sensitive mounted content if images or workloads are untrusted or compromised.

Credential Access

High
Category
Privilege Escalation
Content
kubevpn run deployment/authors --dev-image golang:1.21 --entrypoint bash

# Via SSH alias
kubevpn run deployment/authors -n default --kubeconfig ~/.kube/config --ssh-alias dev --entrypoint /bin/bash
```

---
Confidence
80% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
kubevpn run deployment/authors --dev-image golang:1.21 --entrypoint bash

# Via SSH alias
kubevpn run deployment/authors -n default --kubeconfig ~/.kube/config --ssh-alias dev --entrypoint /bin/bash
```

---
Confidence
80% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
- --namespace=test
---
Name: all-in-one
Description: inline kubeconfig via JSON
Flags:
- connect
- --kubeconfig-json={"apiVersion":"v1","clusters":[...]}
Confidence
83% confidence
Finding
The alias config supports inline `--kubeconfig-json={...}`, which encourages embedding cluster credentials directly into configuration entries that may be stored in plaintext, copied, logged, or committed to source control. In an agent skill context, inline secrets are especially risky because assistants may echo, persist, or expose command strings and config content across sessions or logs.

Credential Access

High
Category
Privilege Escalation
Content
Description: inline kubeconfig via JSON
Flags:
- connect
- --kubeconfig-json={"apiVersion":"v1","clusters":[...]}
- --namespace=test
```
Confidence
83% confidence
Finding
This line continues the inline kubeconfig JSON pattern, which can expose bearer tokens, client certificates, or cluster credentials in plaintext configuration and operational logs. Because the skill is designed for agent-driven use, such inline secrets can be unintentionally surfaced in transcripts, telemetry, or generated examples.

Credential Access

High
Category
Privilege Escalation
Content
| Flag | Description |
|------|-------------|
| `--kubeconfig` | Path to kubeconfig file |
| `--context` | Kubeconfig context to use |
| `-n`, `--namespace` | Namespace scope |
| `--cluster` | Kubeconfig cluster to use |
| `--user` | Kubeconfig user to use |
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
| Flag | Description |
|------|-------------|
| `--kubeconfig` | Path to kubeconfig file |
| `--context` | Kubeconfig context to use |
| `-n`, `--namespace` | Namespace scope |
| `--cluster` | Kubeconfig cluster to use |
| `--user` | Kubeconfig user to use |
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
| `--kubeconfig` | Path to kubeconfig file |
| `--context` | Kubeconfig context to use |
| `-n`, `--namespace` | Namespace scope |
| `--cluster` | Kubeconfig cluster to use |
| `--user` | Kubeconfig user to use |
| `--server` / `-s` | Kubernetes API server address |
| `--token` | Bearer token for API server auth |
Confidence
79% confidence
Finding
Documenting a raw `--token` flag makes direct bearer-token use easy, which raises the chance users pass long-lived secrets on command lines where they can leak via shell history, process listings, terminal scrollback, or agent logs. In this skill context, that risk is elevated because assistants may generate or repeat full commands containing sensitive tokens.

Credential Access

High
Category
Privilege Escalation
Content
| `--ssh-keyfile` | Path to SSH private key file |
| `--ssh-alias` | SSH config alias from `~/.ssh/config` |
| `--ssh-jump` | Inline ProxyJump config string eg: `--ssh-addr jump.example.org --ssh-username user --gssapi-password xxx` |
| `--remote-kubeconfig` | Path to kubeconfig on remote SSH server |
| `--gssapi-keytab` | GSSAPI keytab file path |
| `--gssapi-cache` | GSSAPI cache file path (from `kinit -c`) |
| `--gssapi-password` | GSSAPI password |
Confidence
88% confidence
Finding
This section documents sensitive authentication inputs including SSH private keys, GSSAPI password, and remote kubeconfig use, and even provides an inline example string carrying a password-like value. In an agent setting, documenting or generating commands with inline secrets can lead to exposure in shell history, process arguments, chat logs, and telemetry.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The installation section recommends `curl -fsSL https://kubevpn.dev/install.sh | sh`, which executes remote code directly in a shell without verification. If the site, transport, or upstream script is compromised, users could run arbitrary attacker-controlled code on their local machine.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The markdown describes `proxy` as intercepting inbound cluster traffic and notes that it auto-connects, but it does not explicitly warn users that this can redirect real traffic from a live Kubernetes workload to their local machine. Similar traffic-affecting behavior is described for `run` and `sync`, yet the document presents them as workflows without a user-facing caution about operational impact.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
- `proxy`, `run`, and `sync` auto-connect to the cluster if not already connected
- Multiple clusters can be connected simultaneously; use `kubevpn status` or `kubevpn connection list` to inspect
- `disconnect` cleans up DNS/hosts; `quit` also stops the daemon gRPC server entirely
- Server components are auto-deployed on first use (or pre-install: `helm install kubevpn kubevpn/kubevpn`)
- Supports HTTP, gRPC, Thrift, WebSocket, TCP, UDP, ICMP
- Use `kubevpn reset deployment/<name>` if a workload gets stuck with injected containers
- Use `kubevpn image copy` to mirror images to a private registry when `ghcr.io` is not accessible
Confidence
85% confidence
Finding
The skill states that server components are auto-deployed on first use and that several commands auto-connect to clusters. In a Kubernetes context, implicit deployment and connection behavior can cause unauthorized or unexpected changes to cluster state, especially in production or shared environments.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The documentation describes injecting a sidecar, rewriting iptables, and intercepting all inbound traffic to a live workload, but does not prominently warn that this can disrupt production or staging services. In the context of a Kubernetes networking tool, omission of this warning is dangerous because users may unintentionally reroute or blackhole real traffic and affect availability.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
## Server Component (traffic-manager)

On first `kubevpn connect`, kubevpn auto-deploys a `traffic-manager` deployment in the target
namespace. This pod:
- Terminates the TUN tunnel from the local machine
- Acts as a gateway for routing traffic between local and cluster networks
Confidence
85% confidence
Finding
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Static analysis

No suspicious patterns detected.