{"answers":{"affected":"8 open source packages ship an affected version, including io.fabric8:kubernetes-client. It affects 9 products.","exploited":"There is no known exploitation of CVE-2021-20218 in the wild and no public exploit code.","fix":"Upgrade io.fabric8:kubernetes-client to a fixed version for your release line: 4.13.2, 4.7.2, 4.11.2 or 5.0.2.","what":"CVE-2021-20218 is a high-severity path traversal vulnerability in Redhat Openshift Container Platform, published on 16 Mar 2021. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2021-20218 and fix it if it is affected.\n\nWhat it is: CVE-2021-20218 is a high-severity path traversal vulnerability in Redhat Openshift Container Platform, published on 16 Mar 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2021-20218 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- io.fabric8:kubernetes-client (Maven): affected from 4.12.0; fixed in 4.13.2\n- io.fabric8:kubernetes-client (Maven): affected from 4.12.0; fixed in 4.13.2\n- io.fabric8:kubernetes-client (Maven): affected from 4.2.0; fixed in 4.7.2\n- io.fabric8:kubernetes-client (Maven): affected from 4.2.0; fixed in 4.7.2\n- io.fabric8:kubernetes-client (Maven): affected from 4.8.0; fixed in 4.11.2\n- io.fabric8:kubernetes-client (Maven): affected from 4.8.0; fixed in 4.11.2\n- io.fabric8:kubernetes-client (Maven): affected from 5.0.0; fixed in 5.0.2\n- io.fabric8:kubernetes-client (Maven): affected from 5.0.0; fixed in 5.0.2\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2021-20218/ (Markdown: https://insights.sbomify.com/CVE-2021-20218/index.md)","id":"CVE-2021-20218","markdown":"https://insights.sbomify.com/CVE-2021-20218/index.md","name":"CVE-2021-20218","record":{"aliases":["GHSA-jwh2-ffg4-48xc"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_modify","denial_of_service"],"network_reachable":"yes","non_default_config":false,"product_category":"Kubernetes client library","requires_auth":"none","summary":"A malicious pod can exploit the fabric8 Kubernetes client copy command to extract files outside the intended directory, compromising integrity and availability.","user_interaction":"not_required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"redhat","cpe":[{"product":"a-mq_online","vendor":"redhat"},{"product":"build_of_quarkus","vendor":"redhat"},{"product":"codeready_studio","vendor":"redhat"},{"product":"descision_manager","vendor":"redhat"},{"product":"integration_camel_k","vendor":"redhat"},{"product":"jboss_fuse","vendor":"redhat"},{"product":"kubernetes-client","vendor":"redhat"},{"product":"openshift_container_platform","vendor":"redhat"},{"product":"process_automation","vendor":"redhat"}],"cvss":{"score":7.4,"severity":"high","source":"nvd","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"description":"A flaw was found in the fabric8 kubernetes-client in version 4.2.0 and after. This flaw allows a malicious pod/container to cause applications using the fabric8 kubernetes-client `copy` command to extract files outside the working path. The highest threat from this vulnerability is to integrity and system availability. This has been fixed in kubernetes-client-4.13.2 kubernetes-client-5.0.2 kubernetes-client-4.11.2 kubernetes-client-4.7.2","ecosystems":["Maven"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Improper Limitation of a Pathname to a Restricted Directory in Fabric8 Kubernetes Client","id":"CVE-2021-20218","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Maven","product":"redhat:openshift_container_platform","products":["redhat:openshift_container_platform"],"type":"path_traversal","year":"2021"},"n_packages":8,"n_references":2,"next":{"headline":"Denial of service in kernel","id":"CVE-2021-20219"},"packages":[{"ecosystem":"Maven","fixed":["4.13.2"],"introduced":["4.12.0"],"last_affected":[],"package":"io.fabric8:kubernetes-client","purl":null,"source":"GHSA-jwh2-ffg4-48xc"},{"ecosystem":"Maven","fixed":["4.13.2"],"introduced":["4.12.0"],"last_affected":[],"package":"io.fabric8:kubernetes-client","purl":"pkg:maven/io.fabric8/kubernetes-client","source":"GHSA-jwh2-ffg4-48xc"},{"ecosystem":"Maven","fixed":["4.7.2"],"introduced":["4.2.0"],"last_affected":[],"package":"io.fabric8:kubernetes-client","purl":null,"source":"GHSA-jwh2-ffg4-48xc"},{"ecosystem":"Maven","fixed":["4.7.2"],"introduced":["4.2.0"],"last_affected":[],"package":"io.fabric8:kubernetes-client","purl":"pkg:maven/io.fabric8/kubernetes-client","source":"GHSA-jwh2-ffg4-48xc"},{"ecosystem":"Maven","fixed":["4.11.2"],"introduced":["4.8.0"],"last_affected":[],"package":"io.fabric8:kubernetes-client","purl":null,"source":"GHSA-jwh2-ffg4-48xc"},{"ecosystem":"Maven","fixed":["4.11.2"],"introduced":["4.8.0"],"last_affected":[],"package":"io.fabric8:kubernetes-client","purl":"pkg:maven/io.fabric8/kubernetes-client","source":"GHSA-jwh2-ffg4-48xc"},{"ecosystem":"Maven","fixed":["5.0.2"],"introduced":["5.0.0"],"last_affected":[],"package":"io.fabric8:kubernetes-client","purl":null,"source":"GHSA-jwh2-ffg4-48xc"},{"ecosystem":"Maven","fixed":["5.0.2"],"introduced":["5.0.0"],"last_affected":[],"package":"io.fabric8:kubernetes-client","purl":"pkg:maven/io.fabric8/kubernetes-client","source":"GHSA-jwh2-ffg4-48xc"}],"prev":{"headline":"Denial of service in privoxy","id":"CVE-2021-20217"},"products":["fabric8-kubernetes-client"],"published":"2021-03-16","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2024-08-03","vendors":["n/a"]},"summary":"A malicious pod can exploit the fabric8 Kubernetes client copy command to extract files outside the intended directory, compromising integrity and availability.","url":"https://insights.sbomify.com/CVE-2021-20218/"}