CVE-2026-118515 CVSS 8.4 — HIGH php เผยแพร่: 2026-11-06

ช่องโหว่ Arbitrary File Upload — CVE-2026-118515 (CVSS 8.4)

⚠️ ระดับสูง (CVSS 8.4) — ควรแก้ไขภายใน 48-72 ชั่วโมง ช่องโหว่นี้อาจนำไปสู่ RCE ได้โดยตรง

📋 สรุปช่องโหว่

ช่องโหว่ อนุญาตให้ผู้โจมตีอัพโหลดไฟล์อันตรายขึ้นเซิร์ฟเวอร์ได้โดยไม่ผ่านการตรวจสอบประเภทไฟล์อย่างเหมาะสม มี CVSS Score 8.4 ระดับ "สูง"

ช่องโหว่ File Upload เป็นอันตรายมากเพราะหากผู้โจมตีสามารถอัพโหลดไฟล์ PHP shell ได้ก็เท่ากับได้รับ RCE บนเซิร์ฟเวอร์โดยสมบูรณ์

💥 ผลกระทบที่อาจเกิดขึ้น

ผลกระทบจากช่องโหว่ File Upload:

• Web Shell: อัพโหลด PHP shell เพื่อรันคำสั่งบนเซิร์ฟเวอร์
• Malware Distribution: ใช้เซิร์ฟเวอร์เป็นแหล่งแจกจ่าย malware
• Server Takeover: ควบคุมเซิร์ฟเวอร์สมบูรณ์ผ่าน web shell
• Ransomware: ติดตั้งและรัน ransomware บนระบบ
• ขโมยข้อมูล: เข้าถึงไฟล์ทั้งหมดบนเซิร์ฟเวอร์รวมถึง credentials

🖥️ ซอฟต์แวร์และระบบที่ได้รับผลกระทบ

ตรวจสอบจาก https://nvd.nist.gov/vuln/detail/CVE-2026-118515

🔧 แนวทางการแก้ไขและป้องกัน

  • ขั้นตอนแก้ไข:
  • 1. อัพเดตทันที: ติดตั้ง patch เวอร์ชันใหม่ที่แก้ไขแล้ว
  • 2. ตรวจสอบไฟล์ที่อัพโหลด: ค้นหาไฟล์ .php .phtml .php5 ในโฟลเดอร์ uploads
  • 3. ลบ Web Shell: ลบไฟล์ PHP ที่น่าสงสัยทั้งหมดออกจาก upload directory
  • 4. ตั้งค่า Web Server: ป้องกันไม่ให้รัน PHP ในโฟลเดอร์ uploads
  • 5. Scan ด้วย Antivirus: ใช้ Malwarebytes หรือ Wordfence scan หาไฟล์อันตราย
  • 6. ตรวจสอบ Logs: ดู log หา POST request ที่น่าสงสัยไปยัง upload endpoints

📄 รายละเอียดต้นฉบับ (ภาษาอังกฤษ)

The Symfony Serializer component DataUriNormalizer handles only the exact types SplFileInfo, SplFileObject, and File, so for a property typed with a subclass such as UploadedFile, ObjectNormalizer instantiates the object through its constructor from attacker-controlled data, including the file path. This allows an arbitrary file on the server to be treated as an uploaded file in Symfony versions prior to 5.4.56, 6.x prior to 6.4.50, 7.x prior to 7.4.23, and 8.x prior to 8.1.11. A request body such as {"image": {"path": "/path/to/project/.env.local", "originalName": "a.png", "test": true}} makes the application handle any file on the server as an upload, without the file being sent. With test: true, UploadedFile::isValid() skips is_uploaded_file() and move() falls back to rename(). Assert\File does not prevent this because it validates the file at the attacker-chosen path, which exists on the server. Any code that deserializes untrusted data into a type that holds such a property is affected. That includes #[MapRequestPayload] on a DTO with an UploadedFile property, which is how uploads are mapped in Symfony 8.1; a single unauthenticated request with a JSON or form body is enough. Depending on what the application does with the upload, this can expose any file readable by PHP (for instance, when uploads are stored and served back), move any such file when move() is called, and reveal whether a path exists. A serializer built without DataUriNormalizer ahead of the object normalizer is not protected by the fix; the serializer configured by FrameworkBundle is.

🔗 แหล่งอ้างอิง