Vulnerabilities in pkg:maven/io.fabric8/kubernetes-client

PACKAGE
Advisory Identifier: GHSA-98g7-rxmf-rrxm
Advisory Summary

CVE-2021-4178 is a MODERATE (CVSS 6.7) fabric8 kubernetes-client vulnerable vulnerability (CWE-502: Deserialization of Untrusted Data) affecting Kubernetes client libraries in the Maven ecosystem. The issue involves fabric8 kubernetes-client vulnerable. Remediation is available by upgrading affected packages to version 5.0.3, 5.1.2, 5.3.2, 5.7.4, 5.8.1, 5.10.2, 5.11.2.

2 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:maven/io.fabric8/kubernetes-client

2 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:maven/io.fabric8/kubernetes-client. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-98g7-rxmf-rrxm CVE-2021-4178 MODERATE fabric8 kubernetes-client vulnerable
GHSA-jwh2-ffg4-48xc CVE-2021-20218 HIGH Improper Limitation of a Pathname to a Restricted Directory in Fabric8 Kubernetes Client

CVE-2021-4178 at a Glance

CVE Identifier CVE-2021-4178
GHSA Identifier GHSA-98g7-rxmf-rrxm
Severity MODERATE
CVSS v3.1 Base Score 6.7
CWE Classification CWE-502: Deserialization of Untrusted Data
Affected Product Kubernetes client
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 6.7

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Local (AV:L)
Attack Complexity Low (AC:L)
Privileges Required High (PR:H)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2021-4178

To remediate this vulnerability, upgrade all affected Kubernetes client dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

io.fabric8:kubernetes-client fixed: 5.0.3
<dependency>
    <groupId>io.fabric8</groupId>
    <artifactId>kubernetes-client</artifactId>
    <version>5.0.3</version>
</dependency>
io.fabric8:kubernetes-client fixed: 5.1.2
<dependency>
    <groupId>io.fabric8</groupId>
    <artifactId>kubernetes-client</artifactId>
    <version>5.1.2</version>
</dependency>
io.fabric8:kubernetes-client fixed: 5.3.2
<dependency>
    <groupId>io.fabric8</groupId>
    <artifactId>kubernetes-client</artifactId>
    <version>5.3.2</version>
</dependency>
io.fabric8:kubernetes-client fixed: 5.7.4
<dependency>
    <groupId>io.fabric8</groupId>
    <artifactId>kubernetes-client</artifactId>
    <version>5.7.4</version>
</dependency>
io.fabric8:kubernetes-client fixed: 5.8.1
<dependency>
    <groupId>io.fabric8</groupId>
    <artifactId>kubernetes-client</artifactId>
    <version>5.8.1</version>
</dependency>
io.fabric8:kubernetes-client fixed: 5.10.2
<dependency>
    <groupId>io.fabric8</groupId>
    <artifactId>kubernetes-client</artifactId>
    <version>5.10.2</version>
</dependency>
io.fabric8:kubernetes-client fixed: 5.11.2
<dependency>
    <groupId>io.fabric8</groupId>
    <artifactId>kubernetes-client</artifactId>
    <version>5.11.2</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=io.fabric8

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2021-4178, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=io.fabric8

Analyze the terminal output to locate any version of Kubernetes client in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.0.3), your application is affected.

Note: The mvn dependency:tree -Dincludes=io.fabric8 command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-502: Deserialization of Untrusted Data, where the product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid. In Kubernetes client, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

fabric8 Kubernetes client had an arbitrary code execution flaw in versions 5.0.0-beta-1 and higher. Attackers could potentially insert malicious YAMLs due to misconfigured YAML parsing.

CVE-2021-4178 Affected Kubernetes client Versions

