Know every vulnerabilitybefore it knows you.
DevGuard continuously monitors your dependencies and alerts you when CVEs like this one affect your stack — with real-time threat intelligence built for developers.
GHSA-p4gq-3vxj-f4jq
No affected components available
Summary
A nil pointer dereference in server/auth/gatekeeper.go rbacAuthorization() causes a panic (denial of service) for SSO users whose claims match a namespace-level RBAC rule but not an SSO-namespace rule, when SSO_DELEGATE_RBAC_TO_NAMESPACE=true.
Details
When getServiceAccount(claims, ssoNamespace) returns nil (no matching rule), the error is suppressed and loginAccount remains nil. If RBAC delegation finds a matching namespaceAccount, line 304 calls precedence(loginAccount) which unconditionally accesses serviceAccount.Annotations — nil pointer dereference.
Affected code (v4.0.4):
// gatekeeper.go:304
} else if precedence(namespaceAccount) > precedence(loginAccount) {
// loginAccount is nil here -> precedence(nil) -> PANIC
// gatekeeper.go:232-234
func precedence(serviceAccount *corev1.ServiceAccount) int {
i, _ := strconv.Atoi(serviceAccount.Annotations[common.AnnotationKeyRBACRulePrecedence])
return i
}
PoC
Live-tested 2026-04-17: kind cluster, Argo Workflows v4.0.4, Dex v2.43.1 OIDC provider.
- Deploy Argo Workflows with
--auth-mode=sso --auth-mode=client, SSO pointing to Dex, RBAC enabled. - Set
SSO_DELEGATE_RBAC_TO_NAMESPACE=trueon the argo-server deployment. - Create an RBAC ServiceAccount with
workflows.argoproj.io/rbac-rule: "true"annotation in a target namespace (e.g.,target-ns). - Do not create a matching RBAC rule in the SSO namespace (
argo). - Authenticate via the Dex SSO flow.
- Request
GET /api/v1/workflows/target-nswith the SSO session cookie. - Server returns HTTP 500:
{"code":13,"message":"runtime error: invalid memory address or nil pointer dereference"} - Server logs:
Recovered from panicwith stack trace atgatekeeper.go:233(precedence()) called fromgatekeeper.go:304.
Every subsequent API request from affected SSO users triggers the same panic.
Impact
Permanent denial of service for any SSO user whose claims don't match SSO-namespace RBAC but do match a target namespace rule. Realistic in multi-tenant deployments with per-namespace RBAC. The gRPC recovery interceptor catches the panic so the server process survives, but the affected user gets HTTP 500 on every request.
Suggested Fix
Add nil check: if loginAccount == nil || precedence(namespaceAccount) > precedence(loginAccount)
AI Disclosure
This advisory was prepared with AI assistance (Claude Code, Anthropic).
The vulnerability can be exploited over the network without needing physical access. It is easy for an attacker to exploit this vulnerability. An attacker needs basic access or low-level privileges. No user interaction is needed for the attacker to exploit this vulnerability.
Limited exploitation activity has been observed. Close monitoring and planned remediation are recommended.
The exploit probability is very low. The vulnerability is unlikely to be exploited in the next 30 days.
We did not find any exploit available. Neither in GitHub repositories nor in the Exploit-Database.
Browse More
Continuously monitor your dependencies and get alerted when vulnerabilities like this one affect your stack.
Checkout DevGuard