Skip to main content
Menu
Advisories

Operator discloses resources and secrets scoped to other apps

GHSA-99H8-29CW-6J59Published Updated GitHub

Description

In Kubernetes mode, the Dapr operator returned HTTPEndpoint and MCPServer resources to every Dapr-enabled pod in the namespace, with their Kubernetes secret references resolved to plaintext, regardless of the resources' scopes. GetConfiguration returned any Configuration in the namespace by name, with secret OpenTelemetry headers resolved. ListResiliency, GetResiliency, ListSubscriptions and ListWorkflowAccessPolicy also ignored scopes, although they carry no secrets.

Users running Dapr on Kubernetes are encouraged to upgrade to 1.19.0, 1.18.9 or 1.17.18.

Impact

Any workload that can obtain a Dapr workload identity for an app ID in a namespace, which includes every Dapr-enabled pod in that namespace, could call the operator directly and read:

  • Header values of HTTPEndpoint resources scoped to other apps, such as Authorization tokens, and their client TLS certificates, private keys and root CAs (Dapr 1.11.0 and later).
  • Secret OpenTelemetry headers of Configurations assigned to other apps (Dapr 1.17.0 and later).
  • Headers and stdio environment variables of MCPServer resources scoped to other apps (Dapr 1.18.0 and later).

Only values stored in the Kubernetes secret store (the default) were disclosed, because the operator resolves only those. Resources in other namespaces were not exposed. Sidecars already ignored resources not scoped to their app ID, so applications behaved correctly; the problem was what the operator sent to them.

Patches

Fixed in Dapr 1.19.0, 1.18.9 and 1.17.18. Upgrade to 1.17.18 or later.

If untrusted workloads share a namespace with scoped HTTPEndpoint, MCPServer or Configuration resources, rotate the Kubernetes secrets those resources reference.

Details

The operator's ListHTTPEndpoints and ListMCPServers gRPC APIs checked that the caller's SPIFFE identity was in the requested namespace, then resolved and returned every resource in that namespace. The caller's app ID was never compared with each resource's scopes, unlike ListComponents and the resource update streams, which already filtered. GetConfiguration trusted the configuration name sent by the sidecar.

The operator now skips resources whose scopes do not include the calling app ID before resolving any secret, and GetResiliency reports them as not found. GetConfiguration only serves the configuration named in the dapr.io/config annotation of one of the calling app's pods.

A daprd run in Kubernetes mode without the injector, with --config, must now be in a pod with the dapr.io/enabled: "true", dapr.io/app-id and dapr.io/config annotations and the dapr.io/app-id label, and its container must be named daprd.

References

Credits

Thanks to Sathwik Yadlapati (@yadlapatisathwik) for reporting this issue and providing the initial fix.

Affected versions

References

GitHub · dapr/dapr