FastAPI vulnerable to content-type header Regular expression Denial of Service (ReDoS)
FastAPI is a web framework for building APIs with Python 3.8+ based on standard Python type hints. When using form data, `python-multipart` uses a Regular Expression to parse the HTTP `Content-Type` header, including options. An attacker could send a custom-made `Content-Type` option that is very difficult for the RegEx to process, consuming CPU resources and stalling indefinitely (minutes or more) while holding the main event loop. This means that process can't handle any more requests. It's a ReDoS(Regular expression Denial of Service), it only applies to those reading form data, using `python-multipart`. This vulnerability has been patched in version 0.109.0.
Affected products
- <0.109.1
- ==<= 0.109.0
- <0.36.2
- <0.0.7
Matching in nixpkgs
pkgs.fastapi-cli
Run and manage FastAPI apps from the command line with FastAPI CLI
-
nixos-unstable -
- nixpkgs-unstable 0.0.8
pkgs.python312Packages.fastapi
Web framework for building APIs
-
nixos-unstable -
- nixpkgs-unstable 0.116.1
pkgs.python313Packages.fastapi
Web framework for building APIs
-
nixos-unstable -
- nixpkgs-unstable 0.116.1
pkgs.python312Packages.fastapi-cli
Run and manage FastAPI apps from the command line with FastAPI CLI
-
nixos-unstable -
- nixpkgs-unstable 0.0.8
pkgs.python312Packages.fastapi-mcp
Expose your FastAPI endpoints as Model Context Protocol (MCP) tools, with Auth
-
nixos-unstable -
- nixpkgs-unstable 0.4.0
pkgs.python312Packages.fastapi-sso
FastAPI plugin to enable SSO to most common providers (such as Facebook login, Google login and login via Microsoft Office 365 Account
-
nixos-unstable -
- nixpkgs-unstable 0.18.0
pkgs.python313Packages.fastapi-cli
Run and manage FastAPI apps from the command line with FastAPI CLI
-
nixos-unstable -
- nixpkgs-unstable 0.0.8
pkgs.python313Packages.fastapi-mcp
Expose your FastAPI endpoints as Model Context Protocol (MCP) tools, with Auth
-
nixos-unstable -
- nixpkgs-unstable 0.4.0
pkgs.python313Packages.fastapi-sso
FastAPI plugin to enable SSO to most common providers (such as Facebook login, Google login and login via Microsoft Office 365 Account
-
nixos-unstable -
- nixpkgs-unstable 0.18.0
pkgs.python312Packages.fastapi-mail
Module for sending emails and attachments
-
nixos-unstable -
- nixpkgs-unstable 1.5.0
pkgs.python313Packages.fastapi-mail
Module for sending emails and attachments
-
nixos-unstable -
- nixpkgs-unstable 1.5.0
pkgs.python312Packages.scalar-fastapi
Plugin for FastAPI to render a reference for your OpenAPI document
-
nixos-unstable -
- nixpkgs-unstable 1.3.0
pkgs.python313Packages.scalar-fastapi
Plugin for FastAPI to render a reference for your OpenAPI document
-
nixos-unstable -
- nixpkgs-unstable 1.3.0
pkgs.python312Packages.python-multipart
Streaming multipart parser for Python
-
nixos-unstable -
- nixpkgs-unstable 0.0.20
pkgs.python313Packages.python-multipart
Streaming multipart parser for Python
-
nixos-unstable -
- nixpkgs-unstable 0.0.20
pkgs.python312Packages.fastapi-github-oidc
FastAPI compatible middleware to authenticate Github OIDC Tokens
-
nixos-unstable -
- nixpkgs-unstable 0.3.0
pkgs.python313Packages.fastapi-github-oidc
FastAPI compatible middleware to authenticate Github OIDC Tokens
-
nixos-unstable -
- nixpkgs-unstable 0.3.0
pkgs.python312Packages.prometheus-fastapi-instrumentator
Instrument FastAPI with Prometheus metrics
-
nixos-unstable -
- nixpkgs-unstable 7.1.0
pkgs.python313Packages.prometheus-fastapi-instrumentator
Instrument FastAPI with Prometheus metrics
-
nixos-unstable -
- nixpkgs-unstable 7.1.0
pkgs.python312Packages.opentelemetry-instrumentation-fastapi
OpenTelemetry Instrumentation for fastapi
-
nixos-unstable -
- nixpkgs-unstable 0.55b0
pkgs.python313Packages.opentelemetry-instrumentation-fastapi
OpenTelemetry Instrumentation for fastapi
-
nixos-unstable -
- nixpkgs-unstable 0.55b0
Package maintainers
-
@wd15 Daniel Wheeler <daniel.wheeler2@gmail.com>
-
@Sigmanificient Yohann Boniface <sigmanificient@gmail.com>
-
@fabaff Fabian Affolter <mail@fabian-affolter.ch>
-
@GaetanLepage Gaetan Lepage <gaetan@glepage.com>
-
@despsyched Priyanshu Tripathi <priyanshu.tripathi@deshaw.com>
-
@natsukium Tomoya Otabi <nixpkgs@natsukium.com>
-
@de11n Elliot Cameron <nixpkgs-commits@deshaw.com>
-
@invokes-su Souvik Sen <nixpkgs-commits@deshaw.com>
-
@bcdarwin Ben Darwin <bcdarwin@gmail.com>
-
@risicle Robert Scott <code@humanleg.org.uk>
-
@codgician codgician <codgician@outlook.com>