Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions apache/struts/CVE-2013-2251/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Apache Struts2 S2-016 DefaultActionMapper OGNL Injection (CVE-2013-2251)

The redirect and redirectAction prefixes allow unauthenticated remote attackers to execute arbitrary OGNL expressions via manipulated URL parameters, leading to system command execution.

## Vulnerable Version
### Setup
Start an Apache Struts2 version 2.3.15:

```bash
docker compose up -d struts2-vuln
```

## Safe Version
### Setup
Start an Apache Struts2 version 2.3.15.1:

```bash
docker compose up -d struts2-safe
```
27 changes: 27 additions & 0 deletions apache/struts/CVE-2013-2251/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
services:
# ---------------------------------------------------------
# VULNERABLE INSTANCE (Port 8080)
# Uses the VulApps image vulnerable to CVE-2013-2251
# ---------------------------------------------------------
struts2-vuln:
image: docker.io/medicean/vulapps:s_struts2_s2-016
container_name: struts2-vuln
ports:
- "8080:8080"
restart: always

# ---------------------------------------------------------
# PATCHED INSTANCE (Port 8081)
# Downloads the official Struts 2.3.15.1 patch release on boot
# ---------------------------------------------------------
struts2-safe:
image: tomcat:8.5-jre8
container_name: struts2-safe
ports:
- "8081:8080"
command: >
bash -c "
curl -fsSL https://repo1.maven.org/maven2/org/apache/struts/struts2-showcase/2.3.15.1/struts2-showcase-2.3.15.1.war -o /usr/local/tomcat/webapps/ROOT.war &&
catalina.sh run
"
restart: always