A Docker Compose environment that builds an Ubuntu 18.04 container with Apache, PHP 7.2, and the PEAR Archive_Tar 1.4.10 package. The container is run in privileged mode with port 80 exposed. Two binary files (Archive_Tar-1.4.10.tgz and exploit.zip) are copied into the image. The README references CVE-2020-28948 and links to a proof-of-concept for CVE-2020-28948 and CVE-2020-28949.
The README explicitly names CVE-2020-28948 and links to a proof-of-concept for that CVE and CVE-2020-28949. The Dockerfile installs a specific vulnerable version of Archive_Tar (1.4.10) and copies an exploit.zip into the container, consistent with a vulnerability reproduction or exercise environment.
vulnerable target serviceApache web serverPHP 7.2 runtime
A single service built from the Dockerfile. It runs Apache with PHP 7.2 and the PEAR Archive_Tar 1.4.10 package. The container is started in privileged mode, exposes port 80, and executes a command that restarts Apache then opens an interactive bash shell.
docker-compose.yml:4-12Dockerfile:1-10
CVE assessment
How the supplied evidence relates each vulnerability
The README and docker-compose hostname reference CVE-2020-28948, and the Dockerfile installs Archive_Tar 1.4.10, which is plausibly vulnerable. However, no exploit code or vulnerability details are visible in the supplied text; the exploit.zip is binary and uninspected. The association cannot be confirmed or contradicted from the visible evidence alone.
README.md:1-3docker-compose.yml:5Dockerfile:8-9
Exercise context
Requirements and sequence described by the evidence
Prerequisites
Docker and Docker Compose must be installed to build and run the environment.docker-compose.yml:1-12
The host must allow privileged containers and port 80 binding.docker-compose.yml:8-9
Evidence-described exercise path
Build and start the container using docker-compose, which restarts Apache and opens a bash shell.docker-compose.yml:10-12
The exploit.zip is present in /srv; presumably the user extracts and executes it to demonstrate the vulnerability, but the exact steps are not visible in the supplied text.Dockerfile:9
Safety-review evidence
Behaviors behind the stored safety assessment
Suspicious behavior
The container is run with privileged: true, which grants extensive host access and is a common escape vector. The command opens an interactive bash shell with tty: true, and the exploit.zip binary is uninspected. While these may be intended for the lab exercise, the combination of privileged mode, interactive shell, and an uninspected binary payload raises concrete safety concerns beyond the documented lab target.
docker-compose.yml:8-12Dockerfile:9
Indicators requiring review
The service is run in privileged mode, which gives the container elevated capabilities and potential host escape paths.docker-compose.yml:8
An interactive bash shell is opened with tty: true, providing a persistent interactive session that could be used for unintended host access.docker-compose.yml:10-12
The exploit.zip binary is copied into the container and is uninspected; its behavior is unknown and could include host compromise or external communication.Dockerfile:9
Review boundaries
What the analysis did not establish
exploit.zip is binary and uninspected; its actual behavior is unknown
Archive_Tar-1.4.10.tgz is binary and uninspected; its exact contents are not verified
No exploit code or detailed vulnerability steps are visible in the supplied text
The README references a POC link but the link content is not included in the evidence
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.
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.