CVE-2026-137570: Open Policy Agent before 1.20.0 Symlink File Overwrite via Predictable OCI Store Path
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 persistencedirectory 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.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
Open Policy Agentto a version that resolves this vulnerability.Fixed in 1.20.0
Event History
Frequently Asked Questions
Who can exploit this issue?
A local user who can create or control the fixed opa/oci temporary directory and place symlinks named index.json or oci-layout can exploit it. Exploitation also requires OPA to run with privileges that can write to the symlink targets.
When is the vulnerable OCI store path used?
The fixed OCI store path is used when persistence_directory is unset. Configurations that set persistence_directory are not described as using the affected fallback path.
What can an attacker overwrite?
The attacker can redirect OPA writes through index.json or oci-layout symlinks, causing OPA to overwrite target files with OCI JSON content using OPA's privileges.
What can be done if upgrading is not immediately possible?
Set persistence_directory rather than leaving it unset, and prevent untrusted local users from pre-creating or modifying the opa/oci temporary directory. Review that directory for index.json or oci-layout symlinks before running OPA.