鉅銳國際 Debug 原始碼洩漏 - HITCON ZeroDay

Vulnerability Detail Report

Vulnerability Overview

  • ZDID: ZD-2026-01113
  •  發信 Vendor: 鉅銳國際有限公司
  • Title: 鉅銳國際 Debug 原始碼洩漏
  • Introduction: 該站於正式環境開啟 Laravel Debug 模式, 未授權者僅需單一 GET 請求即可取得 Ignition 除錯頁,內含逐行應用程式原始碼、 伺服器絕對路徑、私有 GitLab repo 與 commit hash, 且 APP_KEY 未設定,應用程式無法加密 cookie/session。

處理狀態

目前狀態

公開
Last Update : 2026/10/31
  • 新提交
  • 已審核
  • 已通報
  • 未回報修補狀況
  • 未複測
  • 公開

處理歷程

  • 2026/08/31 00:50:06 : 新提交 (由 MaZon 更新此狀態)
  • 2026/09/04 12:01:21 : 審核完成 (由 HITCON ZeroDay 服務團隊 更新此狀態)
  • 2026/09/14 18:46:11 : 審核完成 (由 HITCON ZeroDay 服務團隊 更新此狀態)
  • 2026/09/14 18:46:11 : 通報未回應 (由 HITCON ZeroDay 服務團隊 更新此狀態)
  • 2026/09/14 18:46:11 : 通報未回應 (由 HITCON ZeroDay 服務團隊 更新此狀態)
  • 2026/10/31 03:00:03 : 公開 (由 HITCON ZeroDay 平台自動更新)

詳細資料

  • ZDID:ZD-2026-01113
  • 通報者:masonzeng (MaZon)
  • 風險:中
  • 類型:資訊洩漏 (Information Leakage)

參考資料

攻擊者可利用洩漏資訊進行下一步攻擊行為。

OWASP 漏洞說明 (Top 10 2017 - A3 Sensitive Data Exposure)
https://www.owasp.org/index.php/Top_10-2017_A3-Sensitive_Data_Exposure

CWE-200 漏洞說明
https://cwe.mitre.org/data/definitions/200.html
(本欄位資訊由系統根據漏洞類別自動產生,做為漏洞參考資料。)

相關網址

https://api.jrbooks.com.tw/sanctum/csrf-cookie
https://api.jrbooks.com.tw/_ignition/health-check

敘述

api.jrbooks.com.tw 為正式對外主機(nginx/1.18.0 + Laravel 10.44.0 + PHP 8.3.3),但設定為 APP_DEBUG=true / APP_ENV=local,且 APP_KEY 未設定。任何未授權者存取/sanctum/csrf-cookie 即觸發 MissingAppKeyException,伺服器回傳完整 Ignition 除錯頁,洩漏應用程式原始碼與大量內部資訊。

未授權取得除錯頁(含原始碼)
指令:

curl -s -o ig.html -w "%{http_code} %{size_download}\n" \
  -H "Cookie: MZPROBE=MARKER_4471" \
  https://api.jrbooks.com.tw/sanctum/csrf-cookie

回應:

500 1079190

自回應中實際擷取之欄位

"exception_class":"Illuminate\Encryption\MissingAppKeyException"
"message":"No application encryption key has been specified."
"framework_version":"10.44.0"
"language_version":"8.3.3-1+ubuntu22.04.1+deb.sury.org+1"
"application_path":"/var/www/tekom"
"app_debug":true   "app_env":"local"   "stage":"local"
"remote":"https://gitlab.com/twice_momo/tekom.git"
"hash":"c8c1dc8171c11ec82f6427afc1cf6e8793f49a58"   "isDirty":true

原始碼外洩:

require_once __DIR__.'/../bootstrap/app.php';
$response = $kernel->handle($request = Request::capture())->send();

請求內容未遮蔽:送出 Cookie: MZPROBE=MARKER_4471,回應內含 "MZPROBE":"MARKER_4471"。

正確設定之正式環境 Laravel 應回傳無堆疊、無原始碼之泛用錯誤頁。此端點改為回傳 1.07 MB 除錯頁並夾帶應用程式原始碼,缺陷成立且連續 3 次請求結果一致,非偶發。

圖片

Ignition 除錯端點可未授權存取

指令與回應:

GET /_ignition/health-check   → 200  {"can_execute_commands":true}
GET /_ignition/update-config  → 405  "The GET method is not supported for route
                                       _ignition/update-config. Supported methods: POST."

405 回應證明 POST /_ignition/update-config(可寫入 Ignition 設定之狀態變更端點)存在且未經認證即可到達。基於非破壞性原則,本次未對該 POST 端點送出任何請求。

圖片

修補建議

於正式環境將 `APP_DEBUG` 設為 `false`、`APP_ENV` 設為 `production`(`.env`),並執行 `php artisan config:cache` 使設定生效。
執行 `php artisan key:generate` 設定 APP_KEY,確保 cookie/session 可正確加密簽章。
於正式環境移除或封鎖 `spatie/laravel-ignition`(`composer remove --dev` 或於路由層阻擋 `/_ignition/*`),特別是 `execute-solution`、`update-config` 等狀態變更端點。

擷圖

留言討論

聯絡組織

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