#VU17474 Privilege escalation in runc


Published: 2020-03-18 | Updated: 2023-01-23

Vulnerability identifier: #VU17474

Vulnerability risk: Medium

CVSSv3.1: 7.6 [CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H/E:F/RL:O/RC:C]

CVE-ID: CVE-2019-5736

CWE-ID: CWE-264

Exploitation vector: Local

Exploit availability: Yes

Vulnerable software:
runc
Client/Desktop applications / Other client software

Vendor: Open Container Initiative

Description
The vulnerability allows a remote attacker to gain elevated privileges.

The weakness exists in the runc container runtime due to file-descriptor mishandling, related to /proc/self/exe. A remote attacker can leverage the ability to execute a command as root within one of these types of containers: (1) a new container with an attacker-controlled image, or (2) an existing container, to which the attacker previously had write access, that can be attached with docker exec, overwrite the host runc binary with minimal user interaction and execute arbitrary code with root privileges.

Successful exploitation of the vulnerability may result in system compromise.

Mitigation
To prevent this attack, LXC has been patched to create a temporary copy of the calling binary itself when it starts or attaches to containers (cf. 6400238d08cdf1ca20d49bafb85f4e224348bf9d).

Vulnerable software versions

runc: 0.0.1 - 1.0 rc6


External links
http://www.twistlock.com/2019/02/11/how-to-mitigate-cve-2019-5736-in-runc-and-docker/
http://brauner.github.io/2019/02/12/privileged-containers.html
http://github.com/opencontainers/runc/commit/0a8e4117e7f715d5fbeef398405813ce8e88558b
http://github.com/opencontainers/runc/commit/6635b4f0c6af3810594d2770f662f34ddc15b40d
http://github.com/Frichetten/CVE-2019-5736-PoC


Q & A

Can this vulnerability be exploited remotely?

No. This vulnerability can be exploited locally. The attacker should have authentication credentials and successfully authenticate on the system.

Is there known malware, which exploits this vulnerability?

No. We are not aware of malware exploiting this vulnerability. However, a fully functional exploit for this vulnerability is available.


Latest bulletins with this vulnerability