Critical Security Flaw in ruby-kubeclient: Man-in-the-Middle Vulnerability

ruby-kubeclient Updated 02 Oct 2025

Summary

25/03/2022
N/A
No i
High
8.1

UBUNTU-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 2.3.0-2 – 3.0.0-1. No fix is published. 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 Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

ruby-kubeclient is a Ruby client library designed for interacting with the Kubernetes REST API. It allows developers to manage Kubernetes resources programmatically. The library is widely used in applications that require Kubernetes integration. However, it has been found to have a significant security flaw that affects its ability to properly validate certificates in kubeconfig files.

Vulnerability Detail

A flaw was discovered in all versions of kubeclient up to (but not including) v4.9.3, where the library improperly parses kubeconfig files. If a kubeconfig file does not specify a custom Certificate Authority (CA) for certificate verification, kubeclient defaults to accepting any certificate, effectively returning VERIFY_NONE. This vulnerability exposes Ruby applications that utilize kubeclient to potential Man-in-the-Middle (MITM) attacks, allowing an attacker to intercept and manipulate communications between the application and the Kubernetes API.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As a temporary workaround, users can manually specify a custom CA in their kubeconfig files to enforce certificate validation. This can be done by adding the following lines to the kubeconfig file:

clusters:
- cluster:
    certificate-authority: /path/to/ca.crt
    server: https://your-kubernetes-api-server
  name: your-cluster-name

Conclusion

The ruby-kubeclient library has a critical vulnerability that can lead to serious security risks if not addressed. Users are strongly advised to update to the latest version to mitigate the risk of Man-in-the-Middle attacks. Additionally, implementing a custom CA in kubeconfig files can serve as a temporary workaround until the update is applied.

See every vulnerability recorded for ruby-kubeclient →

Share this vulnerability

FAQ

The CVSS score of this vulnerability is 8.1, indicating a high severity level.

All versions of ruby-kubeclient up to (but not including) v4.9.3 are affected by this vulnerability.

If exploited, this vulnerability could allow attackers to perform Man-in-the-Middle attacks, intercepting and altering communications between the application and the Kubernetes API.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

Yes, Vulert can monitor and alert you in real-time for open-source vulnerabilities in your software using just a manifest file like package-lock.json.

Related vulnerabilities

Recent vulnerabilities recorded for ruby-kubeclient.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. 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