docs/dependency-audit.md

Dependency audit

Snapshot: October 2, 2026. Command: pnpm audit --prod --json from the workspace root (includes the app and marketing workspace).

Before remediation, the audit reported 18 findings: 2 critical, 6 high, 7 moderate and 3 low. These are installed-package findings, including repeated advisories for different installed versions; they are not 18 independent defects in Relay’s code.

PackageInstalled versionsFindingsPatch targetWhere used
Next.jsApp 16.3.5; marketing 16.3.32 critical16.3.6 or laterApp and marketing framework
Undici7.29.010: 2 high, 5 moderate, 3 low7.29.1 or laterOpenNext → Wrangler → Miniflare (Cloudflare build/local-preview tooling)
brace-expansion2.1.4; 5.0.96: 4 high, 2 moderate2.1.7 and 5.0.12 or laterOpenNext → glob/minimatch (build tooling)

Current status

The security follow-up resolves all 18 findings. Both pnpm audit --prod --json and pnpm audit --json report zero vulnerabilities. Both workspaces now resolve Next.js 16.3.6. Scoped workspace overrides replace Undici 7.x versions below 7.29.1 with 7.29.1, brace-expansion 2.x versions below 2.1.7 with 2.1.7, and brace-expansion 5.x versions below 5.0.12 with 5.0.12. The overrides preserve each affected major-version line, and the refreshed lockfile is committed.

This snapshot predates the move of the app to TanStack Start. Next.js and OpenNext now apply only to the marketing site in website/; the app's optional Cloudflare build uses Nitro and Wrangler.

Exposure and remediation

  • Next.js: the advisory concerns remote code execution in next/og’s ImageResponse. A source search found no ImageResponse, next/og, or dynamic Open Graph image route in Relay’s app or marketing code. The metadata uses a static social-preview image. This reduces the known exposure to that particular feature; it does not replace updating both framework versions.
  • Undici: the findings cover denial of service, TLS certificate-validation bypass, cross-user cookie disclosure, response splitting, and unsafe caching. Exploitation depends on the affected WebSocket, retry, cache or connection-pool feature being used. Relay has no direct Undici imports; the installed vulnerable version comes through Miniflare. Update the Cloudflare tooling chain or use a narrowly scoped patched-version override if the parent packages have not updated.
  • brace-expansion: crafted brace/glob expressions can consume excessive CPU or exhaust the stack. These versions enter through OpenNext build tools; no direct application import was found. Update the parent glob/minimatch dependencies or preserve each major-version line with narrowly scoped overrides.

The launch-copy PR only documented the findings; the subsequent security PR patches them. The full check passes: typechecks, app build, 69 unit tests, 118 backend tests, 2 CSP tests, production browser smoke checks and the production audit. Both app and marketing OpenNext Cloudflare builds and local Wrangler previews also pass. The marketing preview verifies rendering, the Free-plan link, the legacy redirect and a dynamic public summary; the app preview verifies public pages, its public summary and static JavaScript. A frozen-lockfile install passes.

Advisory references

undici

brace-expansion

next