VOOZH about

URL: https://thenewstack.io/critical-vulnerability-found-in-docker-copy/

⇱ Critical Vulnerability Found in Docker Copy - The New Stack


TNS
SUBSCRIBE
Join our community of software engineering leaders and aspirational developers. Always stay in-the-know by getting the most important news and exclusive content delivered fresh to your inbox to learn more about at-scale software development.
REQUIRED
It seems that you've previously unsubscribed from our newsletter in the past. Click the button below to open the re-subscribe form in a new tab. When you're done, simply close that tab and continue with this form to complete your subscription.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.
Welcome and thank you for joining The New Stack community!
Please answer a few simple questions to help us deliver the news and resources you are interested in.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Great to meet you!
Tell us a bit about your job so we can cover the topics you find most relevant.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Welcome!

We’re so glad you’re here. You can expect all the best TNS content to arrive Monday through Friday to keep you on top of the news and at the top of your game.

What’s next?

Check your inbox for a confirmation email where you can adjust your preferences and even join additional groups.

Follow TNS on your favorite social media networks.

Become a TNS follower on LinkedIn.

Check out the latest featured and trending stories while you wait for your first TNS newsletter.

PREV
1 of 2
NEXT
VOXPOP
As a JavaScript developer, what non-React tools do you use most often?
Angular
0%
Astro
0%
Svelte
0%
Vue.js
0%
Other
0%
I only use React
0%
I don't use JavaScript
0%
Thanks for your opinion! Subscribe below to get the final results, published exclusively in our TNS Update newsletter:
NEW! Try Stackie AI
From clobbered drafts to real-time sync
Apr 14th 2026 10:00am, by David Moore
TypeScript 6.0 RC arrives as a bridge to a faster future
Mar 14th 2026 9:00am, by Darryl K. Taft
Mastra empowers web devs to build AI agents in TypeScript
Jan 28th 2026 11:00am, by Loraine Lawson
2019-11-21 07:00:46
Critical Vulnerability Found in Docker Copy
news,
Containers / Security

Critical Vulnerability Found in Docker Copy

Unit 42, the threat intelligence team at Palo Alto Networks, has released research on a proof of concept for what the company claims might be the most severe Docker copy command ("docker cp") vulnerability yet to be discovered. This new vulnerability allows an attacker to take full root control of the host and any/all containers found within.
Nov 21st, 2019 7:00am by Jack Wallen
👁 Featued image for: Critical Vulnerability Found in Docker Copy

Unit 42, the threat intelligence team at Palo Alto Networks, has released research on a proof of concept for what the company claims might be the most severe Docker copy command (“docker cp”) vulnerability yet to be discovered. This new vulnerability allows an attacker to take full root control of the host and any/all containers found within.

The vulnerability, CVE-2019-14271, has already been modified and is awaiting reanalysis, which may result in further changes to the known information. This vulnerability has a base score of 9.8, which makes it critical.

The vulnerability is centered on the docker cp command, which allows the copying of files between host and container as well as from container to container. The command syntax is similar to that of the standard Linux cp command, so:

docker cp container:/source_directory /target_directory

Where container is the name of the container, source_directory is the directory where the data will be copied from, and target_directory is the directory where the data will be copied to. To achieve the copy, Docker uses the docker-tar helper process, which works by chrooting into the container, archiving the requested files, and passing the resultant tar files to the Docker daemon, which extracts it into the target directory.

It is the chrooting process that allows for the vulnerability discovered by Unit 42, according to Yuval Avrahami, a senior security researcher at Palo Alto Networks. The docker-tar utility “mistakenly loaded libraries, specifically libnss libraries, from the container instead of from the host.”

“The vulnerability was discovered because a user complained in a Docker GitHub issue about a bug he experienced in the docker cp command, not knowing the underlying cause of it was a severe vulnerability.” Avrahami noted, “The user tried to copy files out of a debian:buster-slim container, which is one of the few images that don’t include the libnss libraries. Therefore, when the docker-tar process tried to load the libraries from the container, it failed to find them and crashed.”

This discovery led the Docker maintainers who handled the GitHub issue to realize the cause of the user’s bug was a severe vulnerability, quickly patched it and assigned the CVE.

What Can Developers Do?

When asked what developers and admins should do to protect themselves against the issues, Avrahami said, “First and foremost, make sure you’re not running the vulnerable Docker version. The fix is included in Docker versions 19.03.01 and newer.” Avrahami also added, “Running containers as a non-root user can also mitigate this kind of attack.” Because most breakout vulnerabilities require root access in the container, it is extremely difficult for attackers to achieve such a state if the container runs as a non-root user. Avrahami continues by saying, “In addition to that, never run images from an untrusted source, as they might be malicious and try to take over your host.”

This, of course, leads us to question what is the weakest point with Docker containers: the shared kernel, which “can be challenging to secure,” Avrahami concluded. “As opposed to traditional VMs, containers share the kernel with the host. That means vulnerabilities in the kernel allow containers to compromise the entire host.”

“There are ways to restrict this attack surface though,” he said. “And the best way to do it is by running containers as a non-root user.” Why? Because running containers as a non-root user mitigates a significant portion of exploitable kernel vulnerabilities.

Palo Alto Networks is a sponsor of The New Stack.

Feature image via Pixabay.

TRENDING STORIES
Jack Wallen is what happens when a Gen Xer mind-melds with present-day snark. Jack is a seeker of truth and a writer of words with a quantum mechanical pencil and a disjointed beat of sound and soul. Although he resides...
Read more from Jack Wallen
SHARE THIS STORY
TRENDING STORIES
TNS owner Insight Partners is an investor in: Docker, Unit.
SHARE THIS STORY
TRENDING STORIES
TNS DAILY NEWSLETTER Receive a free roundup of the most recent TNS articles in your inbox each day.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.