CVE-2021-25741: Files or Directories Accessible to External Parties in Kubernetes

k8s.io/kubernetes Updated 02 Oct 2025

Summary

01/11/2021
Yes i
High
8.1

CVE-2021-25741: Files or Directories Accessible to External Parties in kubernetes. Affects k8s.io/kubernetes across 4 version ranges.

< 1.19.15 >= 1.20.0, < 1.20.11 >= 1.21.0, < 1.21.5 >= 1.22.0, < 1.22.2

Fixed in 4 releases; the minimum fixed version depends on the release line you run. How to fix ↓

Also tracked for

The same CVE-2021-25741 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

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

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

Kubernetes is an open-source container orchestration platform that automates the deployment, scaling, and management of containerized applications. It provides a highly scalable and flexible environment for running applications in containers. The vulnerability identified as CVE-2021-25741 allows a user to create a container with subpath volume mounts, enabling unauthorized access to files and directories outside of the volume, including the host filesystem.

Vulnerability Detail

The security issue in Kubernetes arises from the ability to create containers with subpath volume mounts. This allows an attacker to access sensitive files and directories outside of the intended volume, potentially compromising the host filesystem. The vulnerability has a CVSS score of 8.1, indicating a high severity level. Exploitation of this vulnerability could lead to unauthorized access, data leakage, or even complete system compromise. The vulnerability affects versions 0.0.0 to 1.19.15, 1.20.0 to 1.20.11, 1.21.0 to 1.21.5, and 1.22.0 to 1.22.2 of the k8s.io/kubernetes package.

How To Fix

Latest published version: v1.37.1 as of 23 Oct 2026

go get k8s.io/kubernetes@v1.37.1

Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • < 1.19.15 1.19.15
    go get k8s.io/kubernetes@v1.19.15
  • >= 1.20.0, < 1.20.11 1.20.11
    go get k8s.io/kubernetes@v1.20.11
  • >= 1.21.0, < 1.21.5 1.21.5
    go get k8s.io/kubernetes@v1.21.5
  • >= 1.22.0, < 1.22.2 1.22.2
    go get k8s.io/kubernetes@v1.22.2

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

As a temporary workaround, users can disable the use of subpath volume mounts in their Kubernetes configurations. This can be achieved by modifying the relevant YAML files to remove any subpath volume mounts. However, this workaround may impact the functionality of certain applications or services that rely on subpath volume mounts. Therefore, it is recommended to apply the official fix by upgrading to the fixed versions of the k8s.io/kubernetes package.

Conclusion

The vulnerability in Kubernetes allows unauthorized access to files and directories outside of the intended volume, potentially compromising the host filesystem. It is crucial to promptly upgrade to the fixed versions of the k8s.io/kubernetes package to mitigate this vulnerability. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for k8s.io/kubernetes →

Share this vulnerability

FAQ

Kubernetes is an open-source container orchestration platform that automates the deployment, scaling, and management of containerized applications.

The vulnerability allows unauthorized access to files and directories outside of the intended volume, potentially compromising the host filesystem. This can lead to unauthorized access, data leakage, or system compromise.

To fix this vulnerability, upgrade to the fixed versions of the k8s.io/kubernetes package as recommended.

A temporary workaround is to disable the use of subpath volume mounts in Kubernetes configurations. However, this may impact the functionality of certain applications or services.

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

Related vulnerabilities

Recent vulnerabilities recorded for k8s.io/kubernetes.

How To Fix

Latest published version: v1.37.1 as of 23 Oct 2026

go get k8s.io/kubernetes@v1.37.1

Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • < 1.19.15 1.19.15
    go get k8s.io/kubernetes@v1.19.15
  • >= 1.20.0, < 1.20.11 1.20.11
    go get k8s.io/kubernetes@v1.20.11
  • >= 1.21.0, < 1.21.5 1.21.5
    go get k8s.io/kubernetes@v1.21.5
  • >= 1.22.0, < 1.22.2 1.22.2
    go get k8s.io/kubernetes@v1.22.2

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. 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