CVE-2025-66478 ร้ายแรงใน Next.js: วิธีอัปเดตและป้องกัน RCE ใน React Server Components
Back to articles

CVE-2025-66478 ร้ายแรงใน Next.js: วิธีอัปเดตและป้องกัน RCE ใน React Server Components

รายละเอียดช่องโหว่ CVE-2025-66478 ใน Next.js ด้วย App Router ที่อาจนำ RCE ร้องขอที่ควบคุมได้ พร้อมวิธีอัปเดตเวอร์ชันที่ได้รับการแก้ไขและแนวทางปฏิบัติ

cve Updated: January 22, 2026

CVE-2025-66478 (CVSS 10.0) เป็นช่องโหว่ร้ายแรงใน React Server Components (RSC) ที่ส่งผลกระทบต่อ Next.js App Router ทำให้ผู้โจมตีสามารถรันโค้ดระยะไกล (RCE) ได้ผ่านคำขอที่ควบคุมได้

📋 เวอร์ชันที่ได้รับผลกระทบ

สถานะเวอร์ชัน
❌ VulnerableNext.js 15.x และ 16.x ทั้งหมด
❌ VulnerableNext.js 14.3.0-canary.77 ขึ้นไป

✅ เวอร์ชันที่ปลอดภัย

สถานะเวอร์ชัน
✅ SafeNext.js 13.x
✅ SafeNext.js 14.x stable
✅ SafePages Router
✅ SafeEdge Runtime

🔧 เวอร์ชันที่แก้ไขแล้ว

# Next.js 15.x
npm install [email protected]
npm install [email protected]
npm install [email protected]
npm install [email protected]
npm install [email protected]
npm install [email protected]
# Next.js 16.x
npm install [email protected]
# Canary builds
npm install [email protected]
npm install [email protected]
⚠️ คำเตือน: Vercel บล็อกการ deploy เวอร์ชัน vulnerable แล้ว
ไม่แนะนำ: ใช้ DANGEROUSLY_DEPLOY_VULNERABLE_CVE_2025_66478=1

🚀 วิธีอัปเดตทีละขั้นตอน

1. ตรวจสอบเวอร์ชันปัจจุบัน

npm list next

2. อัปเดตเป็นเวอร์ชันที่แก้ไข

# ตัวอย่างสำหรับ 15.x
npm install [email protected] react@latest react-dom@latest
# Canary -> Stable
npm install next@14

3. ลบ node_modules และติดตั้งใหม่

rm -rf node_modules package-lock.json
npm install

🎯 แนวทางปฏิบัติแนะนำ

  • อัปเดตทันที หากใช้ Next.js 15.x/16.x + App Router

  • ตรวจสอบ CI/CD ให้รัน npm install ก่อน build

  • ใช้ Dependabot ตรวจสอบ vulnerability อัตโนมัติ

D

DriteStudio | ไดรท์สตูดิโอ

Cloud, VPS, Hosting and Colocation provider in Thailand

Operated by Craft Intertech (Thailand) Co., Ltd.

Manage your cookie settings

We use different types of cookies to optimize your experience on our website. Click on the categories below to learn more and customize your preferences. Note that blocking some types of cookies may impact your experience.

Necessary Cookies

These cookies are essential for the website to function properly. They enable basic functions like page navigation and access to secure areas.

View cookies used
  • Session cookies (session management)
  • Security cookies (CSRF protection)
Always On

Functional Cookies

These cookies enable personalized features like language preferences and theme settings. Without these, some features may not work properly.

View cookies used
  • lang (language preference)
  • theme (dark/light mode)

Analytics Cookies

These cookies help us understand how visitors interact with our website by collecting and reporting information anonymously.

View cookies used
  • _ga (Google Analytics)
  • _gid (Google Analytics)

Marketing Cookies

These cookies are used to track visitors across websites to display relevant advertisements based on your interests.

View cookies used
  • Advertising cookies
  • Remarketing pixels

Privacy Policy