phantomcheck
- Type
- Repo
- Scanned
- Nov 24, 2026
- Version
- b884224aab50
- Files read
- 22
PhantomCheck is a browser-based reconnaissance web app that checks domains, email addresses, and IP addresses against public security APIs and uses Claude AI to summarize the findings. Its biggest risk is cross-site scripting from unescaped scan data and URL parameters, which lets an attacker-controlled target or link run JavaScript in the user's browser and steal all API keys saved in localStorage.
What it can reach
- Browser
- Stores user-supplied API keys, cached scan results, daily scan counts, and UI preferences in browser localStorage, and writes report text or share links to the clipboard.
- Secrets
- Reads user-provided API keys for Anthropic Claude, VirusTotal, Shodan, HaveIBeenPwned, SecurityTrails, GitHub, and Google Safe Browsing from localStorage and sends them to those services.
- Network
- Makes direct browser HTTPS requests to Anthropic Claude and public OSINT APIs (crt.sh, urlscan.io, AbuseIPDB, Google DNS, RDAP, Wayback Machine, IPinfo, VirusTotal, Shodan, HaveIBeenPwned, SecurityTrails, GitHub, and Google Safe Browsing), loads Google Fonts, and submits waitlist emails to Web3Forms.
Findings
-
CriticalUnescaped OSINT scan results allow script injection and theft of saved API keys
Phantom stack/assets/js/ui.js:107
When rendering raw source cards, renderCardBody() serializes external API data with JSON.stringify() and inserts it directly into card.innerHTML inside a <pre> tag without HTML-escaping, and renderApiCards() similarly inserts result.summary and result.error unescaped. Because browsers still parse HTML tags inside <pre>, scanning a domain whose DNS TXT record, WHOIS registrant field, or GitHub metadata contains an HTML payload such as <img src=x onerror=...> executes attacker JavaScript in the app origin and exposes every API key stored in localStorage (Claude, GitHub, Shodan, VirusTotal, HaveIBeenPwned, SecurityTrails, and Google Safe Browsing).
Fix: Pass JSON.stringify(result.raw, null, 2), result.summary, result.source, and result.error through sanitise() before inserting into innerHTML, or build the DOM nodes using textContent.
-
HighURL query parameter automatically triggers unvalidated scans on page load
Phantom stack/assets/js/app.js:26
If a user has previously accepted the terms checkbox (pc_terms in localStorage), opening app.html with a ?t= parameter automatically runs a full scan after 400ms without confirmation. Any website or shared link can navigate the user's browser to app.html?t=... to spend their paid third-party API quotas, bypass validateInput() (which normally blocks .gov/.mil targets and private IPs) and checkRateLimit(), and pass HTML tags accepted by the permissive email regex (/^[^\s@]+@[^\s@]+\.[^\s@]+$/) into unescaped innerHTML sinks in renderCardBody() and exportPdf().
Fix: Only populate the search input from the ?t= URL parameter instead of calling runScan() automatically, tighten isEmail() to reject HTML characters (<, >, quotes), escape target in exportPdf(), and always enforce validateInput() and checkRateLimit().
-
HighPrompt injection in scan data can inject HTML via unescaped AI source field
Phantom stack/assets/js/ui.js:151
In ai.js, runAI() sends raw external scan data to Claude without untrusted-data boundaries in AI_PROMPTS, and renderAIOutput() in ui.js inserts each AI-generated finding's f.source directly into innerHTML without calling sanitise() across Explorer, Analyst, and Operator modes. A scanned target's owner can place prompt-injection instructions in public records (such as DNS TXT or WHOIS data) to make Claude falsify the risk verdict or emit HTML/JavaScript inside findings[].source, running script in the browser and reading saved API keys from localStorage.
Fix: Wrap f.source with sanitise() in all three branches of renderAIOutput(), restrict source links to known API names, and add explicit untrusted-data handling instructions to AI_PROMPTS in ai.js.
-
LowWaitlist form sends emails to Web3Forms despite privacy policy claiming local-only storage
Phantom stack/waitlist.html:181
The Privacy Policy linked directly below the waitlist form states under Section 5 that waitlist email addresses are stored only in browser localStorage and are never transmitted to any server. In reality, waitlist.html (which index.html redirects to by default) POSTs submitted email addresses to api.web3forms.com using a hardcoded access_key, which also causes self-hosted deployments to send visitor signups to the upstream author's Web3Forms account unless modified.
Fix: Update pages/privacy.html to accurately disclose Web3Forms transmission, and make the Web3Forms access_key configurable (defaulting to disabled for self-hosted deployments).
