/

CVE-2026-56712

Severity:

CRITICAL RISK

(9.3)

Server-Side Request Forgery (CWE-918) in Replicate Cog

CVE-2026-56712

Awaiting Analysis

Vulnerability type

Category:

Server-Side Request Forgery (SSRF)

CWE:

CWE-918

Impact:

Access to internal services and potential exposure of sensitive data or credentials

Severity:

CRITICAL RISK

(9.3)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Replicate Cog can make server-side HTTP requests to attacker-chosen destinations when prediction inputs contain URLs that are not adequately checked. If an attacker can submit inputs to an affected prediction endpoint, this behavior could expose internal services or credentials, including when redirects lead to destinations that were not initially validated.

Affected context

The issue occurs in Cog prediction handling for cog.File and cog.Path inputs that cause the server to fetch a URL. Risk depends on whether an attacker can submit or influence prediction inputs and whether the Cog process can reach sensitive internal network destinations. URL redirects can also matter if the destination is not revalidated at each step.

Exploit preconditions

  • Attack surface: A Cog prediction interface that fetches URLs supplied through cog.File or cog.Path inputs
  • Required access: The ability to submit prediction inputs; whether authentication is required depends on the deployment
  • Trigger point: Cog processes an input URL or follows an HTTP redirect while fetching it
  • Why exploitation is possible: The requested destination is not reliably validated against its resolved host or IP before the request is made, potentially allowing access to internal destinations

Why this happens

The underlying issue is insufficient validation of URLs before server-side fetching. Checking a URL without verifying its resolved destination can allow a hostname to resolve to an internal address, while redirects may change the destination after an initial check. This is a server-side request forgery weakness under CWE-918, where an application makes requests to attacker-influenced locations without adequately restricting their targets.

Potential impact

  • The Cog process may make requests to internal services that are not otherwise exposed
  • Responses may reveal sensitive internal data or credentials
  • Requests could reach administrative or metadata endpoints, depending on network access and controls
  • Internal services may receive unexpected requests or experience unwanted changes if they expose state-changing operations

General mitigation guidance

Defensive patterns focus on limiting destinations and controlling server-side network access:

  • Prefer fixed or explicitly allowlisted destinations over arbitrary user-supplied URLs
  • Validate the resolved IP address as well as the URL hostname, and reject loopback, private, link-local, and otherwise disallowed ranges
  • Reapply destination checks after every redirect, or disable redirects when they are not needed
  • Use network egress controls to limit which services the Cog process can contact
  • Avoid placing credentials in request contexts where untrusted URLs could expose them, and run the process with least privilege
  • Treat prediction inputs as untrusted and apply consistent validation before any network fetch

How teams detect issues like this

  • Review code paths that fetch URLs from prediction inputs, especially handlers for cog.File and cog.Path
  • Use static analysis or code review checks to identify user-controlled URLs passed to HTTP clients without destination validation
  • Check whether redirect handling revalidates each destination and whether resolved IP ranges are restricted
  • Monitor outbound requests for unexpected access to internal, loopback, link-local, or metadata addresses
  • Apply policy checks for workloads that require outbound network access, and use automated review tools to flag risky URL-fetching patterns

Sources

SourceLink
github.comgithub.com/SaiTeja-Erukude/CVE-2026-56712-cog-ssrf
github.comgithub.com/replicate/cog/pull/3225
vulncheck.comvulncheck.com/advisories/replicate-cog-ssrf-via-cog-file-and-cog-path-url-inputs

Frequently asked

questions

It may be exploitable through a prediction interface if an attacker can submit inputs that cause Cog to fetch a URL. The exact exposure depends on how the endpoint is deployed and protected.

The vulnerability description does not establish whether authentication is required. Access to a prediction endpoint that accepts the relevant inputs is the key prerequisite.

Restrict fetches to explicitly permitted destinations, validate resolved IP addresses, and recheck destinations after redirects. Network egress restrictions provide an additional layer of protection.

Treat input URLs as untrusted, avoid arbitrary server-side fetching where possible, validate every destination before connecting, and monitor outbound traffic to internal network ranges.

Find out what's already
exploitable in your codebase.