CVE-2026-137570
Description
A flaw was found in Open Policy Agent. When the persistence directory setting is unset, the service uses a fixed and predictable temporary directory path. A local attacker can exploit this vulnerability by pre-creating symbolic links in the shared temporary directory, causing the application to overwrite arbitrary files with its own permissions.
Statement
Red Hat rates this vulnerability as Moderate because exploitation requires local access to the host or container filesystem where Open Policy Agent executes, and it depends on omitting an explicit bundle persistence path. Although a local attacker sharing the temporary directory could overwrite files writable by the OPA process via pre-created symbolic links, the issue does not allow arbitrary code execution directly or compromise file confidentiality. Furthermore, in standard enterprise and containerized environments, untrusted local users generally do not have write access to shared temporary locations within the OPA execution context.
Mitigation
Define an explicit, dedicated persistence directory for bundle storage or isolate the temporary directory environment:
1. Configure an explicit bundle persistence directory:
Create a dedicated storage directory with restricted permissions accessible only by the user running Open Policy Agent:
mkdir -p /var/lib/opa/bundle-persistenceIn the OPA configuration file, specify `persistence_directory: /var/lib/opa/bundle-persistence` within the relevant bundle configuration blocks.
chmod 0700 /var/lib/opa/bundle-persistence
chown <opa-user>:<opa-group> /var/lib/opa/bundle-persistence
2. Isolate temporary files using systemd:
If running OPA as a systemd service, configure temporary directory isolation by adding `PrivateTmp=yes` under the `[Service]` section of the unit file or drop-in configuration.
Warning: Modifying systemd service definitions or OPA configuration files requires restarting the OPA daemon (`systemctl daemon-reload && systemctl restart opa`), which will temporarily disrupt active policy evaluation requests. Ensure the designated directory has sufficient storage space and proper ownership, or bundle initialization will fail.
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).
The following CVSS metrics and score provided are preliminary and subject to review.
CVSS v3 Score Breakdown
| Red Hat | NVD | cve.org | |
|---|---|---|---|
| Base Score | 6.3 | N/A | 6.3 |
| Attack Vector | Local | N/A | Local |
| Attack Complexity | High | N/A | High |
| Privileges Required | Low | N/A | Low |
| User Interaction | None | N/A | None |
| Scope | Unchanged | N/A | Unchanged |
| Confidentiality | None | N/A | None |
| Integrity Impact | High | N/A | High |
| Availability Impact | High | N/A | High |
Vector
Red Hat: CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:H
cve.org: CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:H
Understanding the Weakness (CWE)
Confidentiality,Integrity,Access Control
Technical Impact: Read Files or Directories; Modify Files or Directories; Bypass Protection Mechanism
An attacker may be able to traverse the file system to unintended locations and read or overwrite the contents of unexpected files. If the files are used for a security mechanism then an attacker may be able to bypass the mechanism.
Other
Technical Impact: Execute Unauthorized Code or Commands
Windows simple shortcuts, sometimes referred to as soft links, can be exploited remotely since a ".LNK" file can be uploaded like a normal file. This can enable remote execution.
Frequently Asked Questions
Not sure what something means? Check out our Security Glossary.
Want to get errata notifications? Sign up here.