# Python Vulnerabilities

This section will explain what vulnerabilities are common in python developments, how to exploit and fix them.

{% content-ref url="/pages/-M4AMrh3vVZP-XUMnwLa" %}
[Data Deserialization](/hacking/index/python-vulnerabilities/data-deserialization.md)
{% endcontent-ref %}

## Vulnerable server

For the purpose of learning all this vulnerabilities I've create a vulnerable server that will allow practice and execution of the provided examples, but is better if try to break by yourself googling for information about the technologies or the bugs.

To run the service on port <http://localhost:5000>

```
docker run --name vuln_server \
           --rm -ti -p 80:5000 \
           egonzalez90/vuln_python_server:latest
```

Once in the main page, browse through the menu and try to get the flag at `/root/flag` exploiting the different techniques.

Other command and files can also be executed, just be careful if mount other volumes in the container.

Server source code: <https://github.com/xNaaro/vulnerable_python>

Happy hacking and fixing vulnerabilities ;)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://blog.egonzalez.org/hacking/index/python-vulnerabilities.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
