Maven build container
Uses the maven:3.8.1-amazoncorretto-8 image to copy the source tree, run 'mvn package', and produce a shaded JAR. The build process is defined in the Dockerfile and configured by pom.xml.
Dockerfile:1-5pom.xml:1-44XStream can cause a Denial of Service
CVE-2021-21341 has a selected CVSS score of 7.5 (high); EIP currently links 2 repository PoCs and 2 lab environments.
XStream is a Java library to serialize objects to XML and back again. In XStream before version 1.4.16, there is vulnerability which may allow a remote attacker to allocate 100% CPU time on the target system depending on CPU type or parallel execution of such a payload resulting in a denial of service 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 Dockerfile environment that builds and runs a Java application using XStream 1.4.15, a library known to be vulnerable to deserialization attacks. The application deserializes a hardcoded XML payload.
Dockerfile:1-6pom.xml:11-14src/main/java/main.java:1-37The README explicitly names CVE-2021-21341, the pom.xml declares a dependency on XStream 1.4.15 (a version affected by that CVE), and the main.java source code constructs and deserializes a malicious XML payload designed to exploit XStream. This is a classic vulnerability reproduction exercise.
README.md:1pom.xml:11-14src/main/java/main.java:1-37Uses the maven:3.8.1-amazoncorretto-8 image to copy the source tree, run 'mvn package', and produce a shaded JAR. The build process is defined in the Dockerfile and configured by pom.xml.
Dockerfile:1-5pom.xml:1-44A Java application with a main class that instantiates XStream and calls xstream.fromXML() on a hardcoded XML string. The XML payload references classes like java.util.PriorityQueue and com.sun.xml.internal.bind.v2.runtime.unmarshaller.Base64Data, which are typical of XStream deserialization exploits. The application is packaged as a shaded JAR and executed by the container's CMD.
src/main/java/main.java:1-37Dockerfile:6The final artifact produced by the Maven shade plugin. It bundles the application code and the XStream dependency. The file is present in the build context but its content is omitted due to size.
Dockerfile:6pom.xml:22-40Supported by supplied evidence
The README explicitly associates the repository with CVE-2021-21341. The pom.xml declares a dependency on XStream 1.4.15, which is a version known to be affected by this CVE (an unsafe deserialization vulnerability). The main.java code demonstrates deserialization of an untrusted XML payload without any security framework or type allowlisting, matching the vulnerability description.
README.md:1pom.xml:11-14src/main/java/main.java:1-37Dockerfile:1-6Dockerfile:4pom.xml:11-14Dockerfile:1-6Dockerfile:6src/main/java/main.java:1-37The environment is a self-contained vulnerability lab. The exploit payload is hardcoded in the application source and targets only the application's own JVM. There are no network connections, host volume mounts, privilege escalations, or external command executions. The Dockerfile does not expose ports, run as privileged, or copy sensitive host files. The behavior is limited to demonstrating the CVE within the container.
Dockerfile:1-6src/main/java/main.java:1-37This 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.
Packet coverage: some source evidence omitted · 2 binary files not inspected
A Dockerized Java application that uses XStream 1.4.15 to unmarshal a crafted XML payload, demonstrating a denial-of-service vulnerability (CVE-2021-21341).
README.md:1-3Dockerfile:1-6The README explicitly describes CVE-2021-21341, provides a Docker demo, and includes steps to build and run the environment to observe the vulnerability. The Java source contains a crafted XML payload designed to trigger an endless loop in XStream.
README.md:1-3README.md:7-9src/main/java/main.java:6-35Uses maven:3.8.1-amazoncorretto-8 base image, copies the project source, builds it with mvn package, and runs the resulting JAR.
Dockerfile:1-6Declares a dependency on XStream 1.4.15 and configures the maven-shade-plugin to create an executable JAR with main class 'main'.
pom.xml:10-14pom.xml:24-30Contains a main method that constructs a malicious XML string and deserializes it with a default XStream instance, triggering the CVE-2021-21341 DoS.
src/main/java/main.java:1-37Explains the vulnerability, provides Docker build/run commands, shows expected output, and suggests remediation steps.
README.md:1-69Supported by supplied evidence
The README states the vulnerability affects XStream up to 1.4.15, and the pom.xml declares version 1.4.15. The Java code uses a default XStream instance to unmarshal a crafted XML payload that manipulates a ByteArrayInputStream, matching the CVE description of an endless loop causing DoS.
README.md:7-9pom.xml:12-14src/main/java/main.java:6-35README.md:25-27Dockerfile:4README.md:25-27README.md:29-31The environment only builds and runs a Java application that triggers a DoS within the container. There are no instructions or visible behaviors that escape the container, access the host, connect to external systems, persist data, steal credentials, or perform any destructive actions. The Dockerfile does not use privileged mode or mount sensitive host paths.
Dockerfile:1-6src/main/java/main.java:1-37This 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.