← Übersicht Open Policy Agent / Gatekeeper

OPA Compiler: Bypass of WithUnsafeBuiltins using `with` keyword to mock functions

CVE-2022-36085 · GHSA-f524-rf33-2jjr · GO-2022-0978

Kritisch · CVSS 9.8 Red Hat: Important Netzwerk · ohne Login Fix verfügbar

Veröffentlicht
08.09.2022
Zuletzt geändert
02.02.2026
EPSS (30 Tage)
1.6 %
CVSS-Vektor
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Beschreibung

Originaltext der Quelle, nicht übersetzt.

Open Policy Agent (OPA) is an open source, general-purpose policy engine. The Rego compiler provides a (deprecated) `WithUnsafeBuiltins` function, which allows users to provide a set of built-in functions that should be deemed unsafe — and as such rejected — by the compiler if encountered in the policy compilation stage. A bypass of this protection has been found, where the use of the `with` keyword to mock such a built-in function (a feature introduced in OPA v0.40.0), isn’t taken into account by `WithUnsafeBuiltins`. Multiple conditions need to be met in order to create an adverse effect. Version 0.43.1 contains a patch for this issue. As a workaround, avoid using the `WithUnsafeBuiltins` function and use the `capabilities` feature instead.

Status beim Hersteller

Red Hat stuft seine Produktlinien ein: 6 nicht betroffen.

Nicht betroffen (6)
Logging Subsystem for Red Hat OpenShiftNicht betroffenverwundbarer Code nicht enthaltenopenshift-logging/lokistack-gateway-rhel8, openshift-logging/opa-openshift-rhel8
OpenShift ServerlessNicht betroffenverwundbarer Code nicht enthaltenopenshift-serverless-1/client-kn-rhel8
OpenShift Service Mesh 2.0Nicht betroffenverwundbarer Code nicht enthaltenservicemesh, servicemesh-istioctl, servicemesh-mixc, servicemesh-mixs, servicemesh-pilot-agent, servicemesh-pilot-discovery
Red Hat Advanced Cluster Management for Kubernetes 2Nicht betroffenverwundbarer Code nicht enthaltenrhacm2/gatekeeper-rhel8
Red Hat Advanced Cluster Security 3Nicht betroffenverwundbarer Code nicht enthaltenadvanced-cluster-security/rhacs-main-rhel8, advanced-cluster-security/rhacs-scanner-db-rhel8, advanced-cluster-security/rhacs-scanner-db-slim-rhel8, advanced-cluster-security/rhacs-scanner-rhel8, advanced-cluster-security/rhacs-scanner-slim-rhel8
Red Hat OpenShift Container Platform 4Nicht betroffenverwundbarer Code nicht enthaltenopenshift4/cnf-tests-rhel8, openshift4/ztp-site-generate-rhel8

Betroffene Pakete im beobachteten Stack

CVEopen-policy-agent/opakein Fix bekanntCVE-2022-36085
Gogithub.com/open-policy-agent/opa0.40.0 → 0.43.1GHSA-f524-rf33-2jjr
Gogithub.com/open-policy-agent/opa0.40.0 → 0.44.0GO-2022-0978
Weitere betroffene Pakete (1)
NVDopenpolicyagent:open_policy_agent0.40.0 → 0.43.1CVE-2022-36085

Empfohlene Prüfung

  1. Feststellen, ob und in welcher Version die betroffenen Pakete in Ihren Systemen, Images und Abhängigkeiten vorkommen.
  2. Wo eine Fix-Version genannt ist: aktualisieren. Wo nicht: Hersteller-Advisory und Referenzen auf Workarounds prüfen.
  3. Erreichbarkeit beachten: Der Angriffsweg (Netzwerk · ohne Login) ist aus dem CVSS-Vektor abgeleitet.

Diese Seite sagt nichts darüber, ob Ihre Systeme betroffen sind. Das klärt erst eine Prüfung Ihrer Versionen.