Summary
src/mockloop_mcp/parser.py → load_api_specification fetches arbitrary http(s) URLs via requests.get(spec_source) when the source is a URL string.
Impact
If untrusted input can reach spec_source, this is a classic SSRF-class surface (internal HTTP, link-local/metadata depending on deployment network).
Suggested fix direction
- Allowlist hosts or require explicit user confirmation for remote specs
- Block private/link-local/metadata CIDRs after DNS resolution
- Cap redirects and response size
I can draft a small hardening patch if welcome.
— pureace (@pureacech)
Summary
src/mockloop_mcp/parser.py→load_api_specificationfetches arbitraryhttp(s)URLs viarequests.get(spec_source)when the source is a URL string.Impact
If untrusted input can reach
spec_source, this is a classic SSRF-class surface (internal HTTP, link-local/metadata depending on deployment network).Suggested fix direction
I can draft a small hardening patch if welcome.
— pureace (@pureacech)