Listen to this Post
How the CVE Works
The vulnerability exists in Argo CD’s repository URL parsing logic (ui/src/app/shared/components/urls.ts
), where improper validation of URL protocols allows malicious `javascript:` URLs to be injected. When a repository URL is modified to include a `javascript:` payload (e.g., javascript:alert(document.cookie)
), the UI renders it within an `` tag without sanitization. This enables XSS execution when a victim clicks the link, granting attackers the ability to perform API actions (like Kubernetes resource modifications) under the victim’s session. Browsers incorrectly resolve `javascript:` URLs as valid hostnames, bypassing traditional XSS mitigations.
DailyCVE Form
Platform: Argo CD
Version: < v3.0.4, < v2.14.13, < v2.13.8
Vulnerability: XSS via URL
Severity: Critical
Date: May 28, 2025
Prediction: Patch expected by June 10, 2025
What Undercode Say:
Exploitation:
1. Payload Crafting:
javascript:fetch('/api/resources', {method:'POST',body:'{"malicious":"payload"}'})
2. Trigger: Inject payload into repository URL field.
- Execution: Victim clicks the malicious link, executing the script in their session.
Protection:
- Patch Immediately: Upgrade to Argo CD v3.0.4, v2.14.13, or v2.13.8.
- Input Validation: Reject `javascript:` and other dangerous protocols:
function sanitizeUrl(url: string): string | null { if (url.toLowerCase().startsWith('javascript:')) return null; return url; }
3. CSP Mitigation: Enforce Content Security Policy:
Content-Security-Policy: default-src 'self'; script-src 'unsafe-inline' 'unsafe-eval'
4. Browser Hardening: Disable `javascript:` navigation in anchor tags via extensions.
Detection Commands:
1. Grep for Vulnerable Code:
grep -r "href=\".javascript:" /path/to/argo-cd/ui
2. Curl Exploit Test:
curl -X POST -d '{"repoUrl":"javascript:alert(1)"}' http://argo-cd/api/repositories
Post-Patch Verification:
argo-cd version | grep -E "3.0.4|2.14.13|2.13.8"
Kubernetes Workaround:
apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: name: block-argo-cd-xss spec: podSelector: matchLabels: app: argo-cd policyTypes: - Ingress ingress: - from: - namespaceSelector: matchLabels: trusted: "true"
Log Monitoring:
kubectl logs -l app=argo-cd --tail=100 | grep -i "javascript:"
References:
Sources:
Reported By: github.com
Extra Source Hub:
Undercode