GHSA-7q9x-8g6p-3x75: @grackle-ai/server Unescaped Error String Vulnerability

LOW
CWE-79
Published
Advisory Summary

GHSA-7q9x-8g6p-3x75 is a LOW unescaped error string vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting @grackle-ai/server libraries in the npm ecosystem. The issue involves unescaped error string in renderpairingpage() html template. Remediation is available by upgrading affected packages to version 0.70.1.

GHSA-7q9x-8g6p-3x75 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-7q9x-8g6p-3x75
Severity LOW
CVSS v3.1 Base Score N/A
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product @grackle-ai/server
Package Ecosystem npm
Published Date
Last Updated

How to Fix GHSA-7q9x-8g6p-3x75

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.1
npm install @grackle-ai/server@0.70.1
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-7q9x-8g6p-3x75, 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.1), 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-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. 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 `renderPairingPage()` function embeds the `error` parameter directly into HTML without escaping: ```typescript const errorHtml = error ? `<p style="color:#e74c3c">${error}</p>` : ""; ``` All current call sites pass hardcoded strings, so this is **not exploitable today**. However, the function is architecturally fragile — if a future code change passes user-controlled or dynamic content into the error parameter, it would create an XSS vulnerability. The `renderAuthorizePage()` function in the same file correctly uses `escapeHtml()` for dynamic content, making this an inconsistency. **Affected code:** - `packages/server/src/index.ts:64-89` — `renderPairingPage()` with unescaped error interpolation - Compare: `packages/server/src/index.ts:130` — `renderAuthorizePage()` correctly uses `escapeHtml()` ### Patches v0.70.1 **Fix:** Apply `escapeHtml()` to the error parameter: ```typescript const errorHtml = error ? `<p style="color:#e74c3c">${escapeHtml(error)}</p>` : ""; ``` ### Workarounds No workaround needed — all current callers pass hardcoded strings. ### Resources - CWE-79: Improper Neutralization of Input During Web Page Generation - File: `packages/server/src/index.ts`

GHSA-7q9x-8g6p-3x75 Affected @grackle-ai/server Versions

1 component(s)
Fixed Versions:
0.70.1
Product / Package Ecosystem Affected Versions Fixed Version
@grackle-ai/server
npm
< 0.70.1
0.70.1

References

Frequently Asked Questions

What is GHSA-7q9x-8g6p-3x75?
GHSA-7q9x-8g6p-3x75 is a security vulnerability in @grackle-ai/server involving Unescaped Error String in renderPairingPage() HTML Template under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which @grackle-ai/server versions are affected?
Affected versions include releases prior to 0.70.1 across affected packages: @grackle-ai/server.
What version fixes GHSA-7q9x-8g6p-3x75?
Upgrading to 0.70.1 (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.1. Upgrade your dependency to 0.70.1 or later.
What CWE is associated with GHSA-7q9x-8g6p-3x75?
GHSA-7q9x-8g6p-3x75 is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.).
How can I check npm dependencies for GHSA-7q9x-8g6p-3x75?
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-7q9x-8g6p-3x75",
  "modified" : "2026-03-25T17:15:40Z",
  "published" : "2026-03-25T17:15:40Z",
  "aliases" : [ ],
  "summary" : "@grackle-ai/server: Unescaped Error String in renderPairingPage() HTML Template",
  "details" : "### Impact\n\nThe `renderPairingPage()` function embeds the `error` parameter directly into HTML without escaping:\n```typescript\nconst errorHtml = error ? `<p style=\"color:#e74c3c\">${error}</p>` : \"\";\n```\n\nAll current call sites pass hardcoded strings, so this is **not exploitable today**. However, the function is architecturally fragile — if a future code change passes user-controlled or dynamic content into the error parameter, it would create an XSS vulnerability.\n\nThe `renderAuthorizePage()` function in the same file correctly uses `escapeHtml()` for dynamic content, making this an inconsistency.\n\n**Affected code:**\n- `packages/server/src/index.ts:64-89` — `renderPairingPage()` with unescaped error interpolation\n- Compare: `packages/server/src/index.ts:130` — `renderAuthorizePage()` correctly uses `escapeHtml()`\n\n### Patches\n\nv0.70.1\n\n**Fix:** Apply `escapeHtml()` to the error parameter:\n```typescript\nconst errorHtml = error ? `<p style=\"color:#e74c3c\">${escapeHtml(error)}</p>` : \"\";\n```\n\n### Workarounds\n\nNo workaround needed — all current callers pass hardcoded strings.\n\n### Resources\n\n- CWE-79: Improper Neutralization of Input During Web Page Generation\n- File: `packages/server/src/index.ts`",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@grackle-ai/server"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.70.1"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 0.70.0"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/nick-pape/grackle/security/advisories/GHSA-7q9x-8g6p-3x75"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/nick-pape/grackle"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-03-25T17:15:40Z",
    "nvd_published_at" : null
  }
}