The guard that wasn’t: an SSRF the coverage check called protected (flyto-core)
An earlier SSRF fix skipped one module, and a credential check was mistaken for an SSRF guard, so an automated gate reported the module as protected while it fetched any URL an attacker chose.
Context: Incomplete fix of CVE-2026-67428 (GHSA-pgwh-4jj4-qm8v)
- Advisory
- GHSA-f9q4-fp8j-r5h7
- Affected
- flyto-core (PyPI) <= 2.28.1, patched in 2.29.0
- Weakness
- CWE-918 · Server-Side Request Forgery
- Reading
- ~5 min · 27 Aug 2026
A project has a security control, and an automated check that counts which modules use it. The check is green. But one of the “guards” on its accepted list answers a different question than the one the gate claims to measure, so a module reads as protected while it is open.
That is how an SSRF survived in flyto-core, a framework for wiring up LLM workflows.
A little theory: SSRF, and why LLM tools are full of it
Server-Side Request Forgery happens when a server makes an HTTP request to an address the attacker chose. The attacker cannot reach your internal network, but your server can, so they make your server ask on their behalf: an internal admin API, a database console on localhost, or the cloud metadata endpoint at 169.254.169.254, which hands short-lived cloud credentials to anything on the instance that asks.
LLM workflow frameworks are a natural home for this bug, because “point this node at your own model endpoint” is a core feature: the user supplies a base_url, and the server POSTs to it. The standard defence is a guard that resolves the URL and refuses internal addresses, plus an automated check that every module making outbound requests calls that guard. This post is about the gap between those two.
The setup
Several flyto-core modules make outbound HTTP to a base_url the workflow author supplies, which is the normal way to point an LLM node at your own OpenAI-compatible endpoint. Because an attacker who controls that URL can aim it at internal services, the project ships a real SSRF guard (validate_url_with_env_config), and the sibling modules llm/chat.py and ai/model.py call it and are tagged ssrf_protected.
An earlier advisory (CVE-2026-67428, fixed in 2.26.7) had addressed SSRF in these modules, and its text said the fix covered “the agent … base_url branch.” I was doing variant analysis on that advisory, so the obvious next step was to open the agent branch in the patched release and check whether the claim held.
It did not. The path was identical in 2.26.7 and in 2.28.1, the latest release at the time.
Three things lined up
The agent module never called the SSRF guard. A full-file grep of llm/agent.py found no validate_url, ssrf, enforce_outbound or guarded_client_session. The agent path built the model client through create_chat_model, which opens a plain aiohttp.ClientSession and POSTs to the caller’s base_url directly.
The one check it did call was the wrong control. The function it invoked exists to stop an environment credential from leaking to an arbitrary host. It is a credential-endpoint check, not an SSRF guard, and its own docstring says the SSRF guard “is the wrong control here.” By its own logic it does nothing at all when the caller supplies their own API key:
def assert_env_credential_endpoint_allowed(base_url, key_from_env):
if not key_from_env:
return # caller-supplied key: no check at all
...So an attacker who supplies any API key sets key_from_env to false, and the only check returns immediately.
That wrong control was also counted as the right one. The project’s coverage gate, the automated “is every outbound module guarded?” check, listed the credential function among accepted SSRF guards. The agent module satisfied the gate automatically, and the gate stayed green while the module fetched unchecked URLs. My report said the credential check was not an SSRF control. The report did not mention the gate; the maintainer’s note on the advisory is what connected the two and confirmed that this was why the gate passed.
Proving it
I ran the installed 2.28.1 code against a local listener. The chain is short: the credential check passes an internal base_url (because an attacker-supplied key disables it), and the model client then POSTs to that internal address. A listener on 127.0.0.1:9300, standing in for 169.254.169.254 or any internal host, received the POST to /v1/chat/completions with the attacker’s key in the Authorization header. Precondition: an authenticated workflow author who sets the provider, an API key, and the base_url, which is the same threat model as the parent CVE.
How to find this kind of thing
- Read what is on the “accepted guards” list. When a project has a security control plus an automated coverage check, open the allowlist and confirm each entry enforces the property the gate claims. A control that answers a different question (here, credential leakage instead of SSRF) being counted as the guard is how a module reads safe while being exploitable.
- Diff per module. List the modules that make outbound requests and, for each, look for the real guard. The one that imports a plain client without it is your lead.
- Take “fixed in X” literally. The parent advisory named the agent branch as fixed. Re-reading that branch in the patched release is what surfaced this incomplete fix.
The fix
2.29.0 makes the agent path call validate_url_with_env_config on a caller-supplied base_url before building the model, mirroring its sibling modules, and llm.agent now returns error_code: 'SSRF_BLOCKED' like they do. The older sub-node config dict reaches the same builder and gets the same check. The release also removes the credential check from the coverage gate’s guard list, so a non-SSRF control can no longer mark a module as protected. Regression tests were added for the inline base_url, the sub-node config, and the error code.
The advisory credits me as reporter. The maintainer note also mentions an independent report of the same parameter (GHSA-pp5w-w9c3-qfv2), credited and fixed by the same change.
Why it matters
An authenticated workflow author could point the agent node at cloud metadata, loopback, or any internal service, and flyto-core would make the request for them: internal access and possible theft of short-lived cloud credentials. The longer-lived lesson is the meta-bug. A coverage metric is only as honest as the definitions behind it, and “green” is not the same as “safe”.
Disclosure timeline
| Date | Event |
|---|---|
| 2026-08-18 | Reported via GitHub private advisory (GHSA-f9q4-fp8j-r5h7) |
| 2026-08-23 | flyto-core 2.29.0 with the fix uploaded to PyPI |
| 2026-08-23 | Advisory published, five days after the report |
| 2026-08-27 | This write-up |
References
- GHSA-f9q4-fp8j-r5h7
- Parent: CVE-2026-67428 (GHSA-pgwh-4jj4-qm8v)
- Independent report of the same parameter: GHSA-pp5w-w9c3-qfv2
Takeaway
A security control is what it enforces, not what a list calls it.
When a dashboard says “guarded”, open the definition of “guard”.