/

CVE-2026-47356

Severity:

HIGH RISK

(7.5)

SSRF in Terrascan Server File Scan Webhook

CVE-2026-47356

Analyzed

Vulnerability type

Category:

Server-Side Request Forgery (SSRF)

CWE:

CWE-918

Impact:

Unauthorized outbound requests and potential data exfiltration via SSRF

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

Terrascan server mode exposes a Server-Side Request Forgery (SSRF) issue in the file scan endpoint's webhook_url parameter, allowing attackers to direct outbound HTTP requests to arbitrary URLs.

An unauthenticated remote attacker can cause Terrascan to POST full scan results, including a bearer token, to attacker-controlled or internal network endpoints, and the retry logic can amplify the impact of misdirected requests.

Affected context

This vulnerability exists when Terrascan is deployed in server mode (terrascan server), which by default binds to 0.0.0.0 and exposes HTTP APIs without authentication.

The affected endpoint is the file scan API:

  • POST /v1/{iac}/{iacVersion}/{cloud}/local/file/scan

In this mode, clients upload files for scanning and may optionally provide:

  • webhook_url: a URL to which Terrascan will POST scan results
  • webhook_token: a token that Terrascan adds as a Bearer token in the Authorization header

The vulnerability manifests when the server unconditionally trusts the webhook_url provided by the client and uses it as an HTTP target without restriction.

Exploit preconditions

  • Attack surface: Publicly exposed Terrascan server HTTP API.
  • Required access: None; the endpoint is unauthenticated, so any remote client who can reach the server can issue requests.
  • Trigger point: Sending a POST request to /v1/{iac}/{iacVersion}/{cloud}/local/file/scan with:
  • A file to scan, and
  • A controlled webhook_url in the multipart form data.
  • Why exploitation is possible: The server:
  • Accepts arbitrary user-supplied URLs as webhook_url without validation, filtering, or allowlisting.
  • Uses a retrying HTTP client that will attempt to POST up to 10 times on failure, amplifying any unwanted outbound interactions.
  • Forwards the attacker-supplied webhook_token as a Bearer token in the Authorization header, effectively letting the attacker define the credential used in the outbound request.

Why this happens

The core issue is unvalidated, user-controlled URL usage in server-side HTTP requests, aligning with CWE-918: Server-Side Request Forgery (SSRF).

The Terrascan server trusts the webhook_url parameter from the request and uses it directly as the destination for an HTTP POST containing scan results, without:

  • Restricting the scheme or host, or
  • Enforcing network boundary policies (e.g., blocking access to internal metadata endpoints or internal services).

This pattern turns the server into an HTTP proxy that attackers can steer toward arbitrary destinations. The automatic retry behavior further intensifies the effect of each malicious webhook_url.

Potential impact

  • Exfiltration of Terrascan scan results to attacker-controlled endpoints.
  • Use of the server as an SSRF pivot to reach internal HTTP services that are not otherwise exposed externally.
  • Interaction with cloud provider metadata services or management APIs if reachable from the Terrascan host, potentially accessing sensitive instance data or temporary credentials.
  • Increased load and noisy traffic against internal or external targets due to up to 10 automatic retry attempts.
  • Abuse of the bearer token mechanism to simulate authorized requests against targets that treat the header as a credential.

General mitigation guidance

Because the project is archived and will not receive patches, mitigation should focus on deployment hardening and reducing trust in user-controlled URLs:

  • Restrict network exposure: Avoid binding Terrascan server directly to the public internet. Limit access using firewalls, reverse proxies, or API gateways, and require authentication and authorization before allowing file scan requests.
  • Network egress controls: Apply outbound firewall rules or cloud egress policies so the Terrascan host can only reach approved domains or IP ranges. Deny access to internal metadata endpoints and sensitive internal services where possible.
  • Application-layer controls: At the deployment wrapper or proxy layer, enforce URL validation/allowlisting on webhook_url parameters, permitting only trusted domains or preconfigured callback endpoints.
  • Token handling hygiene: Treat webhook_token as untrusted; avoid reusing it for any sensitive APIs and consider stripping or overriding it at an upstream gateway.
  • Operational alternatives: Where possible, avoid using remote webhooks for scan results; instead, retrieve results from Terrascan directly over a controlled, authenticated channel.

How teams detect issues like this

Detection can focus on both configuration and runtime behavior:

  • Configuration and code review:
  • Flag any services that accept user-controlled callback URLs and subsequently perform server-side HTTP requests without validation.
  • Look for HTTP client usage that directly consumes request parameters as URLs, especially in webhook or callback features.
  • Static analysis and policy enforcement:
  • Use static analysis rules to detect flows from HTTP request parameters to HTTP client destinations without sanitization or allowlisting.
  • Enforce infrastructure-as-code policies that prevent exposing Terrascan server directly to the internet or without authentication.
  • Network and runtime monitoring:
  • Inspect outbound HTTP traffic from Terrascan hosts for unusual destinations or spikes in retrying requests.
  • Configure IDS/IPS or egress proxies to alert when internal-only endpoints (e.g., metadata services, admin APIs) are accessed from the Terrascan environment.
  • Correlate file scan API calls with subsequent unexpected outbound requests to detect active SSRF attempts.

Sources

SourceLink
github.comgithub.com/tenable/terrascan

Frequently asked

questions

Yes, if Terrascan server is reachable from the internet and left with its default unauthenticated configuration, remote attackers can trigger SSRF by calling the file scan endpoint with a crafted webhook_url.

No application-level credentials are required. The affected endpoint is unauthenticated; the only prerequisite is network reachability to the Terrascan server.

The most robust pattern is to avoid accepting arbitrary user-supplied URLs as callback destinations. Instead, use predefined, allowlisted endpoints or map user choices to a controlled set of known-safe URLs. Where arbitrary URLs are unavoidable, enforce strict validation and network egress restrictions to prevent access to internal or sensitive addresses.

Apply a combination of controls:

  • Do not directly use user-controlled input as an HTTP target.
  • Implement URL allowlisting and scheme/host validation for all webhook and callback features.
  • Enforce network-level egress restrictions from application servers.
  • Incorporate SSRF checks into code reviews, static analysis, and security design reviews, especially for components that make outbound HTTP calls on behalf of users.
Find out what's already
exploitable in your codebase.