Detect Replicate Cog SSRF via cog-file/cog-path URL inputs (CVE-2026-56712) in Microsoft Sentinel
Detects potential exploitation of CVE-2026-56712, a server-side request forgery (SSRF) vulnerability in Replicate Cog through version 0.23.1 (CWE-918). Cog accepts URL-typed inputs (cog.File and cog.Path) and fetches them server-side without validating the resolved destination host or IP. An attacker who can submit a prediction request can coerce the Cog process into making server-side HTTP(S) requests, including to internal-only services, cloud instance metadata endpoints (e.g. 169.254.169.254), and link-local or loopback addresses. HTTP redirects are followed without revalidation, so an external-looking URL can redirect to an internal destination. This detection surfaces prediction requests whose input URLs resolve to internal, metadata, or loopback destinations and anomalous outbound connections from the Cog server process. A proof-of-concept is public.
Based on VulnCheck Advisory, Replicate Cog SSRF via cog.File and cog.Path URL inputs
MITRE ATT&CK
- Tactic
- Discovery Collection Exfiltration
KQL Detection Query
// df00tech DF00-6270410799 · https://df00tech.com/detections/CVE-2026-56712 · licence: https://df00tech.com/detections/licence
// CVE-2026-56712 — Cog SSRF: outbound connections from Cog process to internal/metadata/loopback targets
let metadataIps = dynamic(["169.254.169.254","169.254.170.2","100.100.100.200","fd00:ec2::254"]);
let privateCidrs = dynamic(["10.0.0.0/8","172.16.0.0/12","192.168.0.0/16","127.0.0.0/8","169.254.0.0/16"]);
DeviceNetworkEvents
| where InitiatingProcessFileName in~ ("python","python3","cog","uvicorn","gunicorn")
| where InitiatingProcessCommandLine has_any ("cog","predict","http.server","cog.server")
| where ActionType == "ConnectionSuccess"
| extend RemoteIPStr = tostring(RemoteIP)
| where RemoteIPStr in (metadataIps)
or ipv4_is_in_any_range(RemoteIPStr, privateCidrs)
| project Timestamp, DeviceName, InitiatingProcessFileName, InitiatingProcessCommandLine, RemoteIPStr, RemotePort, RemoteUrl
| sort by Timestamp desc Flags outbound connections initiated by the Cog server process toward cloud metadata endpoints, loopback, or RFC1918/link-local ranges, the primary SSRF impact of CVE-2026-56712.
Data Sources
Required Tables
False Positives & Tuning
- Legitimate model workloads that fetch inputs from an internal artifact store or object storage on a private IP.
- Health-check or readiness probes from orchestration contacting loopback.
- Internal CI/CD pipelines invoking Cog predictions against staging services on private ranges.
Other platforms for CVE-2026-56712
Testing Methodology
Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are further down this page.
- Test 1 Cog SSRF to cloud metadata endpoint
Expected signal: Outbound connection from the Cog process to 169.254.169.254 in network/proxy logs.
- Test 2 Cog SSRF to internal loopback service
Expected signal: Cog process connection to 127.0.0.1:8080.
- Test 3 Cog SSRF to RFC1918 internal host
Expected signal: Cog process connection to 10.0.0.5:6379.
Response Playbook
Triage
- Identify the prediction request that triggered the outbound connection: correlate the Cog access log entry with the input URL submitted in cog.File/cog.Path parameters.
- Determine the destination contacted, check whether it is a cloud metadata endpoint (169.254.169.254, metadata.google.internal), loopback, or an internal-only service.
- Confirm the running Cog version; versions through 0.23.1 are vulnerable. Check whether PR #3225 (the fix) has been applied.
- Review the response size/status returned to the attacker to assess whether internal data (e.g., IAM credentials) was exfiltrated.
Containment
- Restrict egress from the Cog host via network policy: block access to 169.254.169.254 and non-essential internal ranges from the model-serving process.
- Upgrade Cog to a fixed release (post-0.23.1 / with PR #3225) or apply input URL allow-listing in front of Cog.
- If metadata access is confirmed, rotate any cloud instance credentials/IAM role tokens that may have been exposed.
Evidence Collection
- Preserve Cog server access and prediction logs capturing submitted input URLs.
- Capture host network flow/proxy logs showing outbound destinations and response sizes.
- Snapshot the instance metadata service access logs (if available) to confirm whether credentials were retrieved.
Escalation Criteria
- !Escalate to IR if any connection to a cloud metadata endpoint succeeded from the Cog process.
- !Escalate if evidence shows internal service enumeration or retrieval of sensitive data beyond the model's expected inputs.
Investigation Guide
Forensic Artifacts
- >
Cog prediction/access logs containing attacker-supplied cog.File/cog.Path URLs. - >
Host egress/proxy logs showing connections to internal or metadata endpoints. - >
Cloud metadata service access records.
Tuning Guidance
Baseline the legitimate internal destinations the Cog service fetches inputs from (e.g., known object-storage IPs) and allow-list them. Exclude orchestration loopback health checks. Prioritize alerts where the destination is a cloud metadata IP, as those have no legitimate use from a model-serving process.
Hunting Queries
Hunt for Cog-originated requests targeting metadata/loopback hostnames in URL inputs.
// df00tech DF00-6270410799 · https://df00tech.com/detections/CVE-2026-56712 · licence: https://df00tech.com/detections/licence
DeviceNetworkEvents | where InitiatingProcessCommandLine has "cog" | where RemoteUrl has_any ("169.254.169.254","metadata.google.internal","localhost","127.0.0.1") | project Timestamp, DeviceName, RemoteUrl, RemoteIP ``` df00tech DF00-6270410799 · https://df00tech.com/detections/CVE-2026-56712 · licence: https://df00tech.com/detections/licence ```
index=proxy process=*cog* OR process=*python* | search url="*169.254.169.254*" OR url="*metadata*" OR url="*127.0.0.1*" OR url="*localhost*" | stats count by src, url Atomic Red Team Tests
Submit a prediction request with a cog.Path/cog.File URL input pointing at the cloud metadata service to simulate SSRF.
Command
curl -s -X POST http://localhost:5000/predictions -H 'Content-Type: application/json' -d '{"input":{"image":"http://169.254.169.254/latest/meta-data/iam/security-credentials/"}}' Cleanup
echo 'No persistent artifacts; clear prediction logs if desired' Expected Telemetry
Outbound connection from the Cog process to 169.254.169.254 in network/proxy logs.
Expected Detection
KQL/SPL rules fire on Cog-process egress to 169.254.169.254.
Coerce Cog into requesting a loopback-bound admin/internal service via URL input.
Command
curl -s -X POST http://localhost:5000/predictions -H 'Content-Type: application/json' -d '{"input":{"file":"http://127.0.0.1:8080/admin"}}' Cleanup
echo 'No cleanup required' Expected Telemetry
Cog process connection to 127.0.0.1:8080.
Expected Detection
Loopback destination matched by the SSRF detection rules.
Submit an input URL referencing an internal private-range host to simulate internal network enumeration via SSRF.
Command
curl -s -X POST http://localhost:5000/predictions -H 'Content-Type: application/json' -d '{"input":{"path":"http://10.0.0.5:6379/"}}' Cleanup
echo 'No cleanup required' Expected Telemetry
Cog process connection to 10.0.0.5:6379.
Expected Detection
RFC1918 destination matched by the SSRF detection rules.