PyFu

Welcome

Welcome to PyFu, a practical handbook for discovering, understanding, and exploiting Python-related vulnerabilities, with a focus on web applications and the language internals that make them exploitable.

Start with the PyFu - Python Exploitation Handbook for the full introduction, then spin up the practice lab so you can follow along with every example.

Core Python Concepts

The language behavior that the rest of the handbook builds on.

Python-based Vulnerabilities Anatomy

How individual vulnerability classes work at the language level. Start with the Python Vulnerability Anatomy section index.

Web Application Attacks

The same primitives applied to real Flask, FastAPI, and Streamlit applications.

Injection

Library-based attacks

Authentication & Authorization

JWT attacks

Other

Web Framework Internals

How the frameworks process requests, and where their security models break.

FastMCP concepts