Security Flaw in kubeclient: Man-in-the-Middle Vulnerability in Ruby Kubernetes Client

ruby-kubeclient Updated 02 Oct 2025

Summary

25/03/2022
N/A
Yes i
Unrated
Not published

DEBIAN-CVE-2022-0759: A flaw was found in all versions of kubeclient up to (but not including) v4.9.3, the Ruby client for Kubernetes REST API, in the way it parsed kubeconfig files. Affects ruby-kubeclient versions < 4.9.3-1. Fixed in 4.9.3-1. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

The kubeclient is a Ruby client for interacting with the Kubernetes REST API, allowing developers to manage Kubernetes resources programmatically. It is widely used in Ruby applications that require Kubernetes integration. However, prior to version 4.9.3, kubeclient had a critical flaw in how it parsed kubeconfig files, which could lead to severe security risks.

Vulnerability Detail

A flaw was found in all versions of kubeclient up to (but not including) v4.9.3, specifically in the way it parsed kubeconfig files. When the kubeconfig file does not configure a custom Certificate Authority (CA) to verify certificates, kubeclient incorrectly accepts any certificate, effectively returning VERIFY_NONE. This vulnerability exposes Ruby applications that utilize kubeclient to Man-in-the-Middle (MITM) attacks, allowing malicious actors to intercept and manipulate communications between the application and the Kubernetes API.

How To Fix

Minimum fixed version

4.9.3-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade ruby-kubeclient

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, ensure that your kubeconfig file is configured with a custom CA to verify certificates. This can be done by specifying the CA file in your kubeconfig under the 'clusters' section, like so: 'clusters: - cluster: server: https://your-kubernetes-api-server:6443 ca-file: /path/to/your/ca.crt'. This will help mitigate the risk of MITM attacks until you can update to the patched version.

Conclusion

The kubeclient vulnerability poses a significant risk to Ruby applications that interact with Kubernetes. It is crucial to update to the patched version 4.9.3-1 or later to mitigate the risk of Man-in-the-Middle attacks. Additionally, configuring a custom CA in your kubeconfig file can serve as a temporary workaround until the update is applied.

See every vulnerability recorded for ruby-kubeclient →

Share this vulnerability

FAQ

Kubeclient is a Ruby library that provides a client for interacting with the Kubernetes REST API, enabling developers to manage Kubernetes resources programmatically.

The vulnerability allows kubeclient to accept any certificate when a custom CA is not configured, making it susceptible to Man-in-the-Middle attacks.

You can use Vulert, which monitors open-source vulnerabilities in your software. By simply uploading your manifest file like package-lock.json, you can check for vulnerabilities without any installation.

As a temporary measure, configure your kubeconfig file to use a custom CA for certificate verification to reduce the risk of MITM attacks.

Detailed information about this vulnerability can be found in the Debian CVE database, specifically under DEBIAN-CVE-2022-0759.

Related vulnerabilities

Recent vulnerabilities recorded for ruby-kubeclient.

How To Fix

Minimum fixed version

4.9.3-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade ruby-kubeclient

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback