Описание
Fulcio is vulnerable to Server-Side Request Forgery (SSRF) via MetaIssuer Regex Bypass
Security Disclosure: SSRF via MetaIssuer Regex Bypass
Summary
Fulcio's metaRegex() function uses unanchored regex, allowing attackers to bypass MetaIssuer URL validation and trigger SSRF to arbitrary internal services.
Since the SSRF only can trigger GET requests, the request cannot mutate state. The response from the GET request is not returned to the caller so data exfiltration is not possible. A malicious actor could attempt to probe an internal network through Blind SSRF.
Impact
- SSRF to cloud metadata (169.254.169.254)
- SSRF to internal Kubernetes APIs
- SSRF to any service accessible from Fulcio's network
- Affects ALL deployments using MetaIssuers
Patches
Upgrade to v1.8.5.
Workarounds
None. If anchors are included in the meta issuer configuration URL, they will be escaped before the regular expression is compiled, not making this a sufficient mitigation. Deployments must upgrade to the latest Fulcio release v1.8.5.
Affected Code
File: pkg/config/config.go
Function: metaRegex() (lines 143-156)
The Bug
The regex has no ^ (start) or $ (end) anchors. Go's regexp.MatchString() does substring matching, so:
Exploit
- Attacker sends JWT with
issclaim:https://attacker.com/path/https://oidc.eks.x.amazonaws.com/id/y - Fulcio's
GetIssuer()matches this against MetaIssuer patterns - Unanchored regex matches the embedded pattern as substring
- Fulcio calls
oidc.NewProvider()with attacker's URL - HTTP request goes to
attacker.com, notamazonaws.com - Attacker returns OIDC discovery with
jwks_uripointing to internal service - Fulcio fetches from internal service → SSRF
Пакеты
github.com/sigstore/fulcio
<= 1.8.4
1.8.5
Связанные уязвимости
Fulcio is a certificate authority for issuing code signing certificates for an OpenID Connect (OIDC) identity. Prior to 1.8.5, Fulcio's metaRegex() function uses unanchored regex, allowing attackers to bypass MetaIssuer URL validation and trigger SSRF to arbitrary internal services. Since the SSRF only can trigger GET requests, the request cannot mutate state. The response from the GET request is not returned to the caller so data exfiltration is not possible. A malicious actor could attempt to probe an internal network through Blind SSRF. This vulnerability is fixed in 1.8.5.
Fulcio is a certificate authority for issuing code signing certificates for an OpenID Connect (OIDC) identity. Prior to 1.8.5, Fulcio's metaRegex() function uses unanchored regex, allowing attackers to bypass MetaIssuer URL validation and trigger SSRF to arbitrary internal services. Since the SSRF only can trigger GET requests, the request cannot mutate state. The response from the GET request is not returned to the caller so data exfiltration is not possible. A malicious actor could attempt to probe an internal network through Blind SSRF. This vulnerability is fixed in 1.8.5.
Fulcio is a certificate authority for issuing code signing certificate ...