GHSA-Q65W-J2VP-47C4
Cross-Namespace IDOR in ListArchivedWorkflows via metadata.namespace!= Field Selector Bypass of NamespaceFilter SAR
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-Q65W-J2VP-47C4 divulgada · CVSS 7.7 (GitHub) | |
| Divulgación | Modificada | Última actualización del registro | |
| Remediación | Parche v4.1.4 | github.com/argoproj/argo-workflows/v4 · 0 d desde divulgación | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
ListArchivedWorkflows enforces RBAC with the wrong namespace argument when a metadata.namespace!= field selector is used. PR #15098 (Feb 15, 2026, commit 82eec0304) added support for == and != operators on metadata.namespace in the field-selector parser. The author correctly patched the live-workflow path (server/workflow/workflow_server.go:198-200) to fall back to a cluster-scoped SubjectAccessReview when NamespaceFilter == 'NotEquals'. The same patch was NOT applied to the archived-workflow path (server/workflowarchive/archived_workflow_server.go:56), which still calls auth.CanI(ctx, 'list', workflow.WorkflowPlural, options.Namespace, '') -- where options.Namespace is the attacker-supplied value.
Net effect: a user holding namespace-scoped list workflows in any single namespace can submit ?listOptions.fieldSelector=metadata.namespace!=<their-ns> and the SAR resolves against their own namespace (PASS) while the SQL WHERE namespace != <their-ns> returns archived workflows from every OTHER namespace -- including their full spec.arguments, parameter values, environment hints, error stack traces, and annotations.
Vulnerability Details
- Class: CWE-285 / CWE-639 Improper Authorization (cross-namespace IDOR; multi-tenant isolation bypass)
- Severity: High (CVSS 3.1 AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N = 8.5). Scope is Changed because the authorization break crosses Argo's intended namespace tenant boundary into other tenants' resources.
- Affected: argoproj/argo-workflows master HEAD as of 2026-05-02. Live in quay.io/argoproj/argocli:latest. The official manifests/quick-start-postgres.yaml, quick-start-mysql.yaml, and quick-start-minimal.yaml all reference :latest. Released 4.0.0-4.0.5 NOT affected (PR #15098 not yet backported).
- Sink: server/workflowarchive/archived_workflow_server.go:56 -- `auth.CanI(ctx, 'list', workflow.WorkflowPlural, options.Namespace, '')`.
- Source: `?listOptions.fieldSelector=metadata.namespace!=<value>` parsed at server/utils/list_options.go:101-103 and plumbed to SQL at persist/sqldb/selector.go:13-17.
- Auth: any authenticated user with namespace-scoped list workflows permission in their own namespace.
Attacker Path
- Attacker holds a Kubernetes ServiceAccount token with list workflows in attacker-ns only (the typical multi-tenant per-namespace RBAC setup).
- GET /api/v1/archived-workflows?listOptions.fieldSelector=metadata.namespace!%3Dattacker-ns reaches the archived-workflow gRPC handler.
- BuildListOptions (server/utils/list_options.go:101-103) parses metadata.namespace!=attacker-ns and emits options.Namespace='attacker-ns', options.NamespaceFilter='NotEquals'.
- archived_workflow_server.go:56 runs auth.CanI(ctx, 'list', workflow.WorkflowPlural, 'attacker-ns', ''). Attacker IS allowed to list in attacker-ns. SAR returns true. Wrong cell: the query will not be scoped to attacker-ns, it will be scoped to 'everything except attacker-ns'.
- persist/sqldb/selector.go:13-17 translates NotEquals into WHERE namespace != 'attacker-ns' in the archive SQL query.
- Archived workflows from victim-ns, prod-ns, payroll-ns, etc. are returned to the attacker -- with metadata, annotations, error messages, and spec.arguments.parameters values.
The fix is already in the live-workflow path on the same commit:
// server/workflow/workflow_server.go:198-200
targetNamespace := options.Namespace
if options.NamespaceFilter == 'NotEquals' {
targetNamespace = ''
}
allowed, err := auth.CanI(ctx, 'list', workflow.WorkflowPlural, targetNamespace, '')The same logic is missing in server/workflowarchive/archived_workflow_server.go:56.
Patches
Fixed in v4.1.4. `ListArchivedWorkflows` now authorizes `list` cluster-wide when the `metadata.namespace!=` selector is used, matching the live workflow list. Only v4.1.0 to v4.1.3 are affected: the selector was added in #15098, which is not in the 4.0 or 3.x lines.
Workarounds
None beyond disabling the workflow archive or restricting who can reach the Server.
Proof of Concept
Tested live on a kind cluster running quay.io/argoproj/argocli:latest (commit 80dc102f4) with the official manifests/quick-start-postgres.yaml.
$ ATT=$(kubectl -n attacker-ns get secret attacker-token -o jsonpath='{.data.token}' | base64 -d)
# Direct attempt: denied (RBAC working as intended)
$ curl -sk "https://127.0.0.1:2746/api/v1/archived-workflows?namespace=victim-ns" -H "Authorization: Bearer $ATT"
{"code":7,"message":"Permission denied, you are not allowed to list workflows in namespace \"victim-ns\"."}
# Bypass: NotEquals field-selector
$ curl -sk "https://127.0.0.1:2746/api/v1/archived-workflows?listOptions.fieldSelector=metadata.namespace!%3Dattacker-ns" -H "Authorization: Bearer $ATT" | jq '.items[] | {namespace: .metadata.namespace, args: .spec.arguments}'
{
"namespace": "victim-ns",
"args": {
"parameters": [
{"name": "db-password", "value": "supersecret-db-pass-LEAKME-12345"},
{"name": "api-key", "value": "sk_live_abc123def456_internal_payroll"}
]
}
}Recommended Fix
Mirror the live-workflow pattern in archived_workflow_server.go:56:
targetNamespace := options.Namespace
if options.NamespaceFilter == 'NotEquals' {
targetNamespace = ''
}
allowed, err := auth.CanI(ctx, 'list', workflow.WorkflowPlural, targetNamespace, '')Apply the same review to every other archive endpoint that reads options.Namespace for SAR and supports the metadata.namespace!= operator.
Permalinks
- https://github.com/argoproj/argo-workflows/blob/main/server/workflowarchive/archived_workflow_server.go#L56
- https://github.com/argoproj/argo-workflows/blob/main/server/workflow/workflow_server.go#L198-L210
- https://github.com/argoproj/argo-workflows/pull/15098
Impact
An authenticated user with namespace-scoped list workflows in their own namespace gets read access to archived workflows from EVERY OTHER namespace in the cluster. The leak yields full archived-workflow records: metadata.annotations, metadata.labels, spec.arguments.parameters values, status.message (often containing stack traces with internal hostnames and DB connection strings), and status.outputs.parameters.
In a production multi-tenant Argo cluster:
- Cross-tenant secret leak. Workflow parameters routinely carry DB passwords, API keys, OAuth tokens, S3 credentials.
- Cross-tenant metadata enumeration. Annotations and labels frequently encode workflow ownership, environment, and downstream system identifiers.
- Cross-tenant error / stack-trace exposure. status.message from failed runs leaks internal hostnames, package versions, file paths, and configuration values.
- Compliance impact. Regulated tenants (HIPAA, PCI, SOC2 partitioning) lose namespace isolation guarantees.
The bypass is exploitable in the official quay.io/argoproj/argocli:latest image used by every quick-start manifest. Released versions 4.0.0-4.0.5 are not yet affected because PR #15098 has not been backported -- but latest is what most production clusters track.
Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.
Desglose de métricas
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
gogithub.com/argoproj/argo-workflows/v4 |
Corregida | v4.1.4 | 0 d | v4.1.6 no afectada |
4.1.4v4.1.4Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/argoproj/argo-workflows/security/advisories/GHSA-q65w-j2vp-47c4Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
