v0.75.2: endpoint URLs can no longer name a private address
This is a security patch with one change in it, written entirely by the maintainer and reported by an outside contributor. Like v0.75.1, it is a backport rather than a cut of the development branch: its tree is the v0.75.1 tag plus eight commits, and everything merged since v0.75.0 is left for the next minor release. Upstream gave it no codename.
It fixes advisory GHSA-9f49-hqpf-c849, rated medium (CVSS 4.1, server-side request forgery), affecting 0.3.0 through 0.75.1. It was reported by @abdugafforov-bobur, with a clear reproduction.
After this release: v0.76.0. Every refusal described on this page is still there. v0.76.0 changed the checks around them: the refusal message now ends with a remedy (
address the server by its hostname), four items this page listed as open (#1547, #1548, #1549, #1550) shipped, and one new limitation was disclosed (#1819: the response from an endpoint you choose is not size-capped). The section What v0.76.0 changed in the same checks has the detail. The rest of this page describes v0.75.2 and is annotated where v0.76.0 differs.
After v0.76.x: v0.77.0. Every refusal on this page is still there. v0.77.0 closes the limitation v0.76.0 disclosed (#1819, closed by #1929): replies to Soup's judge client are capped at 1 MiB, and HTTP generation replies to
soup data generate's providers and Magpie at 8 MiB.training.grpo_judge, new in v0.77.0 for GRPO'sjudge_rankreward, is checked whensoup.yamlloads with the same judge URL rule: plainhttponly to loopback, and no private, link-local or reserved IP literal. See v0.77.0: what v0.76 warned about is now refused.
Re-run this
Nothing. Unlike the release before it, no finished run, adapter, checkpoint or verdict is affected, and no credential needs rotating because of this advisory: the half that sent OPENAI_API_KEY to a judge host was v0.75.1's. What can go wrong on upgrade is a command that now refuses, loudly, as described below.
What was wrong
Several outbound endpoint checks refused plain http:// to a non-loopback host but accepted any https:// URL, including one whose host was a private, link-local, unique-local, shared (RFC 6598) or otherwise non-public IP address, in any spelling: abbreviated, decimal, hex or octal IPv4, IPv4-mapped IPv6, or digits and label separators that an HTTP client folds to ASCII before it connects. A configuration file that set a judge URL could therefore make the machine that ran it send a chat-completions POST to an internal HTTPS service addressed by IP. TLS verification was unchanged, so the service had to present a certificate for that address that the machine trusted, and its response was not shown to whoever wrote the file.
What refuses now
All of these now refuse a private, link-local or reserved IP address on https as well as http, through one shared helper:
| Where the URL comes from | Setting |
|---|---|
soup data generate | --api-base (providers openai and server) |
| The vLLM provider and the commands that build on it | --provider vllm |
soup eval judge and every judge the CLI builds | --api-base, soup data best-of-n --judge |
| Eval-gate suites | judge_model |
soup ship | --judge-model, eval.ship.judge_model |
| Online DPO | training.online_dpo_judge, now also checked when soup.yaml loads, not only when the trainer starts |
| The Web UI chat proxy | the endpoint you type |
Loopback still works. http://0.0.0.0 is no longer treated as local by soup data generate --api-base and the chat proxy; use localhost or 127.0.0.1. The shared predicate also now counts 100.64.0.0/10 (shared address space, which includes Tailscale) and fec0::/10 as non-public, for webhooks, the OTLP endpoint, telemetry, hub endpoints over plain HTTP and soup ingest --pull, where --allow-private-host admits them. An address written with non-ASCII digits or label separators is classified as the address it folds to.
If your config names a private IP address
It fails, with an error naming the setting. Loopback and public addresses are not affected. Examples, verbatim as v0.76.0 prints them (v0.75.2 printed the same text without the final ; address the server by its hostname):
soup data generate:Generation error: api_base: private/link-local/reserved IP hosts are not allowed (SSRF protection); address the server by its hostname(exit 1)soup eval judge:judge URL: private/link-local/reserved IP hosts are not allowed (SSRF protection); address the server by its hostname(exit 1)soup ship:Error: --judge-model: private/link-local/reserved IP hosts are not allowed (SSRF protection); address the server by its hostname(exit 3, and now before either model loads)training.online_dpo_judge:training -> online_dpo_judge: Value error, online_dpo_judge: private/link-local/reserved IP hosts are not allowed (SSRF protection); address the server by its hostname, printed under aConfig validation error:heading (exit 1 fromsoup train;soup doctor --configexits 2 for the same config). (Since v0.77.0 the terminal prints the same message without theValue error,prefix.)- Web UI chat: HTTP 400,
endpoint: private/link-local/reserved IP hosts are not allowed (SSRF protection); address the server by its hostname
The soup eval judge, soup ship and online_dpo_judge lines were run on the v0.76.0 CLI. The soup data generate and Web UI chat lines are read from the code (commands/generate.py and ui/app.py pass the label api_base and endpoint to the same helper), because the environment used for this page had neither httpx nor fastapi installed.
Address the server by its hostname instead. That works over HTTPS with a certificate valid for that name. Plain http is accepted only for loopback in these settings, as before, except that two of them used to count http://0.0.0.0 as local and no longer do. There is no opt-in for an IP address in a private range; the one flag of this kind, --allow-private-host, belongs to soup ingest --pull. Since v0.76.0 the refusal names that remedy itself: the message ends address the server by its hostname (#1549). Through v0.75.2 it named none.
What v0.76.0 changed in the same checks
- One loopback set.
localhost,127.0.0.1and::1is the only list the judge-URL checks use (eval-gatejudge_model,soup ship --judge-model, the online-DPO judge, the judge API-base and vLLM checks), sohttp://[::1]:<port>is now accepted by eval-gatejudge_model,soup ship --judge-modeland the online-DPO judge as well as by the judge and vLLM checks (#1548, #1554). On the v0.76.0 CLI,soup ship --judge-model "http://[::1]:8000/v1"gets past the check and on to loading the models.http://0.0.0.0is still not loopback;soup data generate --api-baseand the Web UI chat proxy now answer0.0.0.0 is ambiguous; use 127.0.0.1 or localhost, the wordingHF_ENDPOINT, hub endpoints and webhook URLs already used. - One IPv4 reader on every platform. Abbreviated, decimal, hex and octal spellings are parsed by a pure-Python port of the BSD
inet_aton, so a spelling that passed on Windows because its C library refused it (0xffffffff,4294967295) is refused everywhere (#1550, #1562). An IPv6 address that carries an IPv4 address (IPv4-mapped, 6to4, NAT64, Teredo) is judged by the inner address as well as the outer one, whatever the Python interpreter's address tables say. - A host written only as numbers is an IPv4 address or it is refused.
4294967296,10.0.0.256,10.0x.0.1,08.0.0.1and a five-part spelling are neither addresses nor hostnames; they are refused withan all-numeric host that is not a valid IPv4 address is not allowed (SSRF protection); use a valid IPv4 address or a hostname(#1650). A host that is a single space is refused on every platform. - The outbound call sites have a test ratchet. A test walks
src/soup_cliand checks every outbound HTTP call against a declared ledger of known gates, in addition to shape-based checks (#1547, #1646). It runs in CI, not when you run a command, so it protects the next change, not your run. The same change moved the electricityMap endpoint check (soup train --track-energy) onto the shared helper, so it now refuses abbreviated IPv4 forms such as10.1and100.64.0.0/10, and accepts loopback addresses such ashttps://127.0.0.2/. - Judge errors no longer print credentials embedded in the URL. The judge's
JudgeUnavailableErrortext strips userinfo, query and fragment from the base URL.https://user:pass@hostis still accepted as a judge URL; only the error text changed.
The classification below was checked by calling the v0.76.0 helper directly: 10.0.0.1, 169.254.169.254, 100.64.0.1, fec0::1, ::ffff:10.0.0.1, 2002:0a00:0001::1, 64:ff9b::a00:1, 0xffffffff, 4294967295 and 0377.0377.0377.0377 are refused with the private-address message; 127.1, 2130706433, ::ffff:127.0.0.1, [::1], localhost, 93.184.216.34 and 2606:4700:4700::1111 are accepted.
What did not change, and what was still open at v0.75.2
- Hostnames are not resolved. A hostname that resolves to a private address is still accepted. This narrows what a URL can name directly; it does not make internal services unreachable by name.
HF_ENDPOINTand the hub endpoint variables refuse any non-loopback host over plain HTTP, and do not check the address over HTTPS. They are read from your own environment, so anhttpsendpoint naming a private address is accepted there, and the v0.75.2 refusal does not change that.- The checks are found by their shape, so a new outbound call could skip them. Upstream tracks a ratchet over every outbound call site as #1547. (Since closed in v0.76.0: the ratchet shipped as a CI test over a ledger of outbound calls, see above. It does not make the checks a run-time guard.)
- Loopback spellings differ between settings.
http://[::1]passes the judge and vLLM checks, and not eval-gate suites,soup shipor the online-DPO trainer (#1548). (Since closed in v0.76.0 for the judge-URL checks: they share one loopback set. The Ollama provider's check still keeps its own list of the same three hosts.) - IP-address parsing depends on the platform's
inet_atonand, for 6to4, NAT64 and Teredo forms, on the Python interpreter's address tables (#1550). (Since closed in v0.76.0: one parser, and the IPv6 transition forms are unwrapped by hand.)
Still true at v0.76.0, and new to this page:
- Hostnames are still not resolved, by design.
net_guardchecks IP literals only (recorded upstream in #599, closed), so a name that resolves to a private address passes. Do not read this page as "no SSRF" or "all outbound HTTP is guarded". - The response from an endpoint you choose is not size-capped (#1819, open). (Since closed in v0.77.0, #1929: replies to Soup's judge client are capped at 1 MiB, and replies to
soup data generate's providers and Magpie at 8 MiB, counted after decoding, and an oversized reply is refused before it is parsed.) The judge and data-generation calls (soup eval judge,soup data generateand the vLLM, Ollama and Anthropic providers) read the whole response body before parsing it, and the endpoint is whatever thesoup.yaml, suite or flag says. Do not run asoup.yamlor eval-gate suite you do not trust. The Langfuse pull ofsoup ingest --pullis different: it stops reading a response at 64 MiB while the body is still arriving. - v0.76.0 is not a security release. It publishes no new advisory. The fixes for GHSA-63h4-gvp4-r26g (0.75.1) and GHSA-9f49-hqpf-c849 (0.75.2) are both carried in it, and upstream's supported line for security fixes is now 0.76.x (since v0.77.0, 0.77.x, with 0.76.x on security fixes only until 0.78.0; since v0.78.0, 0.78.x, with 0.77.x on security fixes until v0.79.0 is released and none for 0.76.x after v0.78.0), so a 0.75.x install has no patched release to wait for: upgrade with
pip install -U soup-cli. The same holds at v0.77.2:SECURITY.mdis unchanged,utils/net_guard.pyis byte-identical to v0.77.1, and the release body says only that it "includes security hardening fixes; details follow through the project's advisory process", with no advisory published at the tag. At v0.78.0utils/net_guard.pyis still byte-identical to v0.77.2; that release carries 3 Security entries and, in its release body's words, "No advisory is published with it" (v0.78.0).
Until you upgrade, upstream's advice is not to run an untrusted soup.yaml, eval-gate suite or .can package that sets judge_model, online_dpo_judge or eval.ship.judge_model, and to keep soup ui bound to loopback with its token private.
Also fixed
soup shipchecks--judge-modelbefore it builds the base and tuned models. It used to load both and only then stop with a usage error.- The Web UI chat proxy answers 400, not 500, for an endpoint URL that does not parse.
What was measured, and what was not
Nothing was measured, and there is no gate record. Every item is a hardening or correctness change with its own tests. The preprint is unchanged. Test files go from 500 to 501.
See also
- v0.75.1: an adapter with nothing in it, and eight hardening fixes: the release before this one, and the other advisory.
- Eval-Gated Training: the judge URL allowlist.
- soup ship:
--judge-model. - Web UI: the chat endpoint.
- v0.77.0: what v0.76 warned about is now refused: the release that closed #1819 and added
training.grpo_judge. - What's new across v0.71 to v0.78.
Soup is free and Apache-2.0. If it saved you a training run, starring the repo costs nothing and helps most. You can also fund the GPU time behind the work a 4 GB laptop cannot reach.