# Argo CD reconciles apps outside configured namespaces when sharding is enabled

With sharding enabled, Argo CD's Application controller reconciles Applications in namespaces outside the configured glob allowlist, letting a malicious user deploy resources beyond permitted namespaces.

- Payout: $2,000
- Severity: high
- Program: Internet Bug Bounty
- Found by: czchen
- Disclosed: 2023-03-05
- CVE: CVE-2023-22736
- Write-up quality: 6/10
- Original: https://hackerone.com/reports/1847140
- Library page: https://bugbountylibrary.com/r/h1%3A1847140
- Tags: area:cloud domain:cloud impact:internal-access impact:privesc kind:bounty platform:hackerone sev:high technique:chained vuln:access-control vuln:misconfiguration

**Target:** Argo CD Application controller (apps-in-any-namespace + sharding)
**Root cause:** When sharding is enabled, the Application controller fails to enforce the configured comma-delimited glob namespace allowlist before reconciling Applications, so out-of-bounds Applications get processed.
**Steps:**
1. Enable `apps-in-any-namespace` and `sharding` features in Argo CD.
2. Configure Application namespaces to a glob like `argocd-*`.
3. Create an Application CRD in a namespace not matching the pattern (e.g. `other`).
4. Update the Application CRD to trigger reconciliation.
5. Observe Argo CD reconciles the out-of-bounds Application and deploys its resources.
**How found:** Researcher enabled the apps-in-any-namespace and sharding features together and tested whether the namespace glob allowlist was still enforced, discovering the sharded controller reconciled an Application in a non-matching namespace.
**Exploitation:** Attacker with Argo CD permissions creates/updates an Application in a namespace outside the allowlist; the sharded controller reconciles it, deploying attacker-controlled resources using Argo CD's Kubernetes permissions. Requires ability to trigger an update on the Application resource.
**Insight:** Feature-flag interactions are a rich source of access-control gaps: enabling sharding changed the code path that enforces the namespace allowlist, so test allowlist enforcement separately under each controller mode (sharded vs non-sharded).

