Skip to content

fix(deps): resolve all critical and high security advisories - #846

Merged
s3rot0n1n merged 1 commit into
mainfrom
fix/critical-high-vulnerabilities
Nov 10, 2026
Merged

s3rot0n1n merged 1 commit into
mainfrom
fix/critical-high-vulnerabilities

Conversation

@clbotdev

Copy link
Copy Markdown
Contributor

Summary

Clears every critical and high advisory reported by pnpm audit on main.

Before After
Critical 2 0
High 145 0
Moderate / Low 150 / 46 23 / 17

Direct dependency upgrades

  • better-auth / @better-auth/sso 1.6.34 → 1.7.19. Fixes the critical "OAuth state usable as a Magic Link" advisory and the OAuth Proxy account-takeover advisory. No config changes were needed.
  • astro 1.9 → 7.4 in the legacy apps/docs site, with @astrojs/preact 6 and @astrojs/react 7. Fixes the critical AVIF image-optimisation RCE. The site builds without source changes. I scoped the Preact and React renderers with include so they don't conflict, and git-ignored the generated .astro/ directory.
  • zod 3 → 4 in apps/web and apps/queue. No zod 3 release is patched for the memory-exhaustion advisory. Also bumped @hookform/resolvers 3 → 5 and react-hook-form to 7.91. Code change: z.record(v) → z.record(z.string(), v) in the queue.
  • @opentelemetry/ 0.204 → 0.223 in the queue. Adapted to the logRecordProcessors: [...] and BatchLogRecordProcessor({ exporter }) API.
  • Also bumped: sharp 0.35.5, adm-zip 0.6.1, nodemailer 10.4, mailparser 3.14, liquidjs 10.30, express 4.22, razorpay 2.9.8, swagger-ui-react 5.34, tiptap 3.33, nanoid 5.1.16, postcss 8.5.32.

Transitive dependencies

Refreshed pnpm.overrides so transitive packages resolve to patched versions. Each override is scoped to a major version where several majors coexist (minimatch, brace-expansion, js-yaml, rollup, nanoid, etc.). Outdated pins that had become vulnerable themselves (axios, fast-uri, @xmldom/xmldom, form-data, fast-xml-parser, protobufjs) now point at patched ranges. The @hookform/resolvers@3 packageExtension is no longer needed and was removed.

Verification

  • pnpm audit: 0 critical, 0 high
  • pnpm test: 100 suites, 835 tests pass
  • pnpm lint: clean
  • tsc --noEmit passes for apps/web and apps/queue
  • pnpm --filter @courselit/web build succeeds. The generated openapi.json is semantically identical.
  • All packages/* build. apps/docs (Astro 7) builds all 65 pages.

E2E browser smoke test

Run against local Mongo (replica set), Redis and Mailpit, with the queue and web apps running:

  • Email OTP sign-up/sign-in as the super admin (better-auth 1.7 with the custom multi-tenant Mongo adapter), session retrieval, dashboard access
  • Product creation. Text lesson authored in the tiptap editor and saved; checked the stored JSON.
  • Payment-plan form (zod 4 + resolvers 5). The validation error appears on an empty submit, then the plan saves.
  • Course published. Public product page renders. Free checkout enrolls the user and redirects to the course viewer, which renders the lesson text.
  • Google login-provider settings form saves.
  • /swagger (swagger-ui-react 5.34) loads and renders the spec.
  • Queue in production mode sends the OTP over SMTP with nodemailer 10, and it arrives in Mailpit.
  • Legacy Astro docs: pages render, and the Preact theme-toggle island hydrates and works.

Notes

  • Locally, running next start (NODE_ENV=production) over plain http redirects /dashboard back to /login. The proxy's auth instance has no baseURL, so better-auth expects __Secure- cookie names. The cookie-prefix logic is identical in 1.6.34, so this is pre-existing and doesn't affect HTTPS deployments. I used next dev for the logged-in part of the smoke test.
  • The [tiptap warn]: Duplicate extension names console warning is pre-existing. StarterKit v3 already bundles link, dropcursor, gapcursor and heading.

- Upgrade better-auth and @better-auth/sso to 1.7.19 (critical OAuth state / magic link advisory)
- Upgrade legacy Astro docs app to Astro 7 (critical AVIF RCE) and scope JSX renderers
- Upgrade sharp, adm-zip, nodemailer, mailparser, liquidjs, razorpay, swagger-ui-react,
  OpenTelemetry (0.223), tiptap, nanoid and postcss
- Move web and queue to zod 4 and @hookform/resolvers 5; adapt z.record() calls
- Adopt the OpenTelemetry logRecordProcessors / BatchLogRecordProcessor({ exporter }) API
- Refresh pnpm overrides so transitive deps resolve to patched versions
@s3rot0n1n
s3rot0n1n merged commit dcedd5a into main Nov 10, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants