/

CVE-2026-75856

Severity:

HIGH RISK

(8.6)

SSRF DNS Pinning Bypass (CWE-918) in CodeWhale Server

CVE-2026-75856

Deferred

Vulnerability type

Category:

Server-Side Request Forgery

CWE:

CWE-918

Impact:

Unauthorized access to internal network services

Severity:

HIGH RISK

(8.6)

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

CodeWhale before 0.8.64 contains a server-side request forgery vulnerability in its DNS pinning logic. An attacker who can influence DNS responses may bypass address validation and cause the server to send requests to internal IP addresses.

Affected context

The vulnerability occurs in CodeWhale deployments that use DNS-based destination validation to reduce SSRF risk. It becomes risky when an attacker can influence or control DNS responses and the application performs separate resolution checks and connection attempts without ensuring that both operations use the same validated address.

Exploit preconditions

  • Attack surface: Server-side request functionality that accepts or derives attacker-influenced hostnames
  • Required access: Ability to submit requests or otherwise influence destinations processed by CodeWhale
  • Trigger point: DNS resolution and subsequent outbound connection handling
  • Why exploitation is possible: DNS pinning does not reliably bind the validated resolution to the later request, allowing different responses between the initial check and secondary connection

Why this happens

The underlying bug is a time-of-check-time-of-use condition in DNS-based SSRF protection. The application validates one DNS result but later performs a request based on another resolution, allowing an attacker-controlled DNS response to change the destination after validation. This behavior maps to CWE-918: Server-Side Request Forgery, because attacker-influenced input can cause the server to make requests to unintended internal or restricted network locations.

Potential impact

  • Requests to internal IP addresses may be issued by the server
  • Internal services may be exposed to unauthorized probing or interaction
  • Cloud or infrastructure metadata endpoints could be reachable where network controls permit
  • Sensitive response data could be disclosed
  • Internal network reconnaissance or follow-on attacks could occur

General mitigation guidance

Mitigation generally focuses on making destination validation and connection establishment use one consistent, trusted result.

Common defensive patterns include:

  • Resolve hostnames once and bind the validated address to the outbound connection
  • Revalidate every address used after redirects or connection retries
  • Reject private, loopback, link-local, multicast, and other restricted address ranges by policy
  • Prefer explicit destination allowlists over accepting arbitrary hostnames
  • Apply network egress controls and least-privilege service permissions
  • Reduce trust in attacker-controlled DNS and request destination inputs

How teams detect issues like this

Organizations can assess this risk through:

  • Static analysis searches for separate DNS validation and connection-resolution paths
  • Code review checks for DNS time-of-check-time-of-use patterns
  • Tests using changing DNS answers across sequential lookups
  • Runtime monitoring of outbound requests to private, loopback, link-local, and metadata address ranges
  • Egress policies that alert on or block unexpected internal destinations

Automated security review tools may help identify SSRF sinks and unsafe hostname validation logic.

Sources

SourceLink
github.comgithub.com/Hmbown/CodeWhale/commit/26de44a8bd5051f8f944ea60b2c37ae1d2b7d25e
github.comgithub.com/Hmbown/CodeWhale/security/advisories/GHSA-6v2g-fpxh-pmmh
vulncheck.comvulncheck.com/advisories/codewhale-before-ssrf-bypass-via-dns-pinning-toctou

Frequently asked

questions

It may be remotely exploitable when CodeWhale exposes a server-side request feature that accepts attacker-influenced destinations and the attacker can manipulate or influence DNS responses.

The attacker generally needs access to a relevant request-processing interface and a way to cause DNS resolution to return different results across validation and connection steps.

Bind the validated DNS result to the actual connection, prevent re-resolution between checking and use, and enforce destination allowlists or restricted-address policies.

Combine single-resolution destination handling with strict egress controls, comprehensive SSRF testing, redirect validation, and least-privilege network permissions.

Find out what's already
exploitable in your codebase.