> For the complete documentation index, see [llms.txt](https://blog.egonzalez.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://blog.egonzalez.org/hacking/index/python-vulnerabilities.md).

# 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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
