ช่องโหว่ PHP Object Injection ใน WordPress Plugin "PDF Invoice for WooCommerce + Drag and Drop Template Builder" — CVE-2026-109220 (CVSS 9.8)
📋 สรุปช่องโหว่
ช่องโหว่ PHP Object Injection ถูกค้นพบในWordPress Plugin "PDF Invoice for WooCommerce + Drag and Drop Template Builder" โดยมี CVSS Score สูงถึง 9.8 ระดับ "วิกฤต"
ช่องโหว่นี้เกิดจากการที่ PHP ใช้ฟังก์ชัน unserialize() กับข้อมูลที่ผู้ใช้ควบคุมได้โดยไม่ผ่านการตรวจสอบ ผู้โจมตีสามารถสร้าง serialized object อันตรายและส่งผ่านพารามิเตอร์ที่เปิดช่องให้โจมตีได้ เมื่อ PHP ทำการ unserialize วัตถุนั้น จะมีการเรียก magic methods เช่น __wakeup() หรือ __destruct() ที่อาจถูก chain เพื่อรัน PHP code ใดๆ ก็ได้
ผู้โจมตีไม่จำเป็นต้องล็อกอิน สามารถส่ง payload อันตรายผ่าน parameter ที่ระบุในช่องโหว่ และอาจได้รับ Remote Code Execution (RCE) ซึ่งเป็นผลกระทบที่ร้ายแรงที่สุด
💥 ผลกระทบที่อาจเกิดขึ้น
PHP Object Injection มีความร้ายแรงสูงมาก ผลกระทบที่เป็นไปได้:
• Remote Code Execution (RCE): หาก POP chain ที่เหมาะสมมีอยู่ใน codebase ผู้โจมตีสามารถรันคำสั่งใดๆ บนเซิร์ฟเวอร์
• ลบ/แก้ไขไฟล์: ผ่าน magic method สามารถ write หรือ delete ไฟล์ใดๆ บนระบบ
• SQL Injection ขั้นสอง: inject SQL ผ่าน object property ที่ถูกนำไป query
• ขโมย Credentials: อ่านไฟล์ config ที่มี database password, secret keys
• Server Takeover สมบูรณ์: ในกรณีที่มี POP chain ที่สมบูรณ์
• Bypass Authentication: ใช้ object injection เพื่อเปลี่ยนค่า session หรือ permission
🖥️ ซอฟต์แวร์และระบบที่ได้รับผลกระทบ
WordPress Plugin: PDF Invoice for WooCommerce + Drag and Drop Template Builder
ตรวจสอบเวอร์ชันที่ได้รับผลกระทบที่ https://nvd.nist.gov/vuln/detail/CVE-2026-109220
วิธีตรวจสอบ:
1. เปิด WordPress Dashboard > Plugins
2. ค้นหาและดูเวอร์ชันของ "PDF Invoice for WooCommerce + Drag and Drop Template Builder"
3. เปรียบเทียบกับเวอร์ชันที่ได้รับผลกระทบจาก NVD
🔧 แนวทางการแก้ไขและป้องกัน
- ขั้นตอนแก้ไขเร่งด่วน:
- 1. อัพเดตทันที: อัพเดต WordPress Plugin "PDF Invoice for WooCommerce + Drag and Drop Template Builder"เป็นเวอร์ชันล่าสุดที่แก้ไขแล้ว
- 2. ปิด Plugin ชั่วคราว: หากยังไม่มี patch ให้ปิดใช้งานเพื่อป้องกัน
- 3. ตรวจสอบ Logs: ค้นหา request ที่มี serialized PHP object (O: หรือ a:) ใน access log
- 4. WAF Rule: เพิ่ม rule block serialized PHP payload
- 5. ตรวจสอบ Web Shell: ค้นหาไฟล์ .php ที่ถูกสร้างใหม่ใน upload directories
- 6. เปลี่ยน Secret Keys: เปลี่ยน WordPress secret keys ใน wp-config.php
- 7. เปลี่ยน DB Password: อัพเดต database password
- 8. Scan ด้วย Security Plugin: ใช้ Wordfence หรือ Sucuri scan
📄 รายละเอียดต้นฉบับ (ภาษาอังกฤษ)
The PDF Invoice for WooCommerce + Drag and Drop Template Builder plugin for WordPress is vulnerable to PHP Object Injection in all versions up to, and including, 7.1.1 via the 'customer_note' parameter parameter. This is due to insufficient sanitization of the customer_note checkout field, which is inlined verbatim into invoice HTML, entity-decoded back into a live tag by simplehtmldom, reassembled into raw bytes by mPDF, and passed to unserialize() in _getObjAttr without validation. This makes it possible for unauthenticated attackers to execute code on the server. An unauthenticated attacker can trigger the vulnerable code path on a default install by placing an anonymous WooCommerce checkout via the public Store API (POST /wc/store/v1/checkout) using a Direct Bank Transfer or cheque payment method, which automatically transitions the order to 'on-hold' status and fires the plugin's invoice-generation hook.