{"answers":{"affected":"2 open source packages ship an affected version, including @grackle-ai/server.","exploited":"There is no known exploitation of GHSA-7q9x-8g6p-3x75 in the wild and no public exploit code.","fix":"Upgrade @grackle-ai/server to 0.70.1 or later.","what":"GHSA-7q9x-8g6p-3x75 is a cross-site scripting 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-7q9x-8g6p-3x75 and fix it if it is affected.\n\nWhat it is: GHSA-7q9x-8g6p-3x75 is a cross-site scripting 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-7q9x-8g6p-3x75 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.1\n- @grackle-ai/server (npm): affected all versions; fixed in 0.70.1\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-7q9x-8g6p-3x75/ (Markdown: https://insights.sbomify.com/GHSA-7q9x-8g6p-3x75/index.md)","id":"GHSA-7q9x-8g6p-3x75","markdown":"https://insights.sbomify.com/GHSA-7q9x-8g6p-3x75/index.md","name":"GHSA-7q9x-8g6p-3x75","record":{"aliases":[],"analysis":{"component_type":"library","fix_type":"patch","impacts":["other"],"network_reachable":"yes","non_default_config":false,"product_category":"Node.js server library","requires_auth":"none","summary":"Unescaped error string in HTML template creates potential XSS risk if dynamic content is passed, though currently unexploitable with hardcoded inputs.","user_interaction":"required","vuln_class":"xss"},"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 `renderPairingPage()` function embeds the `error` parameter directly into HTML without escaping:\n```typescript\nconst errorHtml = error ? `\u003cp style=\"color:#e74c3c\"\u003e${error}\u003c/p\u003e` : \"\";\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 ? `\u003cp style=\"color:#e74c3c\"\u003e${escapeHtml(error)}\u003c/p\u003e` : \"\";\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`","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: Unescaped Error String in renderPairingPage() HTML Template","id":"GHSA-7q9x-8g6p-3x75","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"npm","product":null,"products":[],"type":"xss","year":"2026"},"n_packages":2,"n_references":null,"packages":[{"ecosystem":"npm","fixed":["0.70.1"],"introduced":["0"],"last_affected":[],"package":"@grackle-ai/server","purl":null,"source":"GHSA-7q9x-8g6p-3x75"},{"ecosystem":"npm","fixed":["0.70.1"],"introduced":["0"],"last_affected":[],"package":"@grackle-ai/server","purl":"pkg:npm/%40grackle-ai/server","source":"GHSA-7q9x-8g6p-3x75"}],"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":"Unescaped error string in HTML template creates potential XSS risk if dynamic content is passed, though currently unexploitable with hardcoded inputs.","url":"https://insights.sbomify.com/GHSA-7q9x-8g6p-3x75/"}