Terrascan v1.18.3 and prior are vulnerable to Server-Side Request Forgery (SSRF) via external URL resolution in uploaded IaC templates when running in server mode. When Terrascan parses uploaded ARM templates or CloudFormation templates, it resolves external URLs referenced within those templates via hashicorp/go-getter with all default detectors enabled, including FileDetector. An unauthenticated remote attacker can upload an ARM template containing a templateLink.uri or parametersLink.uri field, or a CloudFormation template containing an AWS::CloudFormation::Stack TemplateURL field, pointing to an attacker-controlled URL. Terrascan will fetch the attacker-controlled URL server-side. Unlike SSRF via the remote scan endpoint, file:// URLs are directly usable without requiring an X-Terraform-Get redirect, enabling local file read. This affects deployments running terrascan in server mode (terrascan server), which binds to 0.0.0.0 with no authentication. Note: Terrascan was archived in August 2023 and no patch will be released.
When Terrascan runs in server mode, it processes uploaded ARM or CloudFormation templates, resolving external URLs contained in fields such as templateLink.uri, parametersLink.uri (ARM) or TemplateURL (CloudFormation). The hashicorp/go-getter library is used to fetch resources with all default detectors enabled, including FileDetector. An attacker can upload a template pointing to an attacker-controlled URL or directly use the file:// scheme, which — without requiring an X-Terraform-Get redirect — enables reading files from the server's local file system. Since the service requires no authentication, the attack can be conducted by any remote, unauthenticated user with network access to the listening port.
An attacker can force the server to execute requests to arbitrary internal or external resources (SSRF), and thanks to support for the file:// scheme — read any files from the server's file system (e.g., private keys, configuration data, secrets). Compromise of internal system confidentiality (SC:H) and direct leakage of local data constitute a serious security threat to the environment in which Terrascan is running.
The vendor archived the Terrascan project in August 2023 and will not release any patches. It is recommended to immediately stop using Terrascan in server mode in network-accessible environments. If continued use is necessary, restrict network access to the service exclusively to trusted hosts (firewall, ACL lists), implement authentication at the reverse proxy level, and consider migrating to an actively maintained alternative IaC analysis tool.
Tenable Terrascan version 1.18.3 and all earlier versions running in server mode (terrascan server). The issue affects deployments processing ARM or CloudFormation templates with external URL references.
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:H/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:XTenable Terrascan
APPTenable≤ 1.18.3
Related vulnerabilities
SSRF w Tenable Terrascan — odczyt plików lokalnych i kradzież danych uwierzytelniających
Terrascan v1.18.3 and prior are vulnerable to Server-Side Request Forgery (SSRF) via the webhook_url parameter...
SSRF w mod_proxy Apache HTTP Server — przekierowanie żądań przez atakującego
SQL injection w REST API ticketingu — dostęp do danych bazy
Command Injection w endpoint Analysis REST — RCE przez parametry filtrów