
Proof of Concept exploit for Server Side Request Forgery vulnerability in Requests Basket v1.2.1 and before.
This Python script is a Proof of Concept (PoC) for CVE-2023-27163, a Server-Side Request Forgery (SSRF) vulnerability in Request Basket.
The script automates the exploitation of CVE-2023-27163. It performs the following actions:
127.0.0.1) on a specified port.localhost of the vulnerable server via the configured basket.This effectively allows an attacker to scan internal ports on the server hosting the vulnerable Request Basket instance.
To adapt this script for your own use, you may need to modify the following:
IP_Vuln_Server:
r'10.129.229.26:55555' to match the target vulnerable Request Basket server.IP_Vuln_Server = r'YOUR_TARGET_IP:PORT'
Port Range for Scanning (Optional):
range(75,82)).main() function if you want to scan different or a wider set of internal ports.for i in range(START_PORT, END_PORT + 1): # e.g., range(1, 65536) for all ports
ConfBasketAndFetchResp(headers, i)
forward_url in ConfBasketAndFetchResp (Advanced/Specific Use Cases):
http://127.0.0.1:{port}/.forward_url string. However, for the intended SSRF to scan , is usually correct.Ensure you have the requests library installed (pip install requests). Use this PoC responsibly and only on systems you have explicit permission to test.
localhost127.0.0.1json_config = {
"forward_url": f"http://TARGET_INTERNAL_IP:{port}/TARGET_PATH",
# ... other parameters
}