/

CVE-2026-29954

Severity:

HIGH RISK

(7.6)

Command Injection and Server-Side Request Forgery (SSRF)

CVE-2026-29954

Analyzed

Vulnerability type

Category:

Command Injection and Server-Side Request Forgery (SSRF)

CWE:

CWE-88, CWE-918

Impact:

Internal network access via SSRF and command injection into wget options

Severity:

HIGH RISK

(7.6)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

KubePlus 4.1.4 exposes a vulnerability where the chartURL field in ResourceComposition objects is URL-encoded but not properly validated or sanitized, enabling both server-side request forgery (SSRF) and command injection.

By crafting a malicious chartURL, an attacker can coerce internal components to make arbitrary HTTP requests and inject wget options such as --header, leading to arbitrary HTTP header injection and potential access to internal services.

Affected context

This vulnerability appears in KubePlus deployments that:

  • Use the ResourceComposition custom resource to define or manage Helm charts.
  • Rely on the mutating webhook and kubeconfiggenerator components to process the chartURL field.
  • Allow tenants, automation systems, or other controllers to submit or update ResourceComposition objects with partially untrusted data.

The risk is elevated in environments where:

  • KubePlus components have network access to internal services (cluster APIs, metadata services, internal HTTP endpoints).
  • There is insufficient admission control or review on who can create or modify ResourceComposition resources.

Exploit preconditions

  • Attack surface: Kubernetes API surface via KubePlus ResourceComposition CRDs, processed by the mutating webhook and kubeconfiggenerator components.
  • Required access: Ability to create or modify ResourceComposition objects containing a crafted chartURL value, either directly or via an integrated system with such permissions.
  • Trigger point: Any workflow where:
  • The mutating webhook reads and processes chartURL without validating its destination, causing SSRF-like behavior.
  • The kubeconfiggenerator component constructs a wget command using the unvalidated chartURL, resulting in command-line option injection (e.g., --header).
  • Why exploitation is possible:
  • The chartURL is only URL-encoded and is not constrained to safe schemes or host allowlists, enabling outbound requests to attacker-controlled or internal endpoints (CWE-918).
  • The chartURL is directly concatenated into a wget command line without robust argument delimitation or sanitization, allowing injection of additional wget flags such as --header (CWE-88).

Why this happens

The underlying issue combines two related bug classes:

  1. Command Injection via Improper Shell Argument Handling (CWE-88):
  • The kubeconfiggenerator dynamically builds a wget command by concatenating the user-controlled chartURL string into the command line.
  • Rather than treating chartURL as a single, validated URL argument, the implementation effectively allows it to be interpreted as part of the command's option set.
  • This pattern maps to CWE-88, where input is embedded into command-line arguments without enforcing strict separation, enabling injection of additional options such as --header.
  1. Server-Side Request Forgery (CWE-918):
  • The mutating webhook and kubeconfiggenerator trust the chartURL as a destination without validating IP ranges, hostnames, or protocols.
  • As a result, internal components can be coerced into initiating HTTP requests to arbitrary endpoints, including internal network services that are not otherwise exposed.

Architecturally, the system fails to differentiate between trusted configuration and untrusted input in a network-sensitive code path, and it couples URL resolution with shell command construction instead of using safe HTTP client APIs and strict validation.

Potential impact

  • SSRF against internal HTTP(S) services accessible from KubePlus components.
  • Access to cloud instance metadata services or internal admin endpoints via forged requests.
  • Arbitrary HTTP header injection on outgoing requests, including:
  • Spoofing authentication or API tokens if misconfigured.
  • Bypassing upstream access controls that rely on headers.
  • Facilitation of further attacks such as:
  • Enumerating internal services and APIs.
  • Exploiting vulnerabilities on internal endpoints that are not exposed externally.
  • Potential data exfiltration from internal APIs reachable through SSRF.

General mitigation guidance

Mitigation centers on treating chartURL as untrusted input, decoupling it from shell commands, and reducing the reachable network surface:

  • Use safe HTTP clients instead of shell commands:
  • Replace wget shell invocations with native HTTP client libraries that accept strongly typed parameters, preventing option injection through strings.
  • Ensure URLs are passed as distinct parameters rather than interpolated into command lines.
  • Enforce strict URL validation and allowlisting:
  • Restrict chartURL to approved schemes (e.g., https) and known, trusted hostnames or domains.
  • Apply IP-based checks to block access to internal ranges (e.g., RFC1918, link-local, metadata IPs) unless explicitly intended.
  • Normalize and sanitize input before use:
  • Apply robust parsing of the URL into components and reject or normalize unexpected or ambiguous forms.
  • Treat any potentially dangerous characters or patterns as invalid rather than attempting to escape them into shell commands.
  • Constrain component privileges and network reachability:
  • Run mutating webhook and kubeconfiggenerator components with least-privilege network policies, limiting which endpoints they can contact.
  • Use Kubernetes NetworkPolicies or similar controls to block unnecessary egress to sensitive internal services.
  • Harden resource governance:
  • Limit who can create or modify ResourceComposition objects via RBAC and admission policies.
  • Apply policy engines (e.g., admission controllers) to enforce safe chartURL patterns at submission time.

How teams detect issues like this

Detection can focus on both code-level patterns and runtime behavior:

  • Static analysis and code review:
  • Search for use of shell commands (e.g., wget, curl) where arguments incorporate user-controlled fields like chartURL.
  • Flag concatenation or string interpolation into command lines without explicit argument escaping or structured APIs (signal for CWE-88).
  • Identify HTTP requests that derive destinations directly from CRD fields or configuration without validation or host allowlists (signal for CWE-918).
  • Policy-based checks in CI/CD:
  • Enforce development-time policies that prohibit raw shell invocation for network downloads in controller components.
  • Use automated code scanning tools to detect unsanitized command construction and unvalidated URL usage.
  • Runtime monitoring and logging:
  • Enable detailed logging of outgoing requests from KubePlus components, including destination hosts and request headers.
  • Monitor for anomalous outbound traffic patterns such as:
  • Requests to internal IP ranges or metadata services.
  • Unexpected custom headers that resemble injected values.
  • Kubernetes-focused security controls:
  • Employ admission controllers or policy engines (e.g., OPA/Gatekeeper, Kyverno) to validate ResourceComposition objects and reject unsafe chartURL values at admission time.

Sources

SourceLink
gist.github.comgist.github.com/b0b0haha/33baea60fd2a847f11f1fb02e43c64c0
github.comgithub.com/b0b0haha/CVE-2026-29954/blob/main/README.md

Frequently asked

questions

It can be, depending on who can create or modify ResourceComposition resources. If an attacker has remote access to the Kubernetes API (directly or via a compromised service account) and can supply crafted chartURL values, they can exploit the SSRF and command injection behavior through normal API interactions.

The attacker needs sufficient privileges to create or update ResourceComposition objects processed by KubePlus. This may be cluster-admin in locked-down environments, but in multi-tenant clusters it could be any tenant or controller granted rights to manage these resources.

The most robust fix is to remove shell-based wget usage for chart downloads and replace it with a safe HTTP client that takes a validated URL as a parameter, combined with strict URL allowlisting and network policy restrictions. This simultaneously eliminates command-line option injection and reduces SSRF exposure.

Adopt design practices that avoid constructing shell commands from user-influenced data, enforce clear trust boundaries around CRD fields, and apply URL validation plus network egress controls for any component that makes outbound requests based on configuration. Integrating static analysis and policy checks into CI/CD helps catch unsafe patterns before deployment.

Find out what's already
exploitable in your codebase.