{"answers":{"affected":"9 open source packages ship an affected version, including k8s.io/kubernetes. It affects 1 product.","exploited":"There is no known exploitation of CVE-2021-25741 in the wild and no public exploit code.","fix":"Upgrade k8s.io/kubernetes to a fixed version for your release line: 1.19.15, 1.20.11, 1.21.5 or 1.22.2.","what":"CVE-2021-25741 is a high-severity path traversal vulnerability in Kubernetes Kubernetes, published on 20 Sep 2021. Any signed-in user can exploit it over the network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2021-25741 and fix it if it is affected.\n\nWhat it is: CVE-2021-25741 is a high-severity path traversal vulnerability in Kubernetes Kubernetes, published on 20 Sep 2021. Any signed-in user can exploit it over the network, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2021-25741 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- k8s.io/kubernetes (Go): affected all versions; fixed in 1.19.15, 1.20.11, 1.21.5, 1.22.2\n- k8s.io/kubernetes (Go): affected all versions; fixed in 1.19.15\n- k8s.io/kubernetes (Go): affected all versions; fixed in 1.19.15\n- k8s.io/kubernetes (Go): affected from 1.20.0; fixed in 1.20.11\n- k8s.io/kubernetes (Go): affected from 1.20.0; fixed in 1.20.11\n- k8s.io/kubernetes (Go): affected from 1.21.0; fixed in 1.21.5\n- k8s.io/kubernetes (Go): affected from 1.21.0; fixed in 1.21.5\n- k8s.io/kubernetes (Go): affected from 1.22.0; fixed in 1.22.2\n- k8s.io/kubernetes (Go): affected from 1.22.0; fixed in 1.22.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-25741/ (Markdown: https://insights.sbomify.com/CVE-2021-25741/index.md)","id":"CVE-2021-25741","markdown":"https://insights.sbomify.com/CVE-2021-25741/index.md","name":"CVE-2021-25741","record":{"aliases":["CLEANSTART-2025-RU72317","DEBIAN-CVE-2021-25741","GHSA-f5f7-6478-qm6p","GO-2022-0910","RHSA-2021:3631","RHSA-2021:3635","RHSA-2021:3642","RHSA-2021:3646"],"analysis":{"component_type":"container_or_infrastructure","fix_type":"upgrade","impacts":["data_read","data_modify"],"network_reachable":"yes","non_default_config":false,"product_category":"Kubernetes container orchestration","requires_auth":"low_privilege","summary":"Attackers can exploit symlink exchanges in subpath volume mounts to access or modify files on the host filesystem outside the intended volume.","user_interaction":"not_required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"kubernetes","cpe":[{"product":"kubernetes","vendor":"kubernetes"}],"cvss":{"score":8.8,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-552","name":"Files or Directories Accessible to External Parties"},{"id":"CWE-20","name":"Improper Input Validation"}],"description":"A security issue was discovered in Kubernetes where a user may be able to create a container with subpath volume mounts to access files \u0026 directories outside of the volume, including on the host filesystem.","ecosystems":["Go","Red Hat:openshift:3.11::el7","Red Hat:openshift:4.6::el7","Red Hat:openshift:4.6::el8","Red Hat:openshift:4.7::el7","Red Hat:openshift:4.7::el8","Red Hat:openshift:4.8::el7","Red Hat:openshift:4.8::el8"],"exploits":{"exploitdb":0,"first_seen":"2022-01-19","github_poc":3,"max_poc_stars":30,"metasploit":0,"nuclei":0,"refs":[{"date":"2022-01-19T14:05:20Z","kind":"github_poc","ref":"https://github.com/Betep0k/CVE-2021-25741","stars":30,"title":"Exploit for CVE-2021-25741 vulnerability"},{"date":"2023-10-19T07:26:11Z","kind":"github_poc","ref":"https://github.com/cdxiaodong/CVE-2021-25741","stars":0,"title":"fork on Betep0k/CVE-2021-25741/fork whose images is useless and test on metarget"},{"date":"2026-03-17T10:28:00Z","kind":"github_poc","ref":"https://github.com/Glutenfree69/ZigRaceExploit","stars":0,"title":"CVE-2021-25741 POC in Zig"}],"tier":"poc_unverified"},"has_fix":true,"headline":"Symlink Exchange Can Allow Host Filesystem Access","id":"CVE-2021-25741","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Go","product":"kubernetes:kubernetes","products":["kubernetes:kubernetes"],"type":"path_traversal","year":"2021"},"n_packages":34,"n_references":3,"next":{"headline":"Ingress-nginx custom snippets allows retrieval of ingress-nginx serviceaccount token and secrets across all namespaces","id":"CVE-2021-25742"},"packages":[{"ecosystem":"Go","fixed":["1.19.15","1.20.11","1.21.5","1.22.2"],"introduced":["0","1.20.0","1.21.0","1.22.0"],"last_affected":[],"package":"k8s.io/kubernetes","purl":"pkg:golang/k8s.io/kubernetes","source":"GO-2022-0910"},{"ecosystem":"Go","fixed":["1.19.15"],"introduced":["0"],"last_affected":[],"package":"k8s.io/kubernetes","purl":null,"source":"GHSA-f5f7-6478-qm6p"},{"ecosystem":"Go","fixed":["1.19.15"],"introduced":["0"],"last_affected":[],"package":"k8s.io/kubernetes","purl":"pkg:golang/k8s.io/kubernetes","source":"GHSA-f5f7-6478-qm6p"},{"ecosystem":"Go","fixed":["1.20.11"],"introduced":["1.20.0"],"last_affected":[],"package":"k8s.io/kubernetes","purl":null,"source":"GHSA-f5f7-6478-qm6p"},{"ecosystem":"Go","fixed":["1.20.11"],"introduced":["1.20.0"],"last_affected":[],"package":"k8s.io/kubernetes","purl":"pkg:golang/k8s.io/kubernetes","source":"GHSA-f5f7-6478-qm6p"},{"ecosystem":"Go","fixed":["1.21.5"],"introduced":["1.21.0"],"last_affected":[],"package":"k8s.io/kubernetes","purl":null,"source":"GHSA-f5f7-6478-qm6p"},{"ecosystem":"Go","fixed":["1.21.5"],"introduced":["1.21.0"],"last_affected":[],"package":"k8s.io/kubernetes","purl":"pkg:golang/k8s.io/kubernetes","source":"GHSA-f5f7-6478-qm6p"},{"ecosystem":"Go","fixed":["1.22.2"],"introduced":["1.22.0"],"last_affected":[],"package":"k8s.io/kubernetes","purl":null,"source":"GHSA-f5f7-6478-qm6p"},{"ecosystem":"Go","fixed":["1.22.2"],"introduced":["1.22.0"],"last_affected":[],"package":"k8s.io/kubernetes","purl":"pkg:golang/k8s.io/kubernetes","source":"GHSA-f5f7-6478-qm6p"},{"ecosystem":"Red Hat:openshift:3.11::el7","fixed":["0:3.11.524-1.git.0.2dffce7.el7"],"introduced":["0"],"last_affected":[],"package":"atomic-openshift","purl":"pkg:rpm/redhat/atomic-openshift","source":"RHSA-2021:3646"},{"ecosystem":"Red Hat:openshift:3.11::el7","fixed":["0:3.11.524-1.git.0.2dffce7.el7"],"introduced":["0"],"last_affected":[],"package":"atomic-openshift-clients","purl":"pkg:rpm/redhat/atomic-openshift-clients","source":"RHSA-2021:3646"},{"ecosystem":"Red Hat:openshift:3.11::el7","fixed":["0:3.11.524-1.git.0.2dffce7.el7"],"introduced":["0"],"last_affected":[],"package":"atomic-openshift-clients-redistributable","purl":"pkg:rpm/redhat/atomic-openshift-clients-redistributable","source":"RHSA-2021:3646"},{"ecosystem":"Red Hat:openshift:3.11::el7","fixed":["0:3.11.524-1.git.0.2dffce7.el7"],"introduced":["0"],"last_affected":[],"package":"atomic-openshift-docker-excluder","purl":"pkg:rpm/redhat/atomic-openshift-docker-excluder","source":"RHSA-2021:3646"},{"ecosystem":"Red Hat:openshift:3.11::el7","fixed":["0:3.11.524-1.git.0.2dffce7.el7"],"introduced":["0"],"last_affected":[],"package":"atomic-openshift-excluder","purl":"pkg:rpm/redhat/atomic-openshift-excluder","source":"RHSA-2021:3646"},{"ecosystem":"Red Hat:openshift:3.11::el7","fixed":["0:3.11.524-1.git.0.2dffce7.el7"],"introduced":["0"],"last_affected":[],"package":"atomic-openshift-hyperkube","purl":"pkg:rpm/redhat/atomic-openshift-hyperkube","source":"RHSA-2021:3646"},{"ecosystem":"Red Hat:openshift:3.11::el7","fixed":["0:3.11.524-1.git.0.2dffce7.el7"],"introduced":["0"],"last_affected":[],"package":"atomic-openshift-hypershift","purl":"pkg:rpm/redhat/atomic-openshift-hypershift","source":"RHSA-2021:3646"},{"ecosystem":"Red Hat:openshift:3.11::el7","fixed":["0:3.11.524-1.git.0.2dffce7.el7"],"introduced":["0"],"last_affected":[],"package":"atomic-openshift-master","purl":"pkg:rpm/redhat/atomic-openshift-master","source":"RHSA-2021:3646"},{"ecosystem":"Red Hat:openshift:3.11::el7","fixed":["0:3.11.524-1.git.0.2dffce7.el7"],"introduced":["0"],"last_affected":[],"package":"atomic-openshift-node","purl":"pkg:rpm/redhat/atomic-openshift-node","source":"RHSA-2021:3646"},{"ecosystem":"Red Hat:openshift:3.11::el7","fixed":["0:3.11.524-1.git.0.2dffce7.el7"],"introduced":["0"],"last_affected":[],"package":"atomic-openshift-pod","purl":"pkg:rpm/redhat/atomic-openshift-pod","source":"RHSA-2021:3646"},{"ecosystem":"Red Hat:openshift:3.11::el7","fixed":["0:3.11.524-1.git.0.2dffce7.el7"],"introduced":["0"],"last_affected":[],"package":"atomic-openshift-sdn-ovs","purl":"pkg:rpm/redhat/atomic-openshift-sdn-ovs","source":"RHSA-2021:3646"},{"ecosystem":"Red Hat:openshift:3.11::el7","fixed":["0:3.11.524-1.git.0.2dffce7.el7"],"introduced":["0"],"last_affected":[],"package":"atomic-openshift-template-service-broker","purl":"pkg:rpm/redhat/atomic-openshift-template-service-broker","source":"RHSA-2021:3646"},{"ecosystem":"Red Hat:openshift:3.11::el7","fixed":["0:3.11.524-1.git.0.2dffce7.el7"],"introduced":["0"],"last_affected":[],"package":"atomic-openshift-tests","purl":"pkg:rpm/redhat/atomic-openshift-tests","source":"RHSA-2021:3646"},{"ecosystem":"Red Hat:openshift:4.6::el7","fixed":["0:4.6.0-202109180038.p0.git.d5ed12c.assembly.stream.el7"],"introduced":["0"],"last_affected":[],"package":"openshift","purl":"pkg:rpm/redhat/openshift","source":"RHSA-2021:3642"},{"ecosystem":"Red Hat:openshift:4.6::el7","fixed":["0:4.6.0-202109180038.p0.git.d5ed12c.assembly.stream.el7"],"introduced":["0"],"last_affected":[],"package":"openshift-hyperkube","purl":"pkg:rpm/redhat/openshift-hyperkube","source":"RHSA-2021:3642"},{"ecosystem":"Red Hat:openshift:4.6::el8","fixed":["0:4.6.0-202109180038.p0.git.d5ed12c.assembly.stream.el8"],"introduced":["0"],"last_affected":[],"package":"openshift","purl":"pkg:rpm/redhat/openshift","source":"RHSA-2021:3642"},{"ecosystem":"Red Hat:openshift:4.6::el8","fixed":["0:4.6.0-202109180038.p0.git.d5ed12c.assembly.stream.el8"],"introduced":["0"],"last_affected":[],"package":"openshift-hyperkube","purl":"pkg:rpm/redhat/openshift-hyperkube","source":"RHSA-2021:3642"},{"ecosystem":"Red Hat:openshift:4.7::el7","fixed":["0:4.7.0-202109172126.p0.git.bbbc079.assembly.stream.el7"],"introduced":["0"],"last_affected":[],"package":"openshift","purl":"pkg:rpm/redhat/openshift","source":"RHSA-2021:3635"},{"ecosystem":"Red Hat:openshift:4.7::el7","fixed":["0:4.7.0-202109172126.p0.git.bbbc079.assembly.stream.el7"],"introduced":["0"],"last_affected":[],"package":"openshift-hyperkube","purl":"pkg:rpm/redhat/openshift-hyperkube","source":"RHSA-2021:3635"},{"ecosystem":"Red Hat:openshift:4.7::el8","fixed":["0:4.7.0-202109172126.p0.git.bbbc079.assembly.stream.el8"],"introduced":["0"],"last_affected":[],"package":"openshift","purl":"pkg:rpm/redhat/openshift","source":"RHSA-2021:3635"},{"ecosystem":"Red Hat:openshift:4.7::el8","fixed":["0:4.7.0-202109172126.p0.git.bbbc079.assembly.stream.el8"],"introduced":["0"],"last_affected":[],"package":"openshift-hyperkube","purl":"pkg:rpm/redhat/openshift-hyperkube","source":"RHSA-2021:3635"},{"ecosystem":"Red Hat:openshift:4.8::el7","fixed":["0:4.8.0-202109180335.p0.git.a620f50.assembly.stream.el7"],"introduced":["0"],"last_affected":[],"package":"openshift","purl":"pkg:rpm/redhat/openshift","source":"RHSA-2021:3631"},{"ecosystem":"Red Hat:openshift:4.8::el7","fixed":["0:4.8.0-202109180335.p0.git.a620f50.assembly.stream.el7"],"introduced":["0"],"last_affected":[],"package":"openshift-hyperkube","purl":"pkg:rpm/redhat/openshift-hyperkube","source":"RHSA-2021:3631"},{"ecosystem":"Red Hat:openshift:4.8::el8","fixed":["0:4.8.0-202109180335.p0.git.a620f50.assembly.stream.el8"],"introduced":["0"],"last_affected":[],"package":"openshift","purl":"pkg:rpm/redhat/openshift","source":"RHSA-2021:3631"},{"ecosystem":"Red Hat:openshift:4.8::el8","fixed":["0:4.8.0-202109180335.p0.git.a620f50.assembly.stream.el8"],"introduced":["0"],"last_affected":[],"package":"openshift-hyperkube","purl":"pkg:rpm/redhat/openshift-hyperkube","source":"RHSA-2021:3631"}],"prev":{"headline":"Holes in EndpointSlice Validation Enable Host Network Hijack","id":"CVE-2021-25740"},"products":["Kubernetes"],"published":"2021-09-20","related":[{"cvss_score":9.8,"headline":"Privilege Escalation in Kubernetes","id":"CVE-2018-1002105","kev_date_added":null,"published":"2018-12-05"},{"cvss_score":9.8,"headline":"Kubernetes Privilege Escalation","id":"CVE-2017-1000056","kev_date_added":null,"published":"2017-07-13"},{"cvss_score":9.8,"headline":"Authorization bypass in Openshift","id":"CVE-2016-1906","kev_date_added":null,"published":"2016-02-03"},{"cvss_score":8.8,"headline":"Kubernetes - Windows nodes - Insufficient input sanitization leads to privilege escalation","id":"CVE-2023-3676","kev_date_added":null,"published":"2023-10-31"},{"cvss_score":8.8,"headline":"Kubernetes - Windows nodes - Insufficient input sanitization leads to privilege escalation","id":"CVE-2023-3955","kev_date_added":null,"published":"2023-10-31"},{"cvss_score":8.8,"headline":"Path traversal in Kubernetes","id":"CVE-2017-1002101","kev_date_added":null,"published":"2018-03-13"}],"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":"CC BY 4.0","name":"Go Vulnerability Database","prefix":"GO"},{"class":"attribution","licence":"CC BY 4.0","name":"Red Hat","prefix":"RHSA"},{"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)"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2024-09-16","vendors":["Kubernetes"]},"summary":"Attackers can exploit symlink exchanges in subpath volume mounts to access or modify files on the host filesystem outside the intended volume.","url":"https://insights.sbomify.com/CVE-2021-25741/"}