ช่องโหว่ SQL Injection — CVE-2026-115934 (CVSS 9.8)
📋 สรุปช่องโหว่
ช่องโหว่ SQL Injection ถูกค้นพบโดยมี CVSS Score 9.8 ระดับ "วิกฤต" ซึ่งถือว่าอันตรายมากและต้องได้รับการแก้ไขอย่างเร่งด่วน
SQL Injection เกิดจากการที่ระบบนำข้อมูลจากผู้ใช้มาประกอบ SQL query โดยตรงโดยไม่ผ่านการ sanitize ผู้โจมตีสามารถแทรก SQL statement อันตรายเพื่อเข้าถึงหรือแก้ไขข้อมูลในฐานข้อมูลได้
ความรุนแรงของช่องโหว่นี้อยู่ที่ความง่ายในการโจมตีและความเสียหายที่สามารถเกิดขึ้นได้ในวงกว้าง ตั้งแต่การขโมยข้อมูลผู้ใช้ทั้งหมด ไปจนถึงการควบคุมเซิร์ฟเวอร์
💥 ผลกระทบที่อาจเกิดขึ้น
ผลกระทบที่อาจเกิดขึ้นจากช่องโหว่นี้:
• ขโมยข้อมูล Users/Passwords: ดึง username email และ password hash ของผู้ใช้ทั้งหมดออกจากฐานข้อมูล
• Bypass Authentication: ข้ามการตรวจสอบรหัสผ่านและเข้าสู่ระบบในฐานะ admin โดยไม่รู้รหัสผ่าน
• แก้ไข/ลบข้อมูล: เปลี่ยนแปลงหรือทำลายข้อมูลในฐานข้อมูลทั้งหมด
• อ่านไฟล์ระบบ: ในบางกรณีอาจใช้ SQL อ่านไฟล์บนเซิร์ฟเวอร์ได้
• Remote Code Execution: หากมีสิทธิ์ FILE อาจเขียน PHP shell ลงในเว็บเซิร์ฟเวอร์
• ขโมยข้อมูลธุรกิจ: ดึงข้อมูลลูกค้า ข้อมูลบัตรเครดิต หรือข้อมูลความลับทางธุรกิจ
🖥️ ซอฟต์แวร์และระบบที่ได้รับผลกระทบ
ตรวจสอบรายละเอียดจาก https://nvd.nist.gov/vuln/detail/CVE-2026-115934
🔧 แนวทางการแก้ไขและป้องกัน
- ขั้นตอนแก้ไขเร่งด่วน:
- 1. อัพเดตทันที: อัพเดตซอฟต์แวร์เป็นเวอร์ชันล่าสุดที่แก้ไขช่องโหว่แล้ว
- 2. ตรวจสอบ Logs ย้อนหลัง: ค้นหาคำว่า UNION SELECT, OR 1=1, -- ใน access log เพื่อดูว่าถูกโจมตีไปแล้วหรือไม่
- 3. เปลี่ยนรหัสผ่านทั้งหมด: เปลี่ยน DB password, admin password, และ secret keys ทันที
- 4. ตรวจสอบ User Accounts: ดูว่ามี account ที่ไม่รู้จักหรือ permission ที่ผิดปกติ
- 5. ติดตั้ง WAF: ใช้ Cloudflare WAF, ModSecurity หรือ Wordfence เพื่อ block SQL injection attempts
- 6. Backup ฐานข้อมูล: สำรองข้อมูลก่อนดำเนินการแก้ไขใดๆ
- 7. แจ้งผู้ใช้: หากมีข้อมูลผู้ใช้รั่วไหล ควรแจ้งให้ผู้ใช้เปลี่ยนรหัสผ่านทันที
📄 รายละเอียดต้นฉบับ (ภาษาอังกฤษ)
An unauthenticated SQL injection can occur on the front end of any site that uses craft.search to perform a search, allowing stacked query execution and enabling escalation to an administrator. Note that this only affects MySQL/MariaDB. Impact * SQL injection — The attribute parameter is concatenated into the query unsanitized, and because PDO runs with emulated prepares, stacked statements execute. This gives unauthenticated read and write access to the application database. * Privilege escalation to administrator — The write primitive was used to set the admin flag on user ID 1 in the users table, confirmed by reading the value back. Craft short-circuits its permission checks on this single column, so no further changes were needed. The same primitive can overwrite any account’s password hash. Update to the patched versions (4.18.9 and 5.11.2) to get the fix. If you cannot update immediately, you can block front-end requests with %5Battribute%5D and [attribute] anywhere in the query string as a temporary mitigation.