{"id":"XE-16760","kind":"bounty","visibility":"public","source":"github","source_repo":"xeprotocol/xe","source_ref":"659","source_url":"https://github.com/xeprotocol/xe/issues/659","reporter_id":2920,"title":"[Low] downloadImage has no timeout and no checksum verification","area":"node-api","claimed_tier":null,"assessed_tier":null,"verdict":"duplicate","duplicate_of":null,"tracked":false,"internal_ref":"","internal_url":"","status":"closed","closed_reason":"duplicate","github_state":"open","disclosed_at":null,"award_xe":null,"award_approved":false,"paid_ref":"","created_at":"2026-11-17T05:47:03.782616+00:00","updated_at":"2026-11-22T23:26:16.292161+00:00","source_created_at":"2026-11-17T05:46:34+00:00","told_at":"2026-11-22T23:26:16.327796+00:00","status_changed_at":"2026-11-22T23:26:16.303998+00:00","url":"https://bounty.xe.network/XE-16760","body":"## Summary\n`downloadImage` (`vm/lima_manager.go:376-395`, shared by both Lima and QEMU managers) uses `http.Get` with the default client (no timeout) and writes the bytes straight to the image path with no hash verification. It is called from `NewLimaManager`/`NewQEMUManager` when the cloud image is missing.\n\n## Root Cause\n- No timeout: `http.Get(url)` uses `http.DefaultClient` (no timeout configured). A stalled or very slow image server hangs provider node startup indefinitely.\n- No integrity check: the downloaded bytes are written to the image path (`os.Rename(tempPath, destPath)`) with no SHA-256 or other hash verification. HTTPS covers passive attackers; the gap is supply-chain (CDN compromise, DNS hijack with valid TLS).\n\n## Impact\n(a) A stalled download hangs provider node startup indefinitely. (b) A compromised or misdirected download is used as the guest OS base image without any integrity check.\n\n## Verification\nSource-level at HEAD `8cc209d` (testnet-0006).\n\n## Suggested fix\nUse an `http.Client` with a timeout, and pin + verify the SHA-256 of the Ubuntu cloud image before use.","patch_refs":[],"thread":[{"id":18864,"source":"desk","source_ref":"reply:16541","author":"Joseph Denne","team":true,"body":"Thanks. This is the same finding as an earlier report that is not public, which was filed first; the programme pays the\nfirst verifiable submission, so this one closes as a duplicate. If you believe it is a different\nbug, file a new report that links https://bounty.xe.network/XE-16760 and says what differs; it is read like any other.","created_at":"2026-11-22T23:26:16.292161+00:00"}]}