Skip to content
Access control Disclosed report Intermediate CVE-2023-22736

Argo CD reconciles apps outside configured namespaces when sharding is enabled

When sharding is enabled, the Argo CD Application controller fails to enforce the configured list of allowed namespaces when reconciling Applications. A malicious Argo CD user could therefore deploy Applications outside the permitted namespaces.

czchen Follow

Originally disclosed on HackerOne

Bounty$2,000 High 8.5 View original
  • Triaged in 21 hours
  • Fixed in 9 days
  • Paid in 9 days
  • Disclosed after 39 days

Summary by the program

Controller reconciles apps outside configured namespaces when sharding is enabled

Impact All Argo CD versions starting with 2.5.0-rc1 are vulnerable to an authorization bypass bug which allows a malicious Argo CD user to deploy Applications outside the configured allowed namespaces.

Description of exploit Reconciled Application namespaces are specified as a comma-delimited list of glob patterns. When sharding is enabled on the Application controller, it does not enforce that list of patterns when reconciling Applications. For example, if Application namespaces are configured to be argocd-*, the Application controller may reconcile an Application installed in a namespace called other, even though it does not start with argocd-.

Reconciliation of the out-of-bounds Application is only triggered when the Application is updated, so the attacker must be able to cause an update operation on the Application resource.

Credits Thanks to ChangZhuo Chen (@czchen) for finding the issue and for contributing the fix!

Full GHSA: https://github.com/argoproj/argo-cd/security/advisories/GHSA-6p4m-hw2h-6gmw

The report

The Application CRD outside configured namespace in Argo CD will be reconciled.

The following is how to reproduce the vulnerability:

  • Enable apps-in-any-namespace and sharding features.
  • Create an Application CRD in namespace not configured in Argo CD.
  • Update the Application CRD, and Argo CD will reconcile the Application CRD, despite not in configured namespace.

Impact

Attacker can use Argo CD permission to deploy resources in Kubernetes.

The original report as published on HackerOne, by czchen. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the Application controller's sharding code path skips the namespace glob-pattern check that is applied in the non-sharded path.

Impact

An attacker with Argo CD permissions could deploy resources in Kubernetes outside the configured allowed namespaces; reconciliation only happens when the Application is updated, so the attacker must be able to trigger an update.

What the attacker needed

Sharding feature enabled; apps-in-any-namespace feature enabled; attacker can create and update an Application; attacker has Argo CD permissions

The fix

A fix was contributed by the credited reporter, though the text does not confirm it was applied.

How it was found

  1. Enable the apps-in-any-namespace and sharding features.
  2. Create an Application resource in a namespace that is not in the configured allowed list.
  3. Update that Application resource.
  4. Argo CD reconciles the Application even though its namespace is not allowed.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

Argo CD is a tool that deploys applications into Kubernetes clusters. Administrators can restrict which namespaces (separate areas of the cluster) Argo CD is allowed to manage. This bug means that when a performance feature called sharding is turned on, Argo CD ignores that restriction and can manage applications in other namespaces too.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More from Internet Bug Bounty

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.