Skip to content

CVE-2018-1002100: Kubectl copy doesn't check for paths outside of it's destination directory. #61297

@brendandburns

Description

@brendandburns

Is this a BUG REPORT or FEATURE REQUEST?: Bug

/kind bug

What happened:
kubectl cp :/some/remote/dir /some/local/dir

If the container returns a malformed tarfile with paths like:

'/some/remote/dir/../../../../tmp/foo' kubectl writes this to /tmp/foo instead of /some/local/dir/tmp/foo

What you expected to happen:

I expect kubectl to clean up the path and write to /some/local/dir/tmp/foo

Notes
Original credit to @hansmi (Michael Hanselmann) for originally reporting the bug.

Tracked as CVE-2018-1002100

Metadata

Metadata

Assignees

No one assigned

    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/cliCategorizes an issue or PR as relevant to SIG CLI.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions