# A denial of service Regex breaks FastAPI security

DevFeed: [A denial of service Regex breaks FastAPI security](<https://devfeed.tech/articles/a-denial-of-service-regex-breaks-fastapi-security-7897.md>)

Original publisher: [Read original article](<https://snyk.io/blog/dos-regex-breaks-fastapi-security/>)

Author: Liran Tal

Published: 2024-07-31T13:00:00Z

Content type: article

Language: en

Sources: [Blog RSS Feed | Snyk](<https://devfeed.tech/sources/blog-rss-feed-snyk.md>)

Topics: [FastAPI](<https://devfeed.tech/topics/fastapi.md>), [Application Security](<https://devfeed.tech/topics/application-security.md>), [Vulnerabilities](<https://devfeed.tech/topics/vulnerabilities.md>), [Regular expression](<https://devfeed.tech/topics/regular-expression.md>), [Python](<https://devfeed.tech/topics/python.md>), [snyk](<https://devfeed.tech/topics/snyk.md>), [DDoS](<https://devfeed.tech/topics/ddos.md>)

Tags: [acquisition](<https://devfeed.tech/tags/acquisition.md>), [application-security](<https://devfeed.tech/tags/application-security.md>), [blog](<https://devfeed.tech/tags/blog.md>), [developer](<https://devfeed.tech/tags/developer.md>), [devrel](<https://devfeed.tech/tags/devrel.md>), [fastapi](<https://devfeed.tech/tags/fastapi.md>), [python](<https://devfeed.tech/tags/python.md>), [regex](<https://devfeed.tech/tags/regex.md>), [security](<https://devfeed.tech/tags/security.md>), [snyk](<https://devfeed.tech/tags/snyk.md>), [snyk-open-source](<https://devfeed.tech/tags/snyk-open-source.md>), [vulnerabilities](<https://devfeed.tech/tags/vulnerabilities.md>), [web](<https://devfeed.tech/tags/web.md>)

## AI overview

This article explains how insecure regular expressions can cause regular expression denial of service (ReDoS) vulnerabilities in FastAPI applications. It describes how malicious input can trigger excessive evaluation time, making an application slow or unresponsive, and discusses using Snyk to identify and mitigate these risks in Python code and third-party dependencies.

## Source excerpt

In this blog post, we are going to delve deep into the world of application security, specifically focusing on a vulnerability that can deteriorate FastAPI security: Denial of service (DoS) caused by insecure regular expressions (regex).