CVE-2026-78155 Overview
CVE-2026-78155 is a privilege escalation vulnerability in the StackGres operator, a Kubernetes operator that manages PostgreSQL clusters. The flaw allows a low-privilege tenant who owns a database to gain administrator privileges within the operator's control plane. The weakness is classified as an untrusted search path issue [CWE-426], enabling scope change from a tenant context to the operator's privileged context. Exploitation requires only low privileges and no user interaction, and it can be performed over the network.
Critical Impact
An authenticated tenant can escalate to administrator, breaking multi-tenant isolation and exposing all managed PostgreSQL databases to full read, write, and disruption.
Affected Products
- StackGres operator (OnGres) — versions affected as listed in the vendor tracker
- Kubernetes clusters running StackGres for PostgreSQL management
- Multi-tenant deployments where database ownership is delegated to non-admin users
Discovery Timeline
- 2026-08-23 - CVE-2026-78155 published to NVD
- 2026-08-24 - Last updated in NVD database
Technical Details for CVE-2026-78155
Vulnerability Analysis
StackGres exposes management primitives through Kubernetes custom resources and an operator process that reconciles tenant-owned databases. The vulnerability lets a user whose scope is limited to a single database perform actions that resolve within the operator's privileged context. Because the scope changes from the tenant to the cluster, the attacker obtains administrator privileges over every StackGres-managed workload in the cluster.
The root weakness is tracked as [CWE-426: Untrusted Search Path]. In the operator model, this pattern typically appears when the reconciler resolves a resource, template, or reference supplied by a tenant without pinning it to the tenant's namespace or authorization boundary. A tenant-controlled input is trusted during a privileged operation, and the operator executes on the attacker's behalf.
Successful exploitation grants the attacker administrator control over StackGres. That control includes reading and modifying database contents, altering credentials, exfiltrating backups, and disrupting availability across tenants sharing the operator.
Root Cause
The operator resolves references or paths originating from a tenant-owned object without constraining the resolution to the tenant's authorization boundary. This lets a low-privilege database owner cause the operator, which runs with elevated service account permissions, to act on cluster-scoped resources.
Attack Vector
The attacker authenticates as a tenant with database ownership rights, then submits a crafted StackGres custom resource or manipulates fields consumed by the reconciler. The operator processes the input in its privileged context and grants the attacker administrator-equivalent access. Refer to the vendor tracker for the exact reproduction path: GitLab Work Item #3177.
No verified public exploit code is available. The vulnerability mechanism is described in prose only.
Detection Methods for CVE-2026-78155
Indicators of Compromise
- Unexpected create, update, or patch actions against cluster-scoped StackGres custom resources originating from tenant service accounts
- New ClusterRoleBinding or RoleBinding objects referencing tenant identities shortly after StackGres CR modifications
- Operator pod logs showing reconciliation of references that resolve outside the requesting tenant's namespace
Detection Strategies
- Enable Kubernetes audit logging for the StackGres API groups and alert on privileged verbs executed on behalf of tenant users
- Baseline the operator service account's normal reconciliation targets and flag deviations that touch resources outside expected namespaces
- Correlate PostgreSQL admin credential access events with recent StackGres custom resource changes made by non-admin principals
Monitoring Recommendations
- Ingest Kubernetes audit logs, StackGres operator logs, and PostgreSQL cluster events into a central analytics platform
- Monitor for changes to StackGres CRDs, secrets, and backup objects performed by tenant identities
- Track anomalous exec, port-forward, and secret read operations against StackGres-managed pods
How to Mitigate CVE-2026-78155
Immediate Actions Required
- Upgrade the StackGres operator to a fixed release as indicated in GitLab Work Item #3177
- Restrict tenant permissions on StackGres custom resources until the patch is applied
- Rotate PostgreSQL administrator credentials and StackGres service account tokens after patching
Patch Information
OnGres tracks remediation in GitLab Work Item #3177. Apply the fixed operator version referenced in that tracker and redeploy the operator across all clusters. Validate that reconciliation logic constrains references to the requesting tenant's namespace.
Workarounds
- Reduce the StackGres operator's cluster-scoped permissions to the minimum required and split tenants across separate operator instances where feasible
- Apply Kubernetes admission policies (for example, OPA Gatekeeper or Kyverno) that reject tenant-submitted StackGres CRs referencing cross-namespace objects
- Isolate high-value databases in dedicated namespaces with strict NetworkPolicy and RBAC boundaries until the patch is deployed
# Example Kyverno policy to block cross-namespace references in StackGres CRs
# Adapt field paths to the specific StackGres CRD schema in your environment
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
name: stackgres-restrict-cross-namespace-refs
spec:
validationFailureAction: Enforce
rules:
- name: deny-cross-namespace-refs
match:
any:
- resources:
kinds:
- SGCluster
- SGBackup
- SGScript
validate:
message: "Cross-namespace references are not permitted in StackGres CRs."
deny:
conditions:
any:
- key: "{{ request.object.spec..sgCluster }}"
operator: AnyIn
value: ["*.*"]
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

