GHSA-3mjm-x6gw-2x42: @grackle ai/server @grackle-ai/server Has Missing Content-Security-Policy And Vulnerability
MODERATEGHSA-3mjm-x6gw-2x42 is a MODERATE @grackle-ai/server has missing content-security-policy and vulnerability (CWE-693: Protection Mechanism Failure) affecting @grackle ai/server libraries in the npm ecosystem. The issue involves @grackle-ai/server has missing content-security-policy and x-frame-options headers. Remediation is available by upgrading affected packages to version 0.70.4.
GHSA-3mjm-x6gw-2x42 at a Glance
How to Fix GHSA-3mjm-x6gw-2x42
To remediate this vulnerability, upgrade all affected @grackle ai/server dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install @grackle-ai/server@0.70.4
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @grackle-ai/server
How to Check if You Are Affected
To determine whether your Node.js application is affected by GHSA-3mjm-x6gw-2x42, inspect your project dependencies using npm:
npm ls @grackle-ai/server
Analyze the terminal output to locate any version of @grackle ai/server in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.70.4), your application is affected.
Note: The npm ls @grackle-ai/server command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-693: Protection Mechanism Failure, where the product does not use or incorrectly uses a protection mechanism that provides sufficient defense against directed attacks against the product. In @grackle ai/server, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-3mjm-x6gw-2x42 Affected @grackle ai/server Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@grackle-ai/server
|
npm |
< 0.70.4
|
0.70.4
|
References
Frequently Asked Questions
What is GHSA-3mjm-x6gw-2x42?
Which @grackle ai/server versions are affected?
What version fixes GHSA-3mjm-x6gw-2x42?
Is @grackle-ai/server affected?
What CWE is associated with GHSA-3mjm-x6gw-2x42?
How can I check npm dependencies for GHSA-3mjm-x6gw-2x42?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-3mjm-x6gw-2x42",
"modified" : "2026-03-25T17:32:04Z",
"published" : "2026-03-25T17:32:04Z",
"aliases" : [ ],
"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`",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@grackle-ai/server"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.70.4"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 0.70.3"
}
} ],
"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"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-693", "CWE-79" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-03-25T17:32:04Z",
"nvd_published_at" : null
}
}