/

CVE-2026-56676

Severity:

HIGH RISK

(7.4)

TOCTOU SSRF (CWE-367, CWE-918) in 9Router LLM Proxy

CVE-2026-56676

Deferred

Vulnerability type

Category:

Server-Side Request Forgery (SSRF)

CWE:

CWE-367, CWE-918

Impact:

Unauthorized Access to Internal Services

Severity:

HIGH RISK

(7.4)

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

A race-condition-based server-side request forgery (SSRF) in 9Router allows bypassing initial image URL validation due to separate DNS resolutions for the same URL.

An authenticated user of the LLM proxy can exploit DNS rebinding with a vision-capable model to coerce the server into making HTTP requests to internal-only services.

Affected context

This vulnerability occurs in 9Router deployments where:

  • The LLM proxy feature is enabled and accepts user-supplied image URLs
  • A vision-capable model is used that triggers server-side image fetching
  • DNS-based validation is performed separately from the actual HTTP fetch
  • Internal HTTP services are reachable from the 9Router server network

The issue is specifically present in versions prior to 0.5.2.

Exploit preconditions

  • Attack surface: LLM proxy endpoint that processes user-provided image URLs
  • Required access: Authenticated access to the LLM proxy with ability to submit arbitrary image URLs
  • Trigger point: Server-side image fetch in open-sse/translator/concerns/image.js after an initial host validation step
  • Why exploitation is possible: The host is validated using one DNS resolution, but the actual fetch performs a separate DNS resolution; an attacker-controlled domain can rebind between these steps, causing the server to connect to internal addresses despite passing the initial check.

Why this happens

The root cause is a time-of-check, time-of-use (TOCTOU) inconsistency in DNS-based URL validation that underpins an SSRF condition.

The application first resolves the image host to validate that it points to an allowed, presumably public, IP address.

Later, during the actual image fetch, it performs a separate DNS resolution, trusting the hostname again instead of the previously validated address.

This aligns with CWE-367 (Time-of-check Time-of-use) combined with CWE-918 (Server-Side Request Forgery), where relying on mutable DNS information between validation and use allows attackers controlling DNS to redirect server-side requests to internal network targets.

Potential impact

  • Access to internal-only HTTP services that are not exposed publicly
  • Enumeration of internal network endpoints and metadata services
  • Potential interaction with internal admin panels, APIs, or debugging endpoints
  • Use of the 9Router server as a pivot point for further network reconnaissance

General mitigation guidance

Mitigations generally focus on making URL validation and use consistent, and minimizing trust in DNS resolution for access control.

Common patterns include:

  • Binding the actual HTTP request to the exact IP address that was validated at check time, rather than re-resolving the hostname
  • Implementing strict network egress controls so application components cannot directly reach internal or metadata endpoints from HTTP clients
  • Enforcing allowlists of destinations or IP ranges that server-side HTTP clients may contact
  • Treating all user-specified URLs as untrusted and avoiding reliance on DNS alone for determining whether a target is safe
  • Running server-side HTTP fetch logic with minimized network privileges and restricted routing visibility to sensitive internal services

How teams detect issues like this

Detection typically involves a combination of code-level and behavior-level analysis:

  • Static analysis rules that flag patterns where host/IP validation is separated from the actual connection step, especially with repeated DNS lookups
  • Code reviews focusing on URL validation logic, ensuring the same resolved address is used for both validation and subsequent connections
  • Security tests that simulate DNS rebinding scenarios to see whether validated URLs can be redirected to internal addresses
  • Network monitoring and logging that identifies unusual outbound HTTP requests from the application to private IP ranges or internal hostnames

Automated security review tools can help highlight network client code paths that perform separate validation and connection resolutions.

Sources

SourceLink
github.comgithub.com/decolua/9router/commit/c7d07448c58bec1200741de0b73305b860416b82
github.comgithub.com/decolua/9router/releases/tag/v0.5.2
github.comgithub.com/decolua/9router/security/advisories/GHSA-cmhj-wh2f-9cgx

Frequently asked

questions

It is exploitable by any user who can authenticate to the LLM proxy and submit image URLs, even if they do not have direct network access to internal services; the attack leverages the server's network position instead.

The attacker needs authenticated access to the LLM proxy functionality that allows specifying arbitrary image URLs and uses a vision-capable model which triggers server-side image fetching.

The most robust fix pattern is to couple validation and use: validate the resolved address once and ensure the same address is used for the outgoing connection, combined with strict egress controls and explicit allowlists for destinations reachable by server-side HTTP clients.

Future prevention involves treating DNS and hostnames as untrusted inputs, designing network access controls that do not rely solely on DNS checks, using consistent validation-and-use flows for outbound connections, and incorporating SSRF and TOCTOU checks into regular code reviews and security testing.

Find out what's already
exploitable in your codebase.