How SafeLinks and GoogleOther Triggered Phantom Stripe Checkouts
Forensic analysis of 68 external checkout hits on December 1, 2026 and the FastAPI guard that stopped phantom sessions.
Root Cause: Side-Effecting GET Endpoints Meet Link Detonation
Many lean SaaS checkout links point emails and landing buttons at a convenience endpoint such as GET /comprar?plan=... that calls Stripe and returns HTTP 303.
That violates HTTP safety semantics. Enterprise email security gateways detonate every URL inside inbound B2B emails before a human ever opens the message.
Worse, Microsoft Defender SafeLinks gateways (48.209.x, 72.145.x, 172.186.x, 135.232.x) spoof modern Windows Chrome User-Agents, bypassing User-Agent bot filters completely.
The GoogleOther Blind Spot at 18:39:18
Deploying Azure SafeLinks CIDR prefixes at 11:47 cut 48.209.x and 72.145.x redirects from 9 to 0, while blocking 100% of GPTBot and ClaudeBot requests.
At 18:39:18, however, 66.249.66.39 fetched GET /comprar?plan=agencia_pod as GoogleOther. Because that string omits bot, crawler, and spider, it opened a phantom $1,497 Stripe session.
| Traffic Class / Prefix | Total Hits | HTTP 303 | Guarded 200 |
|---|---|---|---|
| Azure SafeLinks (48.209.x, 72.145.x, etc.) | 41 | 18 | 23 |
| AI & Search Crawlers (GPTBot, ClaudeBot, Bing) | 10 | 0 | 10 |
| GoogleOther (66.249.66.39 at 18:39:18) | 1 | 1 | 0* |
| Legacy AWS Email Scanners (MSIE 8.0) | 2 | 2 | 0 |
| Other External / Corporate Gateways | 14 | 11 | 3 |
Production FastAPI Guard Pattern (Zero-Side-Effect Interstitial)
Never mint a Stripe Checkout Session directly on an unverified GET. Intercept scanners, crawlers, prefetch headers, and HEAD probes by serving a lightweight HTTP 200 confirmation page with noindex, nofollow and a POST submit form. Note also that across our hubs on December 1, GoogleOther issued 80 total requests including 3 JavaScript-driven POST calls, so both CIDR and UA matching remain essential.
import re, time
from fastapi import FastAPI, Request
from fastapi.responses import HTMLResponse, RedirectResponse
SCANNER_UA_RE = re.compile(
r"(?:safelinks|mimecast|proofpoint|barracuda|outlook|defender|"
r"bot\b|crawler|spider|curl|wget|httpx/|urllib|headlesschrome|"
r"googleother|google-inspectiontool|adsbot|bingpreview|"
r"bytespider|petalbot|semrush|ahrefs)",
re.I,
)
SCANNER_IP_PREFIXES = (
# Microsoft Defender SafeLinks / Azure ATP ranges
"48.209.", "72.145.", "72.152.", "72.153.", "74.179.", "172.186.",
"40.94.", "40.107.", "52.100.", "104.47.", "20.190.", "135.232.",
# Google crawlers (Googlebot / GoogleOther / AdsBot)
"66.249.", "64.233.", "74.125.",
# Meta link preview gateways
"57.141.", "69.171.", "173.252.", "157.240.",
)
def checkout_guard_reason(request: Request, recent_ip_hits: dict[str, float]) -> str | None:
if request.method == "HEAD":
return "head_request"
xff = (request.headers.get("x-forwarded-for") or "").split(",", 1)[0].strip()
client_ip = xff or (request.client.host if request.client else "")
if request.method != "POST" and client_ip.startswith(SCANNER_IP_PREFIXES):
return "scanner_ip"
if request.method == "POST":
return None
for hdr in ("sec-purpose", "purpose", "x-purpose", "x-moz"):
if any(t in (request.headers.get(hdr) or "").lower() for t in ("prefetch", "preview", "prerender")):
return "prefetch_header"
ua = (request.headers.get("user-agent") or "").strip()
if not ua or ua.lower() in ("mozilla/5.0", "mozilla/4.0") or SCANNER_UA_RE.search(ua):
return "scanner_ua"
last = recent_ip_hits.get(client_ip)
if last is not None and (time.monotonic() - last) < 15.0:
return "burst_prefetch_ip"
return NoneWhy IP Lists Drift and the Permanent RFC 9110 Fix
During Phase 2, an adjacent Azure gateway (72.152.84.79, one /16 block next to our blocked 72.153. range) triggered 2 redirects before the 15-second burst window caught its follow-up hits. That proved IP blocklists are a useful defense-in-depth layer, not a standalone wall.
The permanent architectural rule is simple: treat GET /checkout as strictly read-only. Always render a fast HTML plan confirmation card containing a single <form method="POST" action="/checkout"> button (plus optional short-lived HMAC nonce). Email detonation engines, prefetchers, and search crawlers never complete a real user-initiated form POST, eliminating 100% of phantom Stripe sessions while preserving single-click UX.
Forensic Prefix Table Before vs After 11:47 Deploy
| Azure / Google Prefix | Pre-11:47 303s | Post-11:47 303s | Post-11:47 Blocked 200s |
|---|---|---|---|
48.209.x.x | 3 | 0 | 3 |
72.145.x.x | 6 | 0 | 4 |
172.186.x.x | 3 | 0 | 0 |
135.232.x.x | 3 | 0 | 0 |
74.179.x.x | 1 | 0 | 0 |
66.249.66.39 (GoogleOther) | 0 | 1 (18:39) | Blocked after 19:37 |
Inspect Your Live Revenue Operations Stack
Explore our 14 zero-signup technical diagnostics or test AdPulse Guard for paid-social creative fatigue and CPA decay telemetry.