CVE-2024-56514: Github.com/karmada io/karmada Karmada Tar Slips Vulnerability

MODERATE
Advisory Identifier: GHSA-cwrh-575j-8vr3
CWE-22
Published
Advisory Summary

CVE-2024-56514 is a MODERATE karmada tar slips vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Github.com/karmada io/karmada libraries in the Go ecosystem. The issue involves karmada tar slips in crds archive extraction. Remediation is available by upgrading affected packages to version 1.12.0.

CVE-2024-56514 at a Glance

CVE Identifier CVE-2024-56514
GHSA Identifier GHSA-cwrh-575j-8vr3
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected Product Github.com/karmada io/karmada
Package Ecosystem Go
Published Date
Last Updated

How to Fix CVE-2024-56514

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

github.com/karmada-io/karmada fixed: 1.12.0
Upgrade github.com/karmada-io/karmada to 1.12.0
Verify Direct and Transitive Dependencies

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

inspect dependencies for github.com/karmada-io/karmada

How to Check if You Are Affected

To determine whether your application is affected by CVE-2024-56514, inspect your project dependencies for Github.com/karmada io/karmada:

inspect dependencies for github.com/karmada-io/karmada

Analyze the terminal output to locate any version of Github.com/karmada io/karmada in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.12.0), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In Github.com/karmada io/karmada, 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

### Impact _What kind of vulnerability is it? Who is impacted?_ Both in karmadactl and karmada-operator, it is possible to supply a filesystem path, or an HTTP(s) URL to retrieve the custom resource definitions(CRDs) needed by karmada. The CRDs are downloaded as a gzipped tarfile and are vulnerable to a TarSlip vulnerability. An attacker able to supply a malicious CRD file into a karmada initialization could write arbitrary files in arbitrary paths of the filesystem. ### Patches _Has the problem been patched? What versions should users upgrade to?_ From karmada version v1.12.0, when processing custom CRDs files, CRDs archive verification is utilized to enhance file system robustness. ### Workarounds _Is there a way for users to fix or remediate the vulnerability without upgrading?_ When using `karmadactl init` to set up Karmada, if you need to set flag `--crd` to customize the CRD files required for karmada initialization, you can manually inspect the CRD files to check whether they contain sequences such as `../` that would alter file paths, to determine if they potentially include malicious files. When using karmada-operator to set up Karmada, you must upgrade your karmada-operator to one of the fixed versions. ### References _Are there any links users can visit to find out more?_ 1. Enhancements made from the Karmada community: https://github.com/karmada-io/karmada/pull/5713, https://github.com/karmada-io/karmada/pull/5703

CVE-2024-56514 Affected Github.com/karmada io/karmada Versions

1 component(s)
Fixed Versions:
1.12.0
Product / Package Ecosystem Affected Versions Fixed Version
github.com/karmada-io/karmada
Go
< 1.12.0
1.12.0

References

Frequently Asked Questions

What is CVE-2024-56514?
CVE-2024-56514 is a security vulnerability in Github.com/karmada io/karmada involving Karmada Tar Slips in CRDs archive extraction under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
Which Github.com/karmada io/karmada versions are affected?
Affected versions include releases prior to 1.12.0 across affected packages: github.com/karmada-io/karmada.
What version fixes CVE-2024-56514?
Upgrading to 1.12.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/karmada-io/karmada affected?
Yes, github.com/karmada-io/karmada is affected in releases prior to 1.12.0. Upgrade your dependency to 1.12.0 or later.
What CWE is associated with CVE-2024-56514?
CVE-2024-56514 is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.).
How can I check Go dependencies for CVE-2024-56514?
Run the dependency tree command: 'inspect dependencies for github.com/karmada-io/karmada'. 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-cwrh-575j-8vr3",
  "modified" : "2025-01-03T19:25:56Z",
  "published" : "2025-01-03T16:15:54Z",
  "aliases" : [ "CVE-2024-56514" ],
  "summary" : "Karmada Tar Slips in CRDs archive extraction",
  "details" : "### Impact\n_What kind of vulnerability is it? Who is impacted?_\n\nBoth in karmadactl and karmada-operator, it is possible to supply a filesystem path, or an HTTP(s) URL to retrieve the custom resource definitions(CRDs) needed by karmada. The CRDs are downloaded as a gzipped tarfile and are vulnerable to a TarSlip vulnerability. An attacker able to supply a malicious CRD file into a karmada initialization could write arbitrary files in arbitrary paths of the filesystem.\n\n### Patches\n_Has the problem been patched? What versions should users upgrade to?_\n\nFrom karmada version v1.12.0, when processing custom CRDs files, CRDs archive verification is utilized to enhance file system robustness.\n\n### Workarounds\n_Is there a way for users to fix or remediate the vulnerability without upgrading?_\n\nWhen using `karmadactl init` to set up Karmada, if you need to set flag `--crd` to customize the CRD files required for karmada initialization, you can manually inspect the CRD files to check whether they contain sequences such as `../` that would alter file paths, to determine if they potentially include malicious files. \n\nWhen using karmada-operator to set up Karmada, you must upgrade your karmada-operator to one of the fixed versions.\n\n### References\n_Are there any links users can visit to find out more?_\n\n1. Enhancements made from the Karmada community: https://github.com/karmada-io/karmada/pull/5713, https://github.com/karmada-io/karmada/pull/5703\n",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/karmada-io/karmada"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.12.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/karmada-io/karmada/security/advisories/GHSA-cwrh-575j-8vr3"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-56514"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/karmada-io/karmada/pull/5703"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/karmada-io/karmada/pull/5713"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/karmada-io/karmada/commit/40ec488b18a461ab0f871d2c9ec8665b361f0d50"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/karmada-io/karmada/commit/f78e7e2a3d02bed04e9bc7abd3ae7b3ac56862d2"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/karmada-io/karmada"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-01-03T16:15:54Z",
    "nvd_published_at" : "2025-01-03T17:15:09Z"
  }
}