
CVE-2021-21980
This repository contains a high-confidence Nuclei template to detect CVE-2021-21980 (vSphere Web Client path traversal) and a small mock environment that reproduces the vulnerable behavior for safe local testing.
Files:
cve-2021-21980.yaml: Nuclei template with multiple encoding variants and matchersapp.py: A small Flask app simulating /eam/vib path traversal vulnerabilityDockerfile: Container image for the mock server with a self-signed TLS certdocker-compose.yml: Runs the mock server listening on host 8443requirements.txt: Python dependenciescd C:\Users\gui\Documents\hi
docker-compose up --build -d
The mock server will listen on https://localhost:8443 (self-signed TLS certificate).
curl -k "https://localhost:8443/" # should return VMware vSphere Web Client (mock)
curl -k "https://localhost:8443/eam/vib?id=../../../../../../../../../../etc/passwd"
You should receive the content of the mock /app/sensitive/passwd-mock file.
nuclei -t cve-2021-21980.yaml -u https://localhost:8443 -insecure
If you want to test many encoding variants, set the Nuclei template to run with high verbosity.
Run run_local_test.ps1 which builds, waits for readiness and executes the curl checks, plus Nuclei if available.
powershell -ExecutionPolicy Bypass -File .\run_local_test.ps1
Install Nuclei on Windows (quick):
iwr -useb get.scoop.sh | iex
scoop install coreutils
scoop install nuclei
Invoke-WebRequest -Uri https://github.com/projectdiscovery/nuclei/releases/latest/download/nuclei_windows_amd64.zip -OutFile nuclei.zip
Expand-Archive -Path nuclei.zip -DestinationPath .\nuclei
Add-Content -Path $PROFILE -Value 'set PATH=$Env:PATH;$(Resolve-Path .\nuclei)'
If nuclei is not in PATH the will execute up to the curl tests only.
If you get issue building docker image ensure Docker Desktop is installed and the 'Use the WSL 2 based engine' is enabled.
/etc/passwd or similar file will be returned if the server is vulnerable.
Security: Always have explicit authorization before scanning or exploiting systems.
run_local_test.ps1