Dockerfile
Uses maven:3.8.1-amazoncorretto-8 as the base image, copies the entire build context into /tmp, runs 'mvn package' to build the application, and sets the default command to execute the resulting JAR.
Dockerfile:1-6A Server-Side Forgery Request can be activated unmarshalling with XStream to access data streams from an arbitrary URL referencing a resource in an intranet or the local host
CVE-2021-21349 has a selected CVSS score of 6.1 (medium); EIP currently links 1 repository PoC and 1 lab environment.
XStream is a Java library to serialize objects to XML and back again. In XStream before version 1.4.16, there is a vulnerability which may allow a remote attacker to request data from internal resources that are not publicly available only by manipulating the processed input stream. No user is affected, who followed the recommendation to setup XStream's security framework with a whitelist limited to the minimal required types. If you rely on XStream's default blacklist of the Security Framework, you will have to use at least version 1.4.16.
| Product | Source | Version range | Status |
|---|---|---|---|
xstreamBrowse x-stream / xstream | CVE List | < 1.4.16 | affected |
com.thoughtworks.xstream:xstreamBrowse Maven / com.thoughtworks.xstream:xstream | GitHub Advisory | Before 1.4.16 · Fixed in 1.4.16 | affected |
A single-container Java environment that builds and runs an XStream 1.4.15 application designed to demonstrate CVE-2021-21349, a Server-Side Request Forgery (SSRF) vulnerability.
Dockerfile:1-6pom.xml:1-44README.md:1-74The README explicitly describes CVE-2021-21349, provides a proof-of-concept (PoC) execution, and includes a vulnerable XStream version (1.4.15) in pom.xml. The Java source code contains a hardcoded XML payload that triggers an SSRF to http://host.docker.internal:8080/internal.txt, matching the vulnerability description.
README.md:1-74pom.xml:12-15src/main/java/main.java:1-56Uses maven:3.8.1-amazoncorretto-8 as the base image, copies the entire build context into /tmp, runs 'mvn package' to build the application, and sets the default command to execute the resulting JAR.
Dockerfile:1-6Maven project file that includes com.thoughtworks.xstream:xstream:1.4.15 as a dependency and uses the maven-shade-plugin to create an executable JAR with main class 'main'.
pom.xml:1-44Java source code that creates an XStream instance and calls fromXML() with a crafted XML string. The payload uses a gadget chain to make an HTTP request to http://host.docker.internal:8080/internal.txt, demonstrating the SSRF.
src/main/java/main.java:1-56A simple text file containing 'internal file' that is served by a Python HTTP server on the host and requested by the exploit payload.
internal.txt:1Explains CVE-2021-21349, shows a demo GIF, and gives step-by-step instructions to build the Docker image, run a Python HTTP server, and execute the container to trigger the SSRF.
README.md:1-74Supported by supplied evidence
The lab uses XStream 1.4.15 (pom.xml line 14), which is within the affected version range. The Java code (main.java) demonstrates unmarshalling a crafted XML that causes a server-side request to an arbitrary URL (http://host.docker.internal:8080/internal.txt), matching the CVE description of an SSRF via XStream unmarshalling.
pom.xml:12-15src/main/java/main.java:1-56README.md:1-10README.md:25-27README.md:29-31src/main/java/main.java:27README.md:25-27README.md:29-31README.md:33-35The visible behavior is limited to building and running a Java application that makes a single HTTP GET request to a user-controlled host service (http://host.docker.internal:8080/internal.txt). This is the intended demonstration of the SSRF vulnerability. There is no evidence of host escape, persistence, credential theft, data destruction, or connections to external systems beyond the documented lab target.
src/main/java/main.java:1-56README.md:1-74Dockerfile:1-6This 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.