Skip to content

Test CGI Script - Detect

ID: cgi-printenv

Severity: medium

Author: emadshanab

Tags: exposure,cgi

Test CGI script was detected. Response page returned by this CGI script exposes a list of server environment variables.

id: cgi-printenv
info:
name: Test CGI Script - Detect
author: emadshanab
severity: medium
description: Test CGI script was detected. Response page returned by this CGI script exposes a list of server environment variables.
reference:
- https://www.acunetix.com/vulnerabilities/web/test-cgi-script-leaking-environment-variables/
classification:
cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
cvss-score: 5.3
cwe-id: CWE-200
metadata:
max-request: 1
tags: exposure,cgi
http:
- method: GET
path:
- "{{BaseURL}}/cgi-bin/printenv.pl"
matchers-condition: and
matchers:
- type: word
words:
- 'MYSQL_HOME'
- 'OPENSSL_CONF'
- 'REMOTE_ADDR'
- 'SERVER_ADMIN'
- 'Environment Variables:'
condition: or
- type: status
status:
- 200
# digest: 4a0a0047304502205295e17ace9ba5f8ac63b09c5442769c9083d5f06af656e84037a1fc142ccc65022100d7756264dea2e3c5b6afc09657b51357cad287b2ebebe285fb30d69eb6782392:922c64590222798bb761d5b6d8e72950

This template is used to detect vulnerabilities in web applications. It can be used with the Nuclei tool to scan for specific patterns or behaviors.

Terminal window
$ nuclei -u "URL" -t "http/exposures/configs/cgi-printenv.yaml"

View on Github