Skip to content

CVE-2017-1002101 - subpath volume mount handling allows arbitrary file access in host filesystem #60813

Closed

Description

@liggitt

CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

This vulnerability allows containers using subpath volume mounts with any volume type (including non-privileged pods, subject to file permissions) to access files/directories outside of the volume, including the host’s filesystem.

Thanks to Maxim Ivanov for reporting this problem.

Vulnerable versions:

  • Kubernetes 1.3.x-1.6.x
  • Kubernetes 1.7.0-1.7.13
  • Kubernetes 1.8.0-1.8.8
  • Kubernetes 1.9.0-1.9.3

Vulnerable configurations:

  • Clusters that allow untrusted users to control pod spec content, and prevent host filesystem access via hostPath volumes (or other volume types) using PodSecurityPolicy (or custom admission plugins)
  • Clusters that make use of subpath volume mounts with untrusted containers or containers that can be compromised

Vulnerability impact:
A specially crafted pod spec combined with malicious container behavior can allow read/write access to arbitrary files outside volumes specified in the pod, including the host’s filesystem. This can be accomplished with any volume type, including emptyDir, and can be accomplished with a non-privileged pod (subject to file permissions).

Mitigations prior to upgrading:
Prevent untrusted users from creating pods (and pod-creating objects like deployments, replicasets, etc), or disable all volume types with PodSecurityPolicy (note that this prevents use of service account tokens in pods, and requires use of automountServiceAccountToken: false)

Fixed versions:

Action Required:
In addition to upgrading, PodSecurityPolicy objects designed to limit container permissions must completely disable hostPath volumes, as the allowedHostPaths feature does not restrict symlink creation and traversal. Future enhancements (tracked in issue #61043) are required to limit hostPath use to read only volumes or exact path matches before a PodSecurityPolicy can effectively restrict hostPath usage to a given subpath.

Known issues:

Activity

  1. self-assigned this
    on Mar 5, 2018
  2. added
    needs-sigIndicates an issue or PR lacks a `sig/foo` label and requires one.
    on Mar 5, 2018
  3. k8s-ci-robot commented on Mar 5, 2018

    @k8s-ci-robot
    Contributor

    @liggitt: There are no sig labels on this issue. Please add a sig label.

    Details

    A sig label can be added by either:

    1. mentioning a sig: @kubernetes/sig-<group-name>-<group-suffix>
      e.g., @kubernetes/sig-contributor-experience-<group-suffix> to notify the contributor experience sig, OR

    2. specifying the label manually: /sig <group-name>
      e.g., /sig scalability to apply the sig/scalability label

    Note: Method 1 will trigger an email to the group. See the group list.
    The <group-suffix> in method 1 has to be replaced with one of these: bugs, feature-requests, pr-reviews, test-failures, proposals

    Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

  4. added
    sig/releaseCategorizes an issue or PR as relevant to SIG Release.
    and removed
    needs-sigIndicates an issue or PR lacks a `sig/foo` label and requires one.
    on Mar 5, 2018
  5. changed the title [-]<placeholder>[/-] [+]CVE-2017-1002101[/+] on Mar 12, 2018
  6. added
    kind/bugCategorizes issue or PR as related to a bug.
    priority/critical-urgentHighest priority. Must be actively worked on as someone's top priority right now.
    sig/storageCategorizes an issue or PR as relevant to SIG Storage.
    and removed
    sig/releaseCategorizes an issue or PR as relevant to SIG Release.
    on Mar 12, 2018
  7. added this to the v1.10 milestone on Mar 12, 2018
  8. 5 remaining items

  9. k8s-github-robot commented on Mar 12, 2018

    @k8s-github-robot

    [MILESTONENOTIFIER] Milestone Issue: Up-to-date for process

    @jsafrane @liggitt @msau42

    Note: This issue is marked as priority/critical-urgent, and must be updated every 1 day during code freeze.

    Example update:

    ACK.  In progress
    ETA: DD/MM/YYYY
    Risks: Complicated fix required
    
    Issue Labels
    • sig/storage: Issue will be escalated to these SIGs if needed.
    • priority/critical-urgent: Never automatically move issue out of a release milestone; continually escalate to contributor and SIG through all available channels.
    • kind/bug: Fixes a bug discovered during the current release.
    Help
  10. added a commit that references this issue on Mar 12, 2018
    3d1331f
  11. changed the title [-]CVE-2017-1002101[/-] [+]CVE-2017-1002101 - subpath volume mount handling allows arbitrary file access in host filesystem[/+] on Mar 12, 2018
  12. dc70184 commented on Mar 23, 2018

    @dc70184

    This article states that:
    •Kubernetes 1.7.0-1.7.13

    Does this mean all versions between 1.7.0 and 1.17.13 are vulnerable? For example, is 1.17.6 vulnerable?

  13. msau42 commented on Mar 23, 2018

    @msau42
    Member

    anything between 1.7.0 and 1.7.13 are vulnerable, including 1.7.6

  14. added a commit that references this issue on Feb 18, 2021
  15. PushkarJ commented on May 16, 2022

    @PushkarJ
    Member

    /label official-cve-feed

    (Related to kubernetes/sig-security#1)

  16. added
    official-cve-feedIssues or PRs related to CVEs officially announced by Security Response Committee (SRC)
    on May 16, 2022
  17. added a commit that references this issue on Jun 26, 2026
    8022d18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area/securitykind/bugCategorizes issue or PR as related to a bug.official-cve-feedIssues or PRs related to CVEs officially announced by Security Response Committee (SRC)priority/critical-urgentHighest priority. Must be actively worked on as someone's top priority right now.sig/storageCategorizes an issue or PR as relevant to SIG Storage.

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions