GMS-2023-353: MultipartParser denial of service with too many fields or files
The MultipartParser using the package python-multipart accepts an unlimited number of multipart parts (form fields or files). Processing too many parts results in high CPU usage and high memory usage, eventually leading to an OOM process kill. This can be triggered by sending too many small form fields with no content, or too many empty files. For this to take effect application code has to; have python-multipart installed and call request.form()
or via another framework like FastAPI, using form field parameters or UploadFile parameters, which in turn calls request.form()
.
References
Detect and mitigate GMS-2023-353 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →