FastAPI application (poc.py)
A FastAPI server exposing endpoints /mount_extension, /install_extension, /uploadfile/, and /uploads/{filename}. The /install_extension endpoint constructs a file path by concatenating a base directory with user-supplied data.name, then uses importlib.machinery.SourceFileLoader to load and execute a Python module from that path. The /uploadfile/ endpoint saves uploaded files to /path/to/uploads. The /uploads/{filename} endpoint serves uploaded files. The application is the target of the described path traversal vulnerability.
poc.py:1-150