GHSA-4G2C-WPGJ-49W8
Standalone key server accepts ANY Bearer token as valid authentication
Texto original en inglés · Ver en español
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-4G2C-WPGJ-49W8 divulgada | |
| Remediación | Parche 1.4.0 | openssl_encrypt · 21 d desde divulgación | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Severity: CRITICAL
Summary
The standalone key server's `verify_api_token()` function in `server/key-server/app/api/v1/keys.py` at lines 48-87 only checks that a non-empty token string is present after the `Bearer ` prefix. It does not validate the token against a database, JWT signature, or any credential store.
Affected Code
def verify_api_token(authorization: Optional[str] = Header(None)) -> bool:
# ...
token = authorization[7:] # Remove "Bearer " prefix
# In production, validate token against database or JWT
# For now, simple token check (replace with proper validation)
if not token:
raise HTTPException(...)
logger.debug("API token validated successfully")
return True # ANY non-empty string passesImpact
Any HTTP request with `Authorization: Bearer x` is fully authenticated. An attacker can:
- Upload arbitrary public keys
- Search and enumerate all keys
- Revoke arbitrary keys belonging to any user
Recommended Fix
- Implement JWT token validation with proper signature verification, or
- Validate tokens against a database of issued tokens
- Remove the placeholder authentication entirely until a real implementation is ready
---
Resolution
Resolved in commit `1d519a1` on branch `feature/v1.4.x-development`.
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
pypiopenssl_encrypt |
Corregida | 1.4.0 | 21 d | 1.4.9 no afectada |
1.4.0Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/jahlives/openssl_encrypt/security/advisories/GHSA-4g2c-wpgj-49w8Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
