# Grackle AI Server missing WebSocket origin validation

Source: https://junglewise.ai/threats/grackle-ai-server-missing-websocket-origin-validation-d1ccc755  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-03-25. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

Severity: medium · CVSS 4 · Published 2026-03-25

Grackle AI Server is a platform for managing and orchestrating AI coding agents. The server's WebSocket endpoint fails to validate the Origin header when accepting connections, allowing a malicious webpage to hijack active user sessions and subscribe to sensitive real-time events like task updates and environment state if a user visits an attacker-controlled site while logged in.

Technologies: [@grackle-ai/server (npm)](https://junglewise.ai/threats/technologies/grackle-ai-server). Vendors: [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is This vulnerability exploited in the wild?** No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.

**How severe is This vulnerability?** Medium severity, with a CVSS score of 4, published 25 March 2026.

**Which products and versions are affected?** @grackle-ai/server (npm) SEMVER:introduced=0,fixed=0.70.3.

**Is there a fix for This vulnerability?** Yes. @grackle-ai/server (npm): upgrade to 0.70.3 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is This vulnerability attacked?** It is attacked over the network, in a hosted service.

**Am I affected?** Check whether you run @grackle-ai/server (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- @grackle-ai/server (npm): upgrade to 0.70.3 or later

  ```sh
  npm install @grackle-ai/server@0.70.3
  ```


## Technical details

The vulnerability is a missing origin validation (CWE-346) in the WebSocket upgrade handler at packages/server/src/ws-bridge.ts:80-91. The handler checks authentication via API key or session cookie but omits validation of the req.headers.origin header. An attacker can exploit this via cross-origin WebSocket hijacking: if a user has an active Grackle session (protected by SameSite=Lax cookie) and visits a malicious webpage, that page can open a WebSocket connection to ws://localhost:3000/ws and receive real-time events without the server verifying the connection origin. No user interaction beyond visiting the malicious site is required. The fix involves validating origin against an allowlist before accepting WebSocket upgrades; patched in version 0.70.3.

## Affected products

- Grackle AI Server <= 0.70.2

## Timeline

- 2026-03-25: disclosed
- 2026-03-25: patched: Fixed in version 0.70.3

## References

- [https://github.com/nick-pape/grackle/security/advisories/GHSA-w3hv-x4fp-6h6j](https://github.com/nick-pape/grackle/security/advisories/GHSA-w3hv-x4fp-6h6j)
- [https://github.com/nick-pape/grackle](https://github.com/nick-pape/grackle)

## Related threats

- [Grackle Server JSON.parse missing error handling in gRPC adapter config](https://junglewise.ai/threats/grackle-server-json-parse-missing-error-handling-in-grpc-adapter-config-931236d4)
- [Grackle AI Server missing Secure flag on session cookie](https://junglewise.ai/threats/grackle-ai-server-missing-secure-flag-on-session-cookie-0da6f92b)
- [Grackle missing security headers in HTTP responses](https://junglewise.ai/threats/grackle-ai-server-missing-security-headers-in-http-responses-52400df5)
- [Grackle Server unescaped error string in HTML template](https://junglewise.ai/threats/grackle-server-unescaped-error-string-in-html-template-646647e5)