7 component(s)
Fixed Versions:
5.0.35.1.25.3.25.7.45.8.15.10.25.11.2
Product / Package Ecosystem Affected Versions Fixed Version
io.fabric8:kubernetes-client
Maven
≥ 5.0.0-beta-1
< 5.0.3
5.0.3
io.fabric8:kubernetes-client
Maven
≥ 5.1.0
< 5.1.2
5.1.2
io.fabric8:kubernetes-client
Maven
≥ 5.2.0
< 5.3.2
5.3.2
io.fabric8:kubernetes-client
Maven
≥ 5.5.0
< 5.7.4
5.7.4
io.fabric8:kubernetes-client
Maven
≥ 5.8.0
< 5.8.1
5.8.1
io.fabric8:kubernetes-client
Maven
≥ 5.9.0
< 5.10.2
5.10.2
io.fabric8:kubernetes-client
Maven
≥ 5.11.0
< 5.11.2
5.11.2

References

Frequently Asked Questions

What is CVE-2021-4178?
CVE-2021-4178 is a security vulnerability in Kubernetes client involving fabric8 kubernetes-client vulnerable under CWE-502: Deserialization of Untrusted Data.
Which Kubernetes client versions are affected?
Affected versions include releases prior to 5.0.3, 5.1.2, 5.3.2, 5.7.4, 5.8.1, 5.10.2, 5.11.2 across affected packages: io.fabric8:kubernetes-client.
What version fixes CVE-2021-4178?
Upgrading to 5.0.3, 5.1.2, 5.3.2, 5.7.4, 5.8.1, 5.10.2, 5.11.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is kubernetes-client affected?
Yes, io.fabric8:kubernetes-client is affected in releases prior to 5.0.3, 5.1.2, 5.3.2, 5.7.4, 5.8.1, 5.10.2, 5.11.2. Upgrade your dependency to 5.0.3, 5.1.2, 5.3.2, 5.7.4, 5.8.1, 5.10.2, 5.11.2 or later.
What is the CVSS score of CVE-2021-4178?
CVE-2021-4178 has a CVSS v3.1 base score of 6.7 (MODERATE) with vector string CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2021-4178?
CVE-2021-4178 is classified under CWE-502: Deserialization of Untrusted Data (The product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid.).
How can I check Maven dependencies for CVE-2021-4178?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=io.fabric8'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-98g7-rxmf-rrxm",
  "modified" : "2022-09-08T14:19:24Z",
  "published" : "2022-07-15T05:17:35Z",
  "aliases" : [ "CVE-2021-4178" ],
  "summary" : "fabric8 kubernetes-client vulnerable ",
  "details" : "fabric8 Kubernetes client had an arbitrary code execution flaw in versions 5.0.0-beta-1 and higher. Attackers could potentially insert malicious YAMLs due to misconfigured YAML parsing.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "io.fabric8:kubernetes-client"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.0.0-beta-1"
      }, {
        "fixed" : "5.0.3"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "io.fabric8:kubernetes-client"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.1.0"
      }, {
        "fixed" : "5.1.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "io.fabric8:kubernetes-client"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.2.0"
      }, {
        "fixed" : "5.3.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "io.fabric8:kubernetes-client"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.5.0"
      }, {
        "fixed" : "5.7.4"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "io.fabric8:kubernetes-client"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.8.0"
      }, {
        "fixed" : "5.8.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "io.fabric8:kubernetes-client"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.9.0"
      }, {
        "fixed" : "5.10.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "io.fabric8:kubernetes-client"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.11.0"
      }, {
        "fixed" : "5.11.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-4178"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/fabric8io/kubernetes-client/issues/3653"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/fabric8io/kubernetes-client/commit/445103004d1ed3153d5abb272473451d05891e39"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/security/cve/cve-2021-4178"
  }, {
    "type" : "WEB",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=2034388"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/fabric8io/kubernetes-client"
  }, {
    "type" : "WEB",
    "url" : "https://www.mend.io/vulnerability-database/CVE-2021-4178"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-502", "CWE-94" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-07-15T05:17:35Z",
    "nvd_published_at" : "2022-08-24T16:15:00Z"
  }
}