{"id":"GHSA-3mjm-x6gw-2x42","aliases":[],"url":"https://o3.security/vulnerability/GHSA-3mjm-x6gw-2x42","summary":"@grackle-ai/server has Missing Content-Security-Policy and X-Frame-Options Headers","details":"### Impact\n\nThe HTTP server does not set `Content-Security-Policy`, `X-Frame-Options`, or `X-Content-Type-Options` headers on any response. This reduces defense-in-depth against XSS, clickjacking, and MIME-sniffing attacks.\n\nWhile the current XSS attack surface is small (React-markdown is configured safely, no `dangerouslySetInnerHTML`, Vite does not generate source maps), the absence of these headers means any future XSS vulnerability would have no secondary defense layer.\n\n**Affected code:**\n- `packages/server/src/index.ts` — all `res.writeHead()` calls only set `Content-Type`, with no security headers\n\n### Patches\n\n0.70.4\n\n**Fix:** Add security headers to all HTML/API responses:\n```typescript\nres.writeHead(200, {\n  \"Content-Type\": contentType,\n  \"Content-Security-Policy\": \"default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:\",\n  \"X-Frame-Options\": \"DENY\",\n  \"X-Content-Type-Options\": \"nosniff\"\n});\n```\n\n### Workarounds\n\nUse a reverse proxy (nginx, Caddy) in front of the Grackle server to inject security headers.\n\n### References\n\n- CWE-693: Protection Mechanism Failure\n- OWASP: HTTP Security Response Headers\n- File: `packages/server/src/index.ts`","published":"2026-03-25T17:32:04Z","modified":"2026-03-25T17:46:27.723451Z","cvss":null,"epss":null,"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"npm","name":"@grackle-ai/server","fixedVersion":"0.70.4"}],"fix":null,"references":[{"type":"WEB","url":"https://github.com/nick-pape/grackle/security/advisories/GHSA-3mjm-x6gw-2x42"},{"type":"PACKAGE","url":"https://github.com/nick-pape/grackle"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-03-25T17:46:27.723451Z"}}