{"id":"GHSA-5j35-xr4g-vwf4","summary":"@grackle-ai/server has a Missing Secure Flag on Session Cookie","details":"### Impact\n\nThe session cookie is set with `HttpOnly; SameSite=Lax; Path=/` but does not include the `Secure` flag. This means the cookie will be sent over plain HTTP connections.\n\nSince the server binds to `127.0.0.1` by default and uses HTTP (not HTTPS), this is acceptable for localhost use. However, when `--allow-network` is used to bind to `0.0.0.0`, cookies could be transmitted over insecure network connections and intercepted by an attacker.\n\n**Affected code:**\n- `packages/server/src/session.ts:76` — cookie string lacks `; Secure` attribute\n\n### Patches\n\n0.70.5\n\n**Fix:** Conditionally add `; Secure` when served over HTTPS or when `--allow-network` is enabled:\n```typescript\nconst securePart = isHttps ? \"; Secure\" : \"\";\nreturn `${SESSION_COOKIE_NAME}=${cookieValue}; HttpOnly; SameSite=Lax; Path=/${securePart}; Max-Age=${maxAge}`;\n```\n\n### Workarounds\n\nDo not use `--allow-network` over untrusted networks without a TLS-terminating reverse proxy.\n\n### Resources\n\n- OWASP: Secure Cookie Attribute\n- File: `packages/server/src/session.ts`","modified":"2026-03-25T17:46:26.843734Z","published":"2026-03-25T17:32:39Z","database_specific":{"severity":"LOW","github_reviewed":true,"github_reviewed_at":"2026-03-25T17:32:39Z","nvd_published_at":null,"cwe_ids":["CWE-614"]},"references":[{"type":"WEB","url":"https://github.com/nick-pape/grackle/security/advisories/GHSA-5j35-xr4g-vwf4"},{"type":"PACKAGE","url":"https://github.com/nick-pape/grackle"}],"affected":[{"package":{"name":"@grackle-ai/server","ecosystem":"npm","purl":"pkg:npm/%40grackle-ai/server"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.70.5"}]}],"database_specific":{"last_known_affected_version_range":"\u003c= 0.70.4","source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/03/GHSA-5j35-xr4g-vwf4/GHSA-5j35-xr4g-vwf4.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V4","score":"CVSS:4.0/AV:A/AC:H/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N"}]}