@grackle-ai/server
Affected
- introduced
0, fixed0.70.6(semver)
Fixed versions
0.70.6
Fix
- Fixed version
0.70.6npm install @grackle-ai/[email protected]
Advisory
Also known as: None
@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 — reconnectOrProvision handlerpackages/server/src/grpc-service.ts:482 — stopEnvironment handlerpackages/server/src/grpc-service.ts:498 — destroyEnvironment handlerPatches
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
packages/server/src/grpc-service.tsLow Basis: The source's own band: LOW
0, fixed 0.70.6 (semver)0.70.6
0.70.6npm install @grackle-ai/[email protected]Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0