Security: Update dependencies to fix CVE vulnerabilities#304
Conversation
This update resolves all known CVE vulnerabilities by updating the following packages: - Next.js: 15.3.4 → 15.4.8 - Fixes critical RCE vulnerability (GHSA-9qr9-h5gf-34mp) - Fixes moderate SSRF vulnerability (GHSA-4342-x723-ch2f) - Fixes moderate cache key confusion (GHSA-g5qg-72qw-gw5v) - Fixes moderate content injection (GHSA-xv57-4mr9-wg8v) - next-auth: 5.0.0-beta.25 → 5.0.0-beta.30 - Fixes moderate email misdelivery vulnerability (GHSA-5jpx-9hw9-2fx4) - markdown-to-jsx: 6.11.4 → 7.4.0 - Fixes moderate XSS vulnerability (GHSA-4wx3-54gh-9fr9) - lint-staged: 13.3.0 → 15.2.11 - Fixes micromatch ReDoS vulnerability (GHSA-952p-6rrq-rcjv) Security audit now shows: No known vulnerabilities found 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Pull Request Review: Security Dependency UpdatesOverall AssessmentRecommendation: ✅ APPROVE with minor suggestions This is an excellent security-focused PR that addresses critical vulnerabilities in the dependency tree. The updates are well-documented and follow best practices for dependency management. Security Review ✅ EXCELLENTCritical Fixes Addressed
The PR successfully reduces the vulnerability count from 24 to 0, which is outstanding. Code Quality ✅ GOODStrengths
Observations
Potential Issues
|
There was a problem hiding this comment.
Pull request overview
This PR updates dependencies across the monorepo to address 24 known CVE vulnerabilities (2 critical, 1 high, 17 moderate, 4 low) by upgrading to secure versions. The updates focus on critical security fixes in Next.js (RCE and SSRF vulnerabilities), next-auth (email misdelivery), markdown-to-jsx (XSS), and lint-staged (ReDoS), while also updating numerous other packages to their latest stable versions.
- Updates Next.js from 15.3.4 to 15.4.8 to fix critical RCE and moderate SSRF/cache/injection vulnerabilities
- Updates next-auth from 5.0.0-beta.25 to 5.0.0-beta.30 to fix email misdelivery vulnerability
- Updates markdown-to-jsx from 6.11.4 to 7.4.0 (major version) to fix XSS vulnerability
- Updates lint-staged from 13.0.3 to 15.2.11 (multiple major versions) to fix ReDoS vulnerability
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| package.json | Updates root-level dev dependencies including lint-staged (13.0.3→15.2.11), husky, prettier, and turbo |
| apps/website/package.json | Updates Next.js, markdown-to-jsx (major version 6→7), and various dev dependencies including TypeScript types and Tailwind tooling |
| apps/plugins/package.json | Updates Next.js, next-auth, Prisma, all Radix UI components, TanStack libraries, React Hook Form, and numerous other production and dev dependencies |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "@types/node": "^18.19.130", | ||
| "@types/react": "19.0.12", | ||
| "autoprefixer": "^10.4.22", | ||
| "eslint-config-next": "15.3.0", |
There was a problem hiding this comment.
eslint-config-next is still at version 15.3.0 while Next.js has been updated to 15.4.8. The ESLint config version should typically match the Next.js version to ensure compatibility and get the latest lint rules. Consider updating this to 15.4.8 or a compatible version.
| "eslint-config-next": "15.3.0", | |
| "eslint-config-next": "15.4.8", |
| "@types/semver": "^7.5.8", | ||
| "@types/semver": "^7.7.1", | ||
| "autoprefixer": "10.4.17", | ||
| "eslint-config-next": "15.3.0", |
There was a problem hiding this comment.
eslint-config-next is still at version 15.3.0 while Next.js has been updated to 15.4.8. The ESLint config version should typically match the Next.js version to ensure compatibility and get the latest lint rules. Consider updating this to 15.4.8 or a compatible version.
| "eslint-config-next": "15.3.0", | |
| "eslint-config-next": "15.4.8", |
| "lint-staged": "^13.0.3", | ||
| "prettier": "^2.7.1", | ||
| "husky": "^8.0.3", | ||
| "lint-staged": "^15.2.11", |
There was a problem hiding this comment.
lint-staged is being updated from ^13.0.3 to ^15.2.11, which is a major version jump spanning two major versions (13→14→15). Major version updates often include breaking changes to the configuration format or behavior. Please verify that the lint-staged configuration in this file (lines 29-35) is still compatible with version 15, particularly the glob patterns and command structure.
| "zod": "^3.23.8" | ||
| "usehooks-ts": "^2.16.0", | ||
| "vaul": "^0.9.9", | ||
| "zod": "^3.25.76" |
There was a problem hiding this comment.
[nitpick] zod is being updated from ^3.23.8 to ^3.25.76, a minor version increase with 2 minor versions. While this should be backward compatible, Zod schema validation is critical for runtime type safety and data validation. Please ensure all existing Zod schemas, particularly those used for API validation and form validation, continue to work as expected after this update.
| "next": "15.3.4", | ||
| "chart.js": "^3.9.1", | ||
| "focus-visible": "^5.2.1", | ||
| "markdown-to-jsx": "^7.4.0", |
There was a problem hiding this comment.
The markdown-to-jsx package is being updated from ^6.11.4 to ^7.4.0, which is a major version bump. Major version updates typically include breaking changes. Please verify that this update doesn't break any markdown rendering functionality in the website, particularly if the library is used by the nextra theme or other dependencies.
| "markdown-to-jsx": "^7.4.0", | |
| "markdown-to-jsx": "^6.11.4", |
| "@swc/types": "^0.1.25", | ||
| "@tailwindcss/postcss": "^4.1.17", | ||
| "@types/node": "^18.19.130", | ||
| "@types/react": "19.0.12", |
There was a problem hiding this comment.
@types/react is updated to 19.0.12 but the pnpm overrides section (line 42) still forces @types/react to 19.1.0. This creates a version mismatch. Consider either:
- Updating the pnpm override to
19.0.12to match, or - Updating the devDependency version to
19.1.0to match the override
Currently, the override will win, making the declared version in devDependencies misleading.
| "@types/react": "19.0.12", | |
| "@types/react": "19.1.0", |
Summary
This PR updates all dependencies with known CVE vulnerabilities to their latest secure versions.
Security Audit Results:
Updated Packages
Critical Security Fixes
Next.js:
15.3.4→15.4.8next-auth:
5.0.0-beta.25→5.0.0-beta.30Moderate Security Fixes
markdown-to-jsx:
6.11.4→7.4.0lint-staged:
13.3.0→15.2.11Additional Updates
All other dependencies were also updated to their latest compatible versions for better security and stability.
Test Plan
pnpm auditshows no vulnerabilitiespnpm buildto ensure all builds succeed🤖 Generated with Claude Code