Bug 2528214 (CVE-2026-85464)

Summary: CVE-2026-85464 quay-operator: quay-operator: Hardcoded Clair Postgres credential postgres/postgres on upgrade path
Product: [Other] Security Response Reporter: OSIDB Bzimport <bzimport>
Component: vulnerabilityAssignee: Product Security <prodsec-ir-bot>
Status: NEW --- QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: aruklets, bcaton, doconnor, security-response-team
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
A flaw was found in quay-operator. During an upgrade path, the Clair Postgres database is configured with hardcoded 'postgres' credentials. A remote attacker, from any pod on the cluster network, can exploit this by authenticating to the Clair vulnerability database using these publicly-known credentials. This allows for reading and writing of vulnerability scan results and arbitrary SQL execution as the 'postgres' superuser.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description OSIDB Bzimport 2026-09-03 19:59:01 UTC
## Hardcoded Clair Postgres credential postgres/postgres on upgrade path

**CWEs:** CWE-798
**CVSS:** 7.7 (CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:C/C:H/I:L/A:N)
**Component:** quay/quay-operator

### Description
When `ComponentClairPostgres` is managed and `ctx.ClairDbPassword` is empty, the code branches on whether `ctx.DbRootPw` is already populated (i.e., whether this is an existing deployment whose managed-keys Secret predates per-Clair credentials). For that upgrade branch it sets `ctx.ClairDbPassword = "postgres"` (the legacy hardcoded value), then `ctx.ClairDbRootPw = ctx.ClairDbPassword`, `ctx.ClairDbUser = "postgres"`, `ctx.ClairDbName = "postgres"`.

The resulting `clair-postgres` Deployment is configured with superuser `postgres` / password `postgres`, and the same value is written into the Clair `config.yaml` connstring (`secrets.go:411`). The `clair-postgres` Service (`ClusterIP`) is reachable from any pod in the cluster absent NetworkPolicy.

### Affected Locations
- `pkg/kustomize/kustomize.go:349-369`

### Attack Pattern
Any pod on the cluster network can authenticate to the Clair vulnerability database of an upgraded Quay instance using a publicly-known credential, allowing read/write of vulnerability scan results and arbitrary SQL execution as the `postgres` superuser.

### Remediation
Generate a random password on the upgrade branch as well, and run a one-shot `ALTER ROLE postgres PASSWORD ...` Job against the existing database before rotating the connstring; persist the new value in the managed-keys Secret. Remove the literal `"postgres"` fallback.

---
*Source: Ex-Wing security assessment, finding FIND-004*