
افحص مشروع Next.js مقابل الاستشارات الأمنية الصادرة في 14 أكتوبر 2026 (CVE-2026-96889، RCE في use cache، DoS في Server Actions). بدون أي تبعيات.
افحص مشروع Next.js مقابل استشارات Next.js الأمنية الصادرة في 14 أكتوبر 2026 بأمر واحد، ودون أي اعتماديات:
sharp (حرجة)use cache التي تُعيد مصفوفات مُنمّطة (typed arrays) (حرجة، Next.js 16)يقرأ الإصدارات المثبّتة فعليًا في node_modules (بتخطيطات npm أو pnpm أو yarn، بما في ذلك النسخ المتداخلة)، وليس النطاقات المذكورة في package.json، ويفحص شيفرتك المصدرية بحثًا عن "use cache" و"use server" وnext/image.
الشرح الكامل: تحديث Next.js الأمني، أكتوبر 2026
يتطلب Node.js 18 أو أحدث. شغّله في جذر المشروع بعد تثبيت الحزم:
curl -O https://raw.githubusercontent.com/AmanSin001/next-security-check/main/next-security-check.mjs
node next-security-check.mjs # current folder
node next-security-check.mjs ./my-app # or a path
echo $? # 0 = nothing to do, 1 = action needed
تثبيت حقيقي لـ Next.js 16.3.0 مع Server Actions وnext/image:
Next.js security check (October 14, 2026 advisories)
next: 16.3.0
sharp: 0.35.3
features: App Router yes, "use cache" no, Server Actions yes, next/image yes
FIX CVE-2026-96889 Image Optimization RCE with SVG (critical)
your app uses next/image. sharp 0.35.3 installed; needs 0.35.5+.
Fix: next 16.4.1, or sharp 0.35.5+ for every copy
FIX GHSA-673q-mjm6-r5xr use cache RCE (critical, Next.js 16)
no "use cache" found; Vercel still says upgrade
Fix: next 16.4.1
FIX GHSA-p3m5-59mp-jv5r Server Actions denial of service (high)
your code has "use server"
Fix: next 16.4.1
ok GHSA-xqc2-xf4c-x3h3 React Server Components packages (critical)
not installed directly (Next.js bundles its own)
Action needed: upgrade, reinstall, rebuild and redeploy.
لا يزال Next.js 15.5.28 يقبل sharp ^0.34.3، ولا يوجد إصدار مُصلَح في سلسلة 0.34. إذا كانت sharp موجودة في package.json الخاص بك أو مثبّتة في ملف القفل (lockfile) لديك، فإن ترقية Next.js تُبقيها كما هي. يرصد الفاحص ذلك ويقترح npm install sharp@^0.35.5.
| السلسلة | الإصدار المُصلَح |
|---|---|
| Next.js 16 | 16.4.1 |
| Next.js 15 | 15.5.28 |
| sharp | 0.35.5 أو أحدث |
| react-server-dom-* | 19.0.9، 19.1.10، 19.2.9، 19.3.1 |
node --test next-security-check.test.mjs
ثماني حالات، تشمل تخطيط .pnpm الخاص بـ pnpm، والروابط الرمزية (symlinks)، وفخّ sharp في 15.x، وتطبيقات Pages Router.
app وsrc وpages وcomponents وlib. لا تُرى الشيفرة المُولَّدة وقت البناء أو الموجودة في حزمة أخرى. عند الشك، قم بالترقية.MIT. هل تحتاج إلى ترقيعها لك؟ CodeWares.