Patch React2Shell RCE and harden auth, uploads and containers
Deploy Vault CMS / deploy (push) Successful in 2m23s

- Upgrade next 16.0.3 -> 16.3.5 and react/react-dom 19.2.0 -> 19.3.0
  (CVE-2025-55182 / CVE-2025-66478 unauthenticated RCE), next-auth -> 4.24.15
- Require admin role on /api/users, /api/courses and /api/enrollments,
  which were unauthenticated
- Replace ALLOWED_ADMINS checks that allowed any signed-in user when the
  variable was empty with the role-based requireAdmin
- Sanitize upload filenames, restrict thumbnail extensions, store edited
  thumbnails in UPLOADS_DIR, tighten traversal checks in file routes
- Dockerfile: Node 22, pinned pnpm, non-root user, critical audit gate
- Compose: read-only rootfs, dropped caps, no-new-privileges, Postgres
  password from env
- Exclude .env from Docker build context; add security headers
- Deploy with git reset --hard instead of git pull
- Remove stale package-lock.json

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
twotalesanimation
2026-09-15 11:52:33 +02:00
parent a863a5cbf3
commit 08b6e58b8e
21 changed files with 974 additions and 10406 deletions
+6 -6
View File
@@ -45,11 +45,11 @@
"formidable": "^3.5.4",
"hls.js": "^1.6.15",
"lucide-react": "^0.554.0",
"next": "16.0.3",
"next-auth": "^4.24.13",
"next": "16.3.5",
"next-auth": "^4.24.15",
"next-themes": "^0.4.6",
"react": "19.2.0",
"react-dom": "19.2.0",
"react": "19.3.0",
"react-dom": "19.3.0",
"recharts": "2.15.4",
"sonner": "^2.0.7",
"swr": "^2.3.6",
@@ -61,13 +61,13 @@
"devDependencies": {
"@tailwindcss/postcss": "^4.1.17",
"@types/formidable": "^3.4.6",
"@types/unzipper": "^0.10.10",
"@types/node": "^20.19.25",
"@types/react": "^19",
"@types/react-dom": "^19",
"@types/unzipper": "^0.10.10",
"autoprefixer": "^10.4.22",
"eslint": "^9",
"eslint-config-next": "16.0.3",
"eslint-config-next": "16.3.5",
"postcss": "^8.5.6",
"prisma": "^6.19.0",
"tailwindcss": "^4.1.17",