@grackle-ai/server JSON.parse lacks try-catch logic in its gRPC Service AdapterConfig Handling
Impact
JSON.parse(env.adapterConfig) is called without error handling in three locations within the gRPC service. While the data originates from the server's own SQLite database and should always be valid JSON, database corruption, migration errors, or unexpected state could cause an unhandled exception that crashes the gRPC handler.
Additionally, the parsed result is cast as Record<string, unknown> and passed to adapter methods without property validation, creating a theoretical prototype pollution surface if the database is compromised.
Affected code:
packages/server/src/grpc-service.ts:415—reconnectOrProvisionhandlerpackages/server/src/grpc-service.ts:482—stopEnvironmenthandlerpackages/server/src/grpc-service.ts:498—destroyEnvironmenthandler
Patches
Fix: Wrap in try-catch and return a meaningful gRPC error:
let config: Record<string, unknown>;
try {
config = JSON.parse(env.adapterConfig) as Record<string, unknown>;
} catch {
throw new ConnectError("Invalid adapter configuration", Code.Internal);
}
Workarounds
Ensure database integrity. Back up the SQLite database regularly.
Resources
- CWE-754: Improper Check for Unusual or Exceptional Conditions
- File:
packages/server/src/grpc-service.ts
Software afectado
Haz clic en una tecnología para ver todas sus vulnerabilidades.
| Plataforma | Paquete | Versiones vulnerables | Corregida en |
|---|---|---|---|
| Paquete de npm | @grackle-ai/server | < 0.70.6 | 0.70.6 |
Referencias
- Vector CVSS
CVSS:4.0/AV:N/AC:H/AT:P/PR:H/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N- Debilidad (CWE)
CWE-754- Plataforma
- npm
- Paquete
@grackle-ai/server- Publicada
- 25.03.2026
- Actualizado
- 11.10.2026 10:22
Fuentes y licencias
OSV / GitHub Advisory Database - GHSA-8g29-8xwr-qmhr - CC BY 4.0
Historial de vulnerabilidades: @grackle-ai/server
Todas las vulnerabilidades publicadas de este paquete (Paquete de npm), de la más reciente a la más antigua. Muestra si es un fallo aislado o un paquete que hay que vigilar.
- Entradas en total
- 5
- Primera → última
- 03.2026 03.2026
- Sin corrección
- 0
- Explotada en ataques
- 0
Distribución por gravedad
- Alta 1
- Media 1
- Baja 3
Divulgaciones por año
- 2026: 5
-
@grackle-ai/server JSON.parse lacks try-catch logic in its gRPC Service AdapterConfig Handling esta entrada
Identifica las vulnerabilidades de tu aplicación
Con la integración de DockRay y el inventario de software activado, DockRay compara las versiones notificadas de los componentes con las vulnerabilidades conocidas y avisa de las coincidencias confirmadas. La cobertura depende de la tecnología compatible y de los avisos disponibles.