
Apache Struts2 CVE-2017-5638 (Safe Educational Demo)
This project is a Proof-of-Concept (PoC) for CVE-2017-5638, a famous Apache Struts2 vulnerability that allowed attackers to execute arbitrary code on affected servers.
⚠️ This repository contains a safe, non-exploitative demo designed for educational purposes only. It does not perform any malicious actions.
Content-Type header was improperly passed to OGNL (Object-Graph Navigation Language), allowing attackers to inject and execute code on the server.This script demonstrates how an attacker might test for the vulnerability — but in a harmless way.
Content-Type header containing an OGNL expression.X-Vuln: Vulnerable) to the server’s response.This makes it a safe demonstration of the vulnerability without actually exploiting it.
# Install required package
pip install requests
# Run the script
python3 struts2_poc.py
# Enter a target URL when prompted (example)
http://example.com/