# GHSA-8g29-8xwr-qmhr: @grackle-ai/server JSON.parse lacks try-catch logic in its gRPC Service AdapterConfig Handling

> Missing error handling in JSON parsing can crash the gRPC service if the database contains invalid data, causing denial of service.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 25 Mar 2026

## What is GHSA-8g29-8xwr-qmhr?

GHSA-8g29-8xwr-qmhr is a denial of service vulnerability in @grackle-ai/server, published on 25 Mar 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

### 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` handler
- `packages/server/src/grpc-service.ts:482` — `stopEnvironment` handler
- `packages/server/src/grpc-service.ts:498` — `destroyEnvironment` handler

### Patches

**Fix:** Wrap in try-catch and return a meaningful gRPC error:
```typescript
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`

## Which versions are affected by GHSA-8g29-8xwr-qmhr?

2 open source packages ship an affected version, including @grackle-ai/server.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `@grackle-ai/server` | npm | All versions | 0.70.6 |
| `@grackle-ai/server` | npm | All versions | 0.70.6 |

## How do I fix GHSA-8g29-8xwr-qmhr?

Upgrade @grackle-ai/server to 0.70.6 or later.

## Is GHSA-8g29-8xwr-qmhr being exploited?

There is no known exploitation of GHSA-8g29-8xwr-qmhr in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-8g29-8xwr-qmhr and fix it if it is affected.

What it is: GHSA-8g29-8xwr-qmhr is a denial of service vulnerability in @grackle-ai/server, published on 25 Mar 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of GHSA-8g29-8xwr-qmhr in the wild and no public exploit code.

Affected packages and fixed versions:
- @grackle-ai/server (npm): affected all versions; fixed in 0.70.6
- @grackle-ai/server (npm): affected all versions; fixed in 0.70.6

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/GHSA-8g29-8xwr-qmhr/ (Markdown: https://insights.sbomify.com/GHSA-8g29-8xwr-qmhr/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-8g29-8xwr-qmhr

---
From sbomify Insights: https://insights.sbomify.com/GHSA-8g29-8xwr-qmhr/
Summaries are generated and may contain mistakes; the official description above is the record.
