Hexret
CVE-2018-15664high 7.5PoC available

docker cp symlink-exchange race (host filesystem escape)

A copy handler resolves a path safely inside the container root, then a separate filesystem operation re-opens that path, so a process inside the container can swap a component for a symlink in the gap and redirect the copy onto the host as root.

Product
Docker Engine (Moby)
Vendor
Docker, Inc. / Moby project
Affected
Docker through 18.06.1-ce-rc2 (all released versions at disclosure)
Fixed in
Fixed in Moby via PR #39292 (chrootarchive always chroots to the container's own root, not the attacker-controlled destination, so a swapped symlink to "/" resolves inside the container root instead of on the host); merged 2019-06-04, shipped in Docker 18.09 (backport) and 19.03. An earlier pause-the-container patch (PR #39252, by the researcher) was proposed but not merged.
Weakness
CWE-367
CVSS vector
CVSS:3.0/AV:L/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:H
Published
23 May 2019

Practice this CVE, free

Classified as

References

Related CVEs