Skip to content

Fix dependency and security advisories - #845

Merged
clbotdev merged 2 commits into
mainfrom
t3/fix-security-advisories
Nov 10, 2026
Merged

clbotdev merged 2 commits into
mainfrom
t3/fix-security-advisories

Conversation

@clbotdev

@clbotdev clbotdev commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Dependency advisories

  • Upgrade Next.js to 16.4.5 across workspaces (5 critical RCE advisories). eslint-config-next stays on 16.2.9; 16.4 adds React Compiler lint rules that report 95 new errors.
  • Upgrade Better Auth to 1.6.34, the latest 1.6 release. The critical/high advisories (GHSA-965c, GHSA-r4xp) are only fixed in 1.7.7+, but CourseLit isn't affected: no Magic Link, no social/Generic OAuth, no OAuth Proxy, and storeStateStrategy: "cookie". 1.7 needs an SSO account-identity backfill, so it's left for a separate upgrade.
  • Bump the Handlebars override to 4.7.10 and add a proxy-addr 2.0.8 override.
  • Add a pnpm packageExtensions entry so @hookform/resolvers@3 resolves the app's Zod 3. The new lockfile hoists Zod 4, which broke the web typecheck.
  • Not fixed: astro 1.9.2 in apps/docs (the critical fix needs 7.x).

Security advisories

  • GHSA-hj4c: pauseSequence requires authentication and manageUsers.
  • GHSA-qjmf: SCORM content paths must resolve inside the package directory.
  • GHSA-3ggg: media delete checks the media belongs to the current school for domain, community and user.
  • GHSA-237q: SCORM upload requires manageAnyCourse, or owning the course with manageCourse.
  • GHSA-4v6q: course download archives use a fixed file name on disk, the title is escaped in Content-Disposition, and lesson file names are reduced to their base name.
  • GHSA-cmgp: updateUser only lets callers add or remove permissions they hold.

Other

  • .env.example: DB_TRANSACTION → DB_TRANSACTIONS (the name auth.ts reads).

Not included: GHSA-cjrv (embed XSS) and GHSA-x72c / GHSA-j865 (unsigned payment webhooks).

Testing

  • pnpm test: 100 suites, 835 tests passed, including new tests for each fix.
  • Lint, and typechecks for web and queue, passed; Prettier made no changes.
  • Browser end-to-end run against local MongoDB and a MediaLit stub: every attack was blocked (403/404, nothing reached MediaLit), and the matching normal flows still worked (removing a logo or community image, pausing a sequence, SCORM upload and playback, course download, editing permissions).

- Upgrade Next.js and Better Auth across workspaces
- Update vulnerable dependency overrides and refresh the lockfile
- Restrict SCORM uploads and media deletion to authorized resources
- Validate download and SCORM cache paths; encode archive filenames safely
- Enforce permission-change checks for users and sequence pausing
@clbotdev clbotdev changed the title Fix critical dependency security advisories Fix dependency and security advisories Nov 9, 2026
@clbotdev
clbotdev merged commit 806a64f into main Nov 10, 2026
5 checks passed
@clbotdev
clbotdev deleted the t3/fix-security-advisories branch November 10, 2026 03:02
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