flyto-coreに、DNS再バインディングでSSRF対策を回避される脆弱性
Summary
flyto-coreのSSRF対策で、URLの名前解決結果を検査したあとに、接続時に改めて名前解決が行われるため、攻撃者が内部ネットワークのアドレスへ接続させられるおそれがあります。影響するのはPyPI版flyto-coreの2.26.8より前のバージョンで、2.26.8で修正されています。攻撃には攻撃者がDNSを操作する条件が必要で、CVSSは7.1です。2.26.8以降へ更新してください。
AI summary
Produced by SecPulse using an external AI model; it may contain mistakes. Check the original description and references below before acting on it.
flyto-coreのSSRF対策で、URLの名前解決結果を検査したあとに、接続時に改めて名前解決が行われるため、攻撃者が内部ネットワークのアドレスへ接続させられるおそれがあります。影響するのはPyPI版flyto-coreの2.26.8より前のバージョンで、2.26.8で修正されています。攻撃には攻撃者がDNSを操作する条件が必要で、CVSSは7.1です。2.26.8以降へ更新してください。
Affected packages
| Package | Affected → Fixed | |
|---|---|---|
| flytohubflyto-core | — | Not listed |
| PyPIflyto-core |
< 2.26.8→ 2.26.8 |
2.26.8 |
| pipflyto-core |
< 2.26.8→ 2.26.8 |
2.26.8 |
Original description The description as published by the source.
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…
Source: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory
References
- advisory github.com
- advisory nvd.nist.gov
- package github.com
- web github.com
- web github.com
- web github.com
- web github.com