GHSA-3mjm-x6gw-2x42: @grackle ai/server @grackle-ai/server Has Missing Content-Security-Policy And Vulnerability

MODERATE
CWE-693 CWE-79
Published
Advisory Summary

GHSA-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

CVE Identifier N/A
GHSA Identifier GHSA-3mjm-x6gw-2x42
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-693: Protection Mechanism Failure
Affected Product @grackle ai/server
Package Ecosystem npm
Published Date
Last Updated

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.

@grackle-ai/server fixed: 0.70.4
npm install @grackle-ai/server@0.70.4
Verify Direct and Transitive Dependencies

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

### Impact The 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. While 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. **Affected code:** - `packages/server/src/index.ts` — all `res.writeHead()` calls only set `Content-Type`, with no security headers ### Patches 0.70.4 **Fix:** Add security headers to all HTML/API responses: ```typescript res.writeHead(200, { "Content-Type": contentType, "Content-Security-Policy": "default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:", "X-Frame-Options": "DENY", "X-Content-Type-Options": "nosniff" }); ``` ### Workarounds Use a reverse proxy (nginx, Caddy) in front of the Grackle server to inject security headers. ### References - CWE-693: Protection Mechanism Failure - OWASP: HTTP Security Response Headers - File: `packages/server/src/index.ts`

GHSA-3mjm-x6gw-2x42 Affected @grackle ai/server Versions

1 component(s)
Fixed Versions:
0.70.4
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?
GHSA-3mjm-x6gw-2x42 is a security vulnerability in @grackle ai/server involving @grackle-ai/server has Missing Content-Security-Policy and X-Frame-Options Headers under CWE-693: Protection Mechanism Failure.
Which @grackle ai/server versions are affected?
Affected versions include releases prior to 0.70.4 across affected packages: @grackle-ai/server.
What version fixes GHSA-3mjm-x6gw-2x42?
Upgrading to 0.70.4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @grackle-ai/server affected?
Yes, @grackle-ai/server is affected in releases prior to 0.70.4. Upgrade your dependency to 0.70.4 or later.
What CWE is associated with GHSA-3mjm-x6gw-2x42?
GHSA-3mjm-x6gw-2x42 is classified under CWE-693: Protection Mechanism Failure (The product does not use or incorrectly uses a protection mechanism that provides sufficient defense against directed attacks against the product.).
How can I check npm dependencies for GHSA-3mjm-x6gw-2x42?
Run the dependency tree command: 'npm ls @grackle-ai/server'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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
  }
}