REDHAT-BUG-2584969: Medium severity Open Policy Agent Open Policy Agent vulnerability
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 to a fixed release to a version that resolves this vulnerability.
Fixed in 1.20.0
Event History
Frequently Asked Questions
Who is exposed to this issue?
Systems running Open Policy Agent before 1.20.0 are exposed when OPA uses OCI persistence and persistence_directory is unset. A local user who can prepare the fixed opa/oci temporary path is the relevant attacker.
What does an attacker need to exploit it?
The attacker needs local access and the ability to pre-create the opa/oci temporary directory with index.json or oci-layout symlinks. OPA can then overwrite the symlink targets with OCI JSON using OPA's privileges.
How can I reduce risk if I cannot update immediately?
Configure persistence_directory rather than leaving it unset, avoiding the fixed OCI store path described in the issue. Also prevent untrusted local users from creating or modifying the opa/oci temporary directory and its contents.