{"answers":{"affected":"2 open source packages ship an affected version, including @grackle-ai/server.","exploited":"There is no known exploitation of GHSA-3mjm-x6gw-2x42 in the wild and no public exploit code.","fix":"Upgrade @grackle-ai/server to 0.70.4 or later.","what":"GHSA-3mjm-x6gw-2x42 is a missing authorization vulnerability in @grackle-ai/server, published on 25 Mar 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for GHSA-3mjm-x6gw-2x42 and fix it if it is affected.\n\nWhat it is: GHSA-3mjm-x6gw-2x42 is a missing authorization vulnerability in @grackle-ai/server, published on 25 Mar 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of GHSA-3mjm-x6gw-2x42 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- @grackle-ai/server (npm): affected all versions; fixed in 0.70.4\n- @grackle-ai/server (npm): affected all versions; fixed in 0.70.4\n\nTask:\n1. 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.\n2. 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.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/GHSA-3mjm-x6gw-2x42/ (Markdown: https://insights.sbomify.com/GHSA-3mjm-x6gw-2x42/index.md)","id":"GHSA-3mjm-x6gw-2x42","markdown":"https://insights.sbomify.com/GHSA-3mjm-x6gw-2x42/index.md","name":"GHSA-3mjm-x6gw-2x42","record":{"aliases":[],"analysis":{"component_type":"server_software","fix_type":"upgrade","impacts":["security_bypass"],"network_reachable":"yes","non_default_config":false,"product_category":"Node.js server package","requires_auth":"none","summary":"The server lacks security headers, reducing defense-in-depth against XSS and clickjacking, requiring an upgrade to add CSP and X-Frame-Options.","user_interaction":"required","vuln_class":"missing_authorization"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"### 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`","ecosystems":["npm"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"@grackle-ai/server has Missing Content-Security-Policy and X-Frame-Options Headers","id":"GHSA-3mjm-x6gw-2x42","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"npm","product":null,"products":[],"type":"missing_authorization","year":"2026"},"n_packages":2,"n_references":null,"packages":[{"ecosystem":"npm","fixed":["0.70.4"],"introduced":["0"],"last_affected":[],"package":"@grackle-ai/server","purl":null,"source":"GHSA-3mjm-x6gw-2x42"},{"ecosystem":"npm","fixed":["0.70.4"],"introduced":["0"],"last_affected":[],"package":"@grackle-ai/server","purl":"pkg:npm/%40grackle-ai/server","source":"GHSA-3mjm-x6gw-2x42"}],"products":null,"published":"2026-03-25","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"The server lacks security headers, reducing defense-in-depth against XSS and clickjacking, requiring an upgrade to add CSP and X-Frame-Options.","url":"https://insights.sbomify.com/GHSA-3mjm-x6gw-2x42/"}