Unauthenticated argocd-server panic via a malicious Bitbucket-Server webhook payload
Description
Argo CD is a declarative, GitOps continuous delivery tool for Kubernetes. Versions 1.2.0 through 1.8.7, 2.0.0-rc1 through 2.14.19, 3.0.0-rc1 through 3.2.0-rc1, 3.1.7 and 3.0.18 are vulnerable to malicious API requests which can crash the API server and cause denial of service to legitimate clients. Without a configured webhook.bitbucketserver.secret, Argo CD's /api/webhook endpoint crashes when receiving a malformed Bitbucket Server payload (non-array repository.links.clone field). A single unauthenticated request triggers CrashLoopBackOff, and targeting all replicas causes complete API outage. This issue is fixed in versions 2.14.20, 3.2.0-rc2, 3.1.8 and 3.0.19.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
github.com/argoproj/argo-cdGo | >= 1.2.0, <= 1.8.7 | — |
github.com/argoproj/argo-cd/v2Go | >= 2.0.0-rc1, < 2.14.20 | 2.14.20 |
github.com/argoproj/argo-cd/v3Go | >= 3.2.0-rc1, < 3.2.0-rc2 | 3.2.0-rc2 |
github.com/argoproj/argo-cd/v3Go | >= 3.1.0-rc1, < 3.1.8 | 3.1.8 |
github.com/argoproj/argo-cd/v3Go | >= 3.0.0-rc1, < 3.0.19 | 3.0.19 |
Affected products
1Patches
15c466a4e3980Merge commit from fork
2 files changed · +23 −7
util/webhook/webhook.go+9 −7 modified@@ -255,13 +255,15 @@ func (a *ArgoCDWebhookHandler) affectedRevisionInfo(payloadIf any) (webURLs []st // Webhook module does not parse the inner links if payload.Repository.Links != nil { - for _, l := range payload.Repository.Links["clone"].([]any) { - link := l.(map[string]any) - if link["name"] == "http" { - webURLs = append(webURLs, link["href"].(string)) - } - if link["name"] == "ssh" { - webURLs = append(webURLs, link["href"].(string)) + clone, ok := payload.Repository.Links["clone"].([]any) + if ok { + for _, l := range clone { + link := l.(map[string]any) + if link["name"] == "http" || link["name"] == "ssh" { + if href, ok := link["href"].(string); ok { + webURLs = append(webURLs, href) + } + } } } }
util/webhook/webhook_test.go+14 −0 modified@@ -728,6 +728,20 @@ func Test_affectedRevisionInfo_appRevisionHasChanged(t *testing.T) { {true, "refs/tags/no-slashes", bitbucketPushPayload("no-slashes"), "bitbucket push branch or tag name without slashes, targetRevision tag prefixed"}, {true, "refs/tags/no-slashes", bitbucketRefChangedPayload("no-slashes"), "bitbucket ref changed branch or tag name without slashes, targetRevision tag prefixed"}, {true, "refs/tags/no-slashes", gogsPushPayload("no-slashes"), "gogs push branch or tag name without slashes, targetRevision tag prefixed"}, + + {true, "some-ref", bitbucketserver.RepositoryReferenceChangedPayload{ + Changes: []bitbucketserver.RepositoryChange{ + {Reference: bitbucketserver.RepositoryReference{ID: "refs/heads/some-ref"}}, + }, + Repository: bitbucketserver.Repository{Links: map[string]any{"clone": "boom"}}, // The string "boom" here is what previously caused a panic. + }, "bitbucket push branch or tag name, malformed link"}, // https://github.com/argoproj/argo-cd/security/advisories/GHSA-f9gq-prrc-hrhc + + {true, "some-ref", bitbucketserver.RepositoryReferenceChangedPayload{ + Changes: []bitbucketserver.RepositoryChange{ + {Reference: bitbucketserver.RepositoryReference{ID: "refs/heads/some-ref"}}, + }, + Repository: bitbucketserver.Repository{Links: map[string]any{"clone": []any{map[string]any{"name": "http", "href": []string{}}}}}, // The href as an empty array is what previously caused a panic. + }, "bitbucket push branch or tag name, malformed href"}, } for _, testCase := range tests { testCopy := testCase
Vulnerability mechanics
Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
5- github.com/advisories/GHSA-f9gq-prrc-hrhcghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2025-59531ghsaADVISORY
- github.com/argoproj/argo-cd/commit/5c466a4e39802e059e75c0008ae7b7b8e842538fghsax_refsource_MISCWEB
- github.com/argoproj/argo-cd/security/advisories/GHSA-f9gq-prrc-hrhcghsax_refsource_CONFIRMWEB
- pkg.go.dev/vuln/GO-2025-3993ghsaWEB
News mentions
0No linked articles in our index yet.