flyto-coreに、DNS再バインディングでSSRF対策を回避される脆弱性
概要
flyto-coreのSSRF対策で、URLの名前解決結果を検査したあとに、接続時に改めて名前解決が行われるため、攻撃者が内部ネットワークのアドレスへ接続させられるおそれがあります。影響するのはPyPI版flyto-coreの2.26.8より前のバージョンで、2.26.8で修正されています。攻撃には攻撃者がDNSを操作する条件が必要で、CVSSは7.1です。2.26.8以降へ更新してください。
AI要約
SecPulse が外部の生成 AI を使って作った要約です。誤りを含むことがあります。重要な判断の前に、下の原文と参照URLを確認してください。
flyto-coreのSSRF対策で、URLの名前解決結果を検査したあとに、接続時に改めて名前解決が行われるため、攻撃者が内部ネットワークのアドレスへ接続させられるおそれがあります。影響するのはPyPI版flyto-coreの2.26.8より前のバージョンで、2.26.8で修正されています。攻撃には攻撃者がDNSを操作する条件が必要で、CVSSは7.1です。2.26.8以降へ更新してください。
影響パッケージ
| パッケージ | 影響を受ける版 → 修正版 | |
|---|---|---|
| flytohubflyto-core | — | 記載なし |
| PyPIflyto-core |
2.26.8 未満→ 2.26.8 |
2.26.8 |
| pipflyto-core |
2.26.8 未満→ 2.26.8 |
2.26.8 |
原文の説明 取得元が公開している説明をそのまま載せています (多くは英語)。
Summary
validate_url_ssrf resolves the hostname, checks the IP against private ranges, then discards the IP and returns the hostname URL string. aiohttp performs a fresh, independent DNS resolution at connect time. An attacker controlling DNS for a hostname (TTL 0, alternating public IP and internal IP) passes validation on the first lookup and connects to the internal IP on the second — a classic check-then-use race. SECURITY_SSRF.md line 63 explicitly claims DNS-rebinding is prevented; it is not.
Root Cause
src/core/utils.py:523 returns the hostname URL after validation; the resolved IP is never pinned. A repo grep of http/ and utils.py for TCPConnector / resolver / response.history / on_request_redirect / IP-pinning returns NONE. Each module builds a fresh ClientSession per call → the connect-time getaddrinfo is independent of the validation-time lookup.
Impact
Defeats the SSRF guard on ALL modules that call it (readable internal fetch). Independent of IP-range completeness — the private IP is never presented to is_private_ip. Requires attacker DNS control + winning the resolution race → AC:H.
Proof of Concept
Code-proven: validate_url_ssrf returns the hostname (utils.py:523); no pinned-IP connector anywhere. Two independent resolutions occur (validation-time and aiohttp connect-time).
attacker DNS: rebind.attacker.tld TTL 0, alternating public IP and the cloud metadata IP
execute_module http.get {"url":"http://rebind.attacker…
出典: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory
参照URL
- advisory github.com
- advisory nvd.nist.gov
- package github.com
- web github.com
- web github.com
- web github.com
- web github.com