Multiple vulnerabilities in BuildKit



Published: 2024-02-02 | Updated: 2024-04-19
Risk High
Patch available YES
Number of vulnerabilities 5
CVE-ID CVE-2024-21626
CVE-2024-23651
CVE-2024-23652
CVE-2024-23653
CVE-2024-23650
CWE-ID CWE-254
CWE-362
CWE-22
CWE-863
CWE-754
Exploitation vector Network
Public exploit Public exploit code for vulnerability #1 is available.
Vulnerable software
Subscribe
BuildKit
Universal components / Libraries / Software for developers

Vendor Moby project

Security Bulletin

This security bulletin contains information about 5 vulnerabilities.

1) Security features bypass

EUVDB-ID: #VU85991

Risk: High

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

CVE-ID: CVE-2024-21626

CWE-ID: CWE-254 - Security Features

Exploit availability: Yes

Description

The vulnerability allows a remote attacker to compromise the affected system.

The vulnerability exists due to an internal file descriptor leak that can cause a newly-spawned container process (from runc exec) to have a working directory in the host filesystem namespace or a malicious image to allow a container process to gain access to the host filesystem through runc run. A remote attacker can trick the victim into loading a malicious image to bypass sandbox restrictions and execute arbitrary code on the host OS.

Mitigation

Install update from vendor's website.

Vulnerable software versions

BuildKit: 0.3.0 - 0.12.4

External links

http://github.com/moby/buildkit/releases/tag/v0.12.5


Q & A

Can this vulnerability be exploited remotely?

Yes. This vulnerability can be exploited by a remote non-authenticated attacker via the Internet.

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.

2) Race condition

EUVDB-ID: #VU86035

Risk: Medium

CVSSv3.1: 6.5 [CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N/E:U/RL:O/RC:C]

CVE-ID: CVE-2024-23651

CWE-ID: CWE-362 - Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')

Exploit availability: No

Description

The vulnerability allows a remote attacker to gain access to sensitive information.

The vulnerability exists due to a race condition. A remote attacker can exploit the race and cause the files from the host system being accessible to the build container.

Mitigation

Install update from vendor's website.

Vulnerable software versions

BuildKit: 0.3.0 - 0.12.4

External links

http://github.com/moby/buildkit/security/advisories/GHSA-m3r6-h7wv-7xxv
http://github.com/moby/buildkit/pull/4604
http://github.com/moby/buildkit/releases/tag/v0.12.5


Q & A

Can this vulnerability be exploited remotely?

Yes. This vulnerability can be exploited by a remote non-authenticated attacker via the Internet.

Is there known malware, which exploits this vulnerability?

No. We are not aware of malware exploiting this vulnerability.

3) Path traversal

EUVDB-ID: #VU86037

Risk: Medium

CVSSv3.1: 6.5 [CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N/E:U/RL:O/RC:C]

CVE-ID: CVE-2024-23652

CWE-ID: CWE-22 - Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Exploit availability: No

Description

The vulnerability allows a remote attacker to perform directory traversal attacks.

The vulnerability exists due to input validation error when processing directory traversal sequences within BuildKit frontend or Dockerfile using RUN --mount. A remote attacker can send a specially crafted HTTP request and read arbitrary files on the system.

Mitigation

Install update from vendor's website.

Vulnerable software versions

BuildKit: 0.3.0 - 0.12.4

External links

http://github.com/moby/buildkit/security/advisories/GHSA-4v98-7qmw-rqr8
http://github.com/moby/buildkit/pull/4603
http://github.com/moby/buildkit/releases/tag/v0.12.5


Q & A

Can this vulnerability be exploited remotely?

Yes. This vulnerability can be exploited by a remote non-authenticated attacker via the Internet.

Is there known malware, which exploits this vulnerability?

No. We are not aware of malware exploiting this vulnerability.

4) Incorrect authorization

EUVDB-ID: #VU86038

Risk: High

CVSSv3.1: 8.5 [CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:U/RL:O/RC:C]

CVE-ID: CVE-2024-23653

CWE-ID: CWE-863 - Incorrect Authorization

Exploit availability: No

Description

The vulnerability allows a remote attacker to bypass authorization checks.

The vulnerability exists due to interactive containers API does not validate entitlements check. A remote attacker can use these APIs to ask BuildKit to run a container with elevated privileges.

Mitigation

Install update from vendor's website.

Vulnerable software versions

BuildKit: 0.3.0 - 0.12.4

External links

http://github.com/moby/buildkit/security/advisories/GHSA-wr6v-9f75-vh2g
http://github.com/moby/buildkit/pull/4602
http://github.com/moby/buildkit/releases/tag/v0.12.5


Q & A

Can this vulnerability be exploited remotely?

Yes. This vulnerability can be exploited by a remote non-authenticated attacker via the Internet.

Is there known malware, which exploits this vulnerability?

No. We are not aware of malware exploiting this vulnerability.

5) Improper Check for Unusual or Exceptional Conditions

EUVDB-ID: #VU86039

Risk: Medium

CVSSv3.1: 6.5 [CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H/E:U/RL:O/RC:C]

CVE-ID: CVE-2024-23650

CWE-ID: CWE-754 - Improper Check for Unusual or Exceptional Conditions

Exploit availability: No

Description

The vulnerability allows a remote attacker to perform a denial of service (DoS) attack.

The vulnerability exists due to improper error handling. A remote attacker can send specially crafted data to the application and perform a denial of service (DoS) attack.

Mitigation

Install update from vendor's website.

Vulnerable software versions

BuildKit: 0.3.0 - 0.12.4

External links

http://github.com/moby/buildkit/security/advisories/GHSA-9p26-698r-w4hx
http://github.com/moby/buildkit/pull/4601
http://github.com/moby/buildkit/releases/tag/v0.12.5


Q & A

Can this vulnerability be exploited remotely?

Yes. This vulnerability can be exploited by a remote non-authenticated attacker via the Internet.

Is there known malware, which exploits this vulnerability?

No. We are not aware of malware exploiting this vulnerability.



###SIDEBAR###