{"id":"GHSA-7q9x-8g6p-3x75","aliases":[],"url":"https://o3.security/vulnerability/GHSA-7q9x-8g6p-3x75","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`","published":"2026-03-25T17:15:40Z","modified":"2026-03-25T17:32:20.333636Z","cvss":null,"epss":null,"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"npm","name":"@grackle-ai/server","fixedVersion":"0.70.1"}],"fix":null,"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"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-03-25T17:32:20.333636Z"}}