/

CVE-2026-27818

Severity:

HIGH RISK

(7.5)

SSRF in TerriaJS-Server Proxy Configuration

CVE-2026-27818

Analyzed

Vulnerability type

Category:

Server-Side Request Forgery (SSRF)

CWE:

CWE-20, CWE-918

Impact:

Network pivot via SSRF and unauthorized access to internal HTTP(S) resources

Severity:

HIGH RISK

(7.5)

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 validation flaw in TerriaJS-Server's proxy handling allows attackers to reach domains that are not explicitly listed in the proxyableDomains configuration.

When a vulnerable server is exposed, an attacker can abuse the proxy endpoint to perform Server-Side Request Forgery (SSRF), potentially accessing internal services or sensitive metadata from the server's network environment.

Affected context

This vulnerability affects deployments of TerriaJS-Server (prior to 4.0.3) that expose its HTTP(S) proxy feature to users.

It becomes relevant when:

  • The server is reachable from untrusted clients (e.g., internet-exposed applications), and
  • The proxyableDomains configuration is intended to restrict where the server may proxy requests.

Because of insufficient validation around requested target URLs, the proxy can be coerced into contacting domains and hosts that operators did not intend to allow, including internal or non-public endpoints, depending on network topology.

Exploit preconditions

  • Attack surface: The TerriaJS-Server HTTP endpoint(s) that provide proxy functionality.
  • Required access: Ability to send crafted HTTP requests to the server (usually unauthenticated or with the same level of access as typical end-users).
  • Trigger point: Supplying a URL or domain parameter to the proxy endpoint that appears valid but bypasses the proxyableDomains checks.
  • Why exploitation is possible: The input validation logic around proxy target URLs is incomplete or flawed, allowing certain domain formats, hostnames, or URL constructions to pass checks even when they should be rejected, leading to server-initiated requests to unintended destinations.

Why this happens

The root cause lies in improper input validation (CWE-20) within the logic that decides whether a requested URL is permitted for proxying.

The server intends to enforce an allowlist of proxyableDomains, but the implementation does not correctly normalize, parse, or strictly compare the requested host against this allowlist.

As a result, an attacker can construct URLs that exploit edge cases in URL parsing or hostname comparison to bypass the allowlist and trigger Server-Side Request Forgery (CWE-918), where the server makes HTTP(S) requests to attacker-chosen destinations on the attacker's behalf.

Potential impact

  • The server may access internal HTTP(S) services that are not otherwise exposed to the internet.
  • Attackers could use SSRF to probe internal network topology (open ports, available services, metadata endpoints).
  • Sensitive configuration or metadata available via HTTP (e.g., cloud instance metadata services) could be exfiltrated.
  • Internal administrative panels, monitoring dashboards, or APIs reachable from the server's network could be accessed indirectly.
  • Proxy functionality might be abused for logging evasion, partial anonymization, or as a stepping stone in broader attack chains.

General mitigation guidance

Effective mitigation generally focuses on tightening proxy authorization logic and reducing trust in user-supplied URLs:

  • Apply strict, canonical URL parsing and normalization before validation, including explicit extraction and comparison of scheme, host, and port against a well-defined allowlist.
  • Use exact or pattern-based host comparisons that do not rely on naïve substring checks, and treat edge cases (such as subdomains, dot-prefixed names, alternate encodings, and IPv6 literals) carefully.
  • Restrict proxy functionality to the minimal set of protocols, ports, and hosts that are truly needed, preferring explicit lists over broad patterns.
  • Where feasible, isolate the proxy component in a network segment with limited access to internal services and sensitive metadata endpoints.
  • Apply the principle of least privilege at the network and application layers, ensuring that even if proxy validation fails, the process has limited reach and cannot access critical internal resources.

How teams detect issues like this

Detection typically involves a combination of code-centric and operational approaches:

  • Static analysis & code review: Look for HTTP client code that forwards user-controlled URLs, particularly where domain checks are done with string operations rather than normalized host comparisons or where allowlists are loosely enforced.
  • Configuration review: Audit proxyableDomains and related settings for overly broad patterns (e.g., wildcards, catch-all rules) that could mask validation weaknesses.
  • Dynamic testing: Use automated or manual testing to attempt proxying to clearly disallowed domains (e.g., internal hostnames, 127.0.0.1, metadata services) and confirm they are rejected.
  • Logging & monitoring: Ensure proxy requests are logged with target URLs and response statuses; set up alerts for suspicious targets such as localhost, link-local addresses, or known metadata service endpoints.
  • Security scanning tools: Incorporate SSRF-focused tests into CI/CD pipelines and periodic application security testing, using tools that specialize in finding server-side request issues.

Sources

SourceLink
github.comgithub.com/TerriaJS/terriajs-server/commit/3aaa5d9717162b245ae4569232bbe7d8673c913f
github.comgithub.com/TerriaJS/terriajs-server/security/advisories/GHSA-w789-49fc-v8hr

Frequently asked

questions

Yes, if the TerriaJS-Server proxy endpoint is reachable from the internet or other untrusted networks, an attacker can remotely attempt to abuse the proxy to access unintended domains.

In many configurations, exploitation requires no more access than a normal user has to the application's proxy feature. If the proxy is exposed without strong authentication or additional controls, an unauthenticated attacker may be able to exploit it.

The safest pattern is to implement strict, canonical URL parsing and enforce a robust allowlist where the final resolved host and port are compared against explicit, minimal proxyableDomains. Additionally, limit protocols, block localhost and internal address ranges where not needed, and avoid relying on fragile string-based domain checks.

Future prevention typically combines design and process: treat all user-supplied URLs as untrusted, design proxy components with explicit allowlists and strong normalization, isolate proxy services from sensitive networks, and add SSRF-focused tests and code review checks to development and CI processes.

Find out what's already
exploitable in your codebase.