CGI Script Environment Variable Disclosure

medium Web App Scanning Plugin ID 115467

Synopsis

CGI Script Environment Variable Disclosure

Description

Web servers are commonly shipped with test and diagnostic CGI scripts, such as 'printenv.pl' or 'test-cgi', which print the environment of the CGI process in the response body. When such a script is left available on a production server, a remote and unauthenticated attacker is able to retrieve the environment variables of the web server, which disclose the document root and the script paths on the file system, the web server software and its version, the internal IP addresses and the email address of the server administrator. The environment may also contain variables set by the application or by the hosting platform, such as database connection strings, API keys or other secrets, allowing an attacker to compromise the application or to conduct further attacks against the underlying infrastructure.

Solution

Remove the detected test CGI script from the web server. If it is required for diagnostic purposes, ensure that it is not publicly available by requiring authentication or by applying IP source filtering.

See Also

https://www.rfc-editor.org/rfc/rfc3875#section-4.1

Plugin Details

Severity: Medium

ID: 115467

Type: Check Based

Published: 9/8/2026

Updated: 9/8/2026

Scan Template: api, basic, full, pci, scan

Risk Information

CVSS v2

Risk Factor: Medium

Base Score: 5

Vector: CVSS2#AV:N/AC:L/Au:N/C:P/I:N/A:N

CVSS Score Source: Tenable

CVSS v3

Risk Factor: Medium

Base Score: 5.3

Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

CVSS Score Source: Tenable

CVSS v4

Risk Factor: Medium

Base Score: 6.9

Vector: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N

CVSS Score Source: Tenable

Reference Information