A containerized PHP 7.2 Apache web server that accepts tar file uploads, extracts them using the Archive_Tar library, and lists the extracted contents. It provides both a vulnerable and a patched version of the library to demonstrate CVE-2020-28948 and CVE-2020-28949.
The README explicitly states it is a PoC for CVE-2020-28948 and CVE-2020-28949, and the server code uses a vulnerable Archive_Tar library to process uploaded tar files, which is the target of the described exploits.
The PEAR Archive_Tar library used by the upload handler to extract uploaded tar files. The vulnerable version (Tar.php) lacks the phar:// check in _maliciousFilename, while the patched version (Tar-patched.php) includes it.
Receives uploaded tar files, instantiates Archive_Tar, calls extract() without a path argument, and lists extracted contents. It is the entry point for the exploit.
server/uploads/index.php:1-44
Apache web server (php:7.2-apache)
web serverPHP runtime
The base Docker image providing Apache with PHP 7.2, serving the upload form and handling requests.
server/Dockerfile:1
Dockerfile (vulnerable)
builds vulnerable server image
Builds the cve-server image using the vulnerable Archive_Tar library (Tar.php).
server/Dockerfile:1-10
Dockerfile-patched
builds patched server image
Builds the cve-server-patched image, replacing Tar.php with Tar-patched.php which includes the phar:// check.
server/Dockerfile-patched:1-13
Makefile
build and run automation
Provides make targets to build and start both the vulnerable and patched server containers, mapping port 8080 to container port 80.
server/Makefile:1-11
.htaccess (uploads/.htaccess)
access control
Denies all access to the uploads directory except for index.php, protecting extracted files from direct web access.
server/uploads/.htaccess:1-7
secret.md
target file for demonstration
A sample file in the uploads directory used to demonstrate arbitrary file read after .htaccess deletion.
server/uploads/secret.md:1
CVE assessment
How the supplied evidence relates each vulnerability
The vulnerable Archive_Tar library (Tar.php) does not check for 'phar://' in filenames, allowing a PHAR deserialization attack when a tar file containing a phar:// filename is extracted. The README describes this as arbitrary file deletion, and the patched version adds the missing check.
The vulnerable Archive_Tar library (Tar.php) does not check for 'phar://' in filenames, allowing a PHAR inclusion attack when a tar file containing a phar:// filename is extracted. The README describes this as uploading a shell.php for RCE, and the patched version adds the missing check.
Requirements and sequence described by the evidence
Prerequisites
Docker must be installed to build and run the server images.server/Makefile:1-11
The attacker must craft a malicious tar file containing a phar:// filename to trigger the deserialization or inclusion vulnerability.README.md:19-42
The server must be running the vulnerable image (cve-server) for the exploit to work.README.md:7-9
Evidence-described exercise path
Build and start the vulnerable server using 'make build' and 'make start' in the server directory.README.md:7-9
For CVE-2020-28948: Navigate to the PoC folder, modify $delete_target in create_phar.php, and run 'make create_exploit' to generate exploit.tar.README.md:21-26
Upload exploit.tar via the web form at http://localhost:8080.README.md:27
Observe the file deletion (e.g., .htaccess) and access secret.md at http://localhost:8080/uploads/secret.md.README.md:28-30
For CVE-2020-28949: Navigate to the PoC folder, run 'make create_exploit' to generate exploit.tar.README.md:34-36
Upload exploit.tar and observe shell.php is created; access http://localhost:8080/shell.php?cmd=whoami for RCE.README.md:37-42
Safety-review evidence
Behaviors behind the stored safety assessment
No harmful behavior observed
All visible behavior is confined to the lab's own container. The server extracts uploaded tar files and lists contents, which is the intended vulnerable functionality. The Dockerfiles only expose port 80, install netcat (a common debugging tool), and copy local source code. No evidence of host escape, external connections, persistence, credential theft, or destructive behavior beyond the lab target is present.
The packet does not include the PoC exploit generation scripts (create_phar.php, Makefile for exploits) referenced in the README, so the exact exploit payloads cannot be analyzed.
The netcat installation in the Dockerfiles is not explained; its purpose is unclear but does not appear to be used in the visible server code.
The analysis is limited to static file content; runtime behavior of the tar extraction and potential phar deserialization is not observed.
Model interpretation
This review is limited to the supplied lab evidence packet. It does not assert that the environment runs, reproduces a vulnerability, or is safe to execute. Contract: eip-docker-lab-analysis-v1.