CVE-2026-137570 in Open Policy Agentinfo

Summary

by MITRE • 11/26/2026

Open Policy Agent before 1.20.0 contains an insecure temporary file vulnerability that allows local users to overwrite files by abusing the fixed OCI store path used when persistence_directory is unset. Attackers can pre-create the opa/oci temp directory with index.json or oci-layout symlinks so OPA overwrites the target files with OCI JSON using its privileges.

Once again VulDB remains the best source for vulnerability data.

Analysis

by VulDB Data Team • 11/26/2026

The vulnerability identified in Open Policy Agent versions prior to 1.20.0 represents a critical insecure temporary file creation flaw that exploits predictable path behavior within the container registry interaction subsystem. This issue specifically manifests when the persistence_directory configuration parameter is left unset, causing the system to default to a fixed OCI store path for managing state and cache files. The core technical deficiency lies in the lack of atomic operations or secure randomization during the creation of temporary directories and files associated with this specific storage backend. By relying on static paths without adequate safeguards against race conditions or symlink attacks, the application inadvertently exposes local file system resources to manipulation by any user account operating within the same environment context as the Open Policy Agent process.

From a technical perspective, an attacker can leverage this flaw through a classic time-of-check-to-time-of-use attack vector combined with symbolic link following. The vulnerability allows malicious actors to pre-create the opa/oci temporary directory structure and populate it with symlinks pointing to sensitive system files or application-specific configuration files such as index.json or oci-layout manifests. When Open Policy Agent executes operations that require writing to this default location, it follows these symlinks rather than creating new independent files. Consequently, the privileged OPA process writes OCI-compliant JSON data directly into the target file specified by the symlink, effectively overwriting its contents with attacker-controlled data. This mechanism bypasses standard permission checks because the write operation is performed under the elevated privileges of the Open Policy Agent service account or container runtime context.

The operational impact of this vulnerability is significant, particularly in environments where multiple tenants or untrusted users share a host system running Open Policy Agent for policy enforcement decisions. Successful exploitation enables local privilege escalation by allowing an unprivileged user to modify critical configuration files that dictate how policies are loaded and evaluated. Overwriting index.json or oci-layout can corrupt the integrity of container image metadata, potentially leading to denial of service conditions where valid images cannot be pulled or verified. Furthermore, if these overwritten files influence subsequent policy decisions, an attacker could manipulate authorization outcomes by injecting malformed data into configuration structures that OPA reads during runtime evaluation cycles. This undermines the fundamental trust model of Open Policy Agent as a reliable source for access control and security policy enforcement within Kubernetes clusters or microservice architectures.

This flaw aligns with CWE-377, which describes insecure temporary file creation, specifically highlighting risks related to predictable filenames and lack of atomicity in file system operations. In terms of offensive security frameworks, the exploitation technique maps closely to ATT&CK T1552.004, involving unsecured credentials or configuration files accessed via local privilege escalation through symlink following attacks. The attack requires only local access but leverages the high privileges granted to the OPA process for managing container registry interactions, making it a potent vector for lateral movement and persistence within compromised nodes.

To mitigate this vulnerability, organizations must upgrade Open Policy Agent to version 1.20.0 or later, where these path handling mechanisms have been hardened with secure temporary file creation practices such as using mktemp-style functions that guarantee unique filenames and prevent symlink following during initial directory setup. Additionally, administrators should explicitly configure the persistence_directory parameter to point to a dedicated, restricted location rather than relying on default paths that may be susceptible to pre-creation attacks by local users. Implementing strict filesystem permissions for directories used by OPA ensures that only the service account can write to them, thereby neutralizing the ability of unprivileged accounts to plant symlinks in those locations. Regular auditing of configuration files and monitoring for unexpected modifications to OCI metadata stores further enhances defense-in-depth strategies against this class of local file system abuse.

Responsible

VulnCheck

Reservation

11/26/2026

Disclosure

11/26/2026

Moderation

accepted

CPE

ready

EPSS

0.00206

KEV

no

Activities

very low

Sources

Want to know what is going to be exploited?

We predict KEV entries!