CVE-2026-121520

Description

A flaw was found in BuildKit. A client with access to the BuildKit control application programming interface (API) can submit a specially crafted build request to set extended attributes—additional metadata stored with files—on files located outside the BuildKit state directory. Manipulating these security-sensitive attributes on the host could allow an attacker to achieve privilege escalation on the underlying system.

Statement

Red Hat has evaluated this vulnerability as Important because an attacker capable of dispatching build workloads can alter sensitive file metadata outside the working directory, enabling privilege escalation on the underlying host. The greatest impact occurs in multi-tenant environments, such as shared OpenShift build services where arbitrary or untrusted users are permitted to trigger container image builds. Systems where build execution is restricted to trusted operators or dedicated single-user workstations experience minimal exposure, as users typically already hold administrative control over their local environments.

Mitigation

Restrict access to the BuildKit control API socket and network endpoints to trusted administrative operators using strict file system permissions and mutual TLS. In multi-tenant environments, isolate build execution within dedicated, ephemeral virtual machines rather than sharing the daemon across untrusted tenants.

--- CME Mitigation Guidance (2026-11-04) ---
Disclaimer: The following mitigation solutions are provided as a courtesy, pending the application of an official patch. This content was generated utilizing AI tools in conjunction with data from https://cmetaxonomy.org. Customers are advised to independently evaluate and test these temporary mitigations within their own infrastructure.

The highest-value action is to confine all extended attribute modifications within BuildKit strictly to the internal state directory and prevent following symlinks outside the build boundary: upgrade to BuildKit v0.34.1 (or the corresponding fixed Red Hat builds), which restrict extended attribute modifications to the BuildKit state directory and prevent following links outside the build boundary, closing all 3 injection vectors (crafted build request submitting xattrs targeting paths outside the state directory, symbolic link traversal targeting host files for extended attribute modification, manipulation of security and trusted namespace extended attributes). Until patched, this is only a concern on Linux build hosts and multi-tenant build services accepting BuildKit control API requests — Non-Linux platforms are unaffected — so Restrict access to the BuildKit control API socket and network endpoints to trusted operators using strict permissions and mutual TLS, or isolate builds in dedicated ephemeral virtual machines. As a compensating measure, Log setxattr and lsetxattr syscalls targeting sensitive host directories and security namespaces using auditd, Enforce SELinux mandatory access controls to confine the BuildKit daemon from modifying host extended attributes outside its domain, Restrict the BuildKit process filesystem sandbox to explicitly allowed directory hierarchies using Landlock LSM, Use mount and user namespaces to isolate the daemon filesystem view from host extended attribute modifications, Run BuildKit in rootless mode to prevent setting privileged security and trusted namespace extended attributes on the host filesystem, and Drop CAP_SYS_ADMIN and CAP_SETFCAP from the BuildKit daemon to prevent setting sensitive extended attributes. These controls limit blast radius and contain exploitation, but they do not fix the underlying path traversal and symlink following defect — apply the upstream patch to fully remediate.

Highest-impact CME: CME-1301 Path Traversal Prevention (Canonicalization) (high)

Common Vulnerability Scoring System (CVSS) Score Details

Info alert:Important note

CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authority (CNA) source for its products and services (see Red Hat classifications).

CVSS v3 Score Breakdown

Red HatNVDcve.org
Base Score7.9N/AN/A
Attack VectorLocalN/AN/A
Attack ComplexityLowN/AN/A
Privileges RequiredHighN/AN/A
User InteractionNoneN/AN/A
ScopeChangedN/AN/A
ConfidentialityNoneN/AN/A
Integrity ImpactHighN/AN/A
Availability ImpactHighN/AN/A

Vector

Red Hat: CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:C/C:N/I:H/A:H

Understanding the Weakness (CWE)

Integrity,Confidentiality,Availability

Technical Impact: Execute Unauthorized Code or Commands

The attacker may be able to create or overwrite critical files that are used to execute code, such as programs or libraries.

Integrity

Technical Impact: Modify Files or Directories

The attacker may be able to overwrite or create critical files, such as programs, libraries, or important data. If the targeted file is used for a security mechanism, then the attacker may be able to bypass that mechanism. For example, appending a new account at the end of a password file may allow an attacker to bypass authentication.

Confidentiality

Technical Impact: Read Files or Directories

The attacker may be able to read the contents of unexpected files and expose sensitive data. If the targeted file is used for a security mechanism, then the attacker may be able to bypass that mechanism. For example, by reading a password file, the attacker could conduct brute force password guessing attacks in order to break into an account on the system.

Availability

Technical Impact: DoS: Crash, Exit, or Restart

The attacker may be able to overwrite, delete, or corrupt unexpected critical files such as programs, libraries, or important data. This may prevent the product from working at all and in the case of protection mechanisms such as authentication, it has the potential to lock out product users.

Frequently Asked Questions

Want to get errata notifications? Sign up here.