Skip to content
DoS Disclosed report Beginner

Regular Expression Denial of Service (ReDoS) Vulnerability before 2.6.3

Apache Airflow before 2.6.3 allows an authenticated user to supply a crafted regular expression in the 'root' parameter of the Gantt chart page, causing the server to hang due to catastrophic backtracking. This results in a denial of service, making the web application unresponsive for legitimate users.

m3ss1_neo Follow

Originally disclosed on HackerOne

Bounty$540 Low View original
  • Disclosed after 2 months

Summary by the program

CVE-2023-36543: Apache Airflow: ReDoS via dags function Severity: low

Affected versions:

  • Apache Airflow before 2.6.3

Description: Apache Airflow, versions before 2.6.3, has a vulnerability where an authenticated user can use crafted input to make the current request hang. It is recommended to upgrade to a version that is not affected

Credit: National Cyber Security VietNam (NCS VietNam) (finder) hungtd (finder)

Full security advisory: https://lists.apache.org/thread/tokfs980504ylgk3cv3hjlnrtbv4tng4

The report

Apache Airflow, versions before 2.6.3, has a vulnerability where an authenticated user can use crafted input to make the current request hang.

POC: Go to URL http://192.168.73.128:8080/dags/dataset_consumes_1/gantt?root=(((((((.*)*)*)*)*)*)*)! twice, valure of root param pass into the application will trigger Redos vulnand service will hang for a while.

#Here is an email comfirm from Airflow team. ████

Impact

Denial of service: The attacker can effectively crash the web application or server, preventing legitimate users from accessing

The original report as published on HackerOne, by m3ss1_neo. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 3 min read.

Context

Apache Airflow is a workflow orchestration platform. Its web interface exposes a Gantt chart view for each DAG, reachable under a path of the form /dags/<dag_id>/gantt. The Gantt view accepts a root query parameter, which the application processes on the server side. That parameter is user-controlled input that the application processes on the server side.

The vulnerability described here is CVE-2023-36543, a regular expression denial of service (ReDoS) in the dags function. It affects Apache Airflow versions before 2.6.3. The report was filed under the Internet Bug Bounty program on HackerOne, rated low severity, and a bounty of 540.00 USD was paid. It was disclosed on 2023-09-14. The finders credited in the advisory are National Cyber Security VietNam (NCS VietNam) and hungtd.

Setup

The precondition is an authenticated Airflow user. The advisory states that an authenticated user can use crafted input to make the current request hang, so no unauthenticated access is required and no special role beyond being logged in is described.

The proof of concept targets a local instance at [redacted] on port 8080, with a DAG named dataset_consumes_1. The report does not describe how that DAG was created or what tasks it contains.

Finding it

The crafted value of the root parameter is passed into the application and triggers the ReDoS vulnerability. The crafted value is a nested repetition pattern, the classic shape that makes a backtracking regular expression engine explore an exponential number of paths.

Exploitation

Step 1: Request the Gantt view with a crafted root value

The proof of concept is to visit the following URL twice:

HTTP
http://[redacted]:8080/dags/dataset_consumes_1/gantt?root=(((((((.*)*)*)*)*)*)*)!

The path selects the DAG dataset_consumes_1 and its Gantt view. The root parameter carries the value (((((((.*)*)*)*)*)*)*)!, a chain of nested groups each repeating .*, followed by a literal !. When this value is passed into the application, it triggers the ReDoS vulnerability and the service hangs for a while. Requesting the URL twice is part of the reproduction as written.

The report includes an email from the Airflow team confirming the issue, but its contents are not reproduced here.

Root cause

The crafted root value triggers a ReDoS vulnerability, and the request hangs. The report does not include the vulnerable code, so the exact expression is not shown.

Impact

Denial of service: the attacker can effectively crash the web application or server, preventing legitimate users from accessing it. The advisory frames the effect as making the current request hang, and the proof of concept notes the service hangs for a while. The attacker must be an authenticated user.

Fix

Upgrade to a version of Apache Airflow that is not affected. The advisory states that versions before 2.6.3 are vulnerable and recommends upgrading.

Variants to test

  1. Other Airflow views that take a task or root selector as a query parameter, such as graph or tree views. A positive result is the request hanging or timing out when a nested-quantifier value is supplied.
  2. Other parameters on the Gantt endpoint that are matched against regular expressions. A positive result is a measurable delay that scales with the nesting depth of the input.
  3. The same nested repetition shape against any endpoint that filters or validates user input with a regular expression. A positive result is response time growing sharply as the number of nested groups or the input length increases.

Hunting notes

This class of bug tends to hide in parameters that are validated or parsed with regular expressions on the server, especially selectors and filters in administrative or dashboard interfaces. During recon, look for endpoints that accept structured or pattern-like values and observe whether response time changes with input shape. The researcher demonstrated impact by showing that the crafted request makes the service hang. The report does not describe any further impact demonstration.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 8 min read.

What happened, in plain words

Apache Airflow is a piece of software that runs and schedules workflows: chains of tasks that a company wants to run automatically, for example "download a file, clean it, load it into a database". People who use Airflow mostly do so through a web interface in a browser, where they can look at their workflows, called DAGs, and see how the tasks inside them are doing.

One of the pages in that web interface is a Gantt chart. A Gantt chart is the familiar timeline picture: each task is a horizontal bar, and the bar's position and length show when the task started and how long it took. The page takes a value called root from the address of the page.

A security researcher found that if you put a specially crafted value into that root part of the address, Airflow's server gets stuck. The request hangs for a while. That is a denial of service: the attacker does not steal data, they just make the service unavailable.

The problem was tracked as CVE-2023-36543, affecting Apache Airflow versions before 2.6.3. The report was filed on HackerOne under the Internet Bug Bounty program, rated low severity, and a bounty of 540.00 USD was paid. It was disclosed on 2023-09-14. The advisory credits National Cyber Security VietNam (NCS VietNam) and hungtd as the finders.

The pieces you need to know first

Before walking through the report, here are the ideas it relies on, explained from scratch.

A web application and its URLs. When you type an address into your browser, you are sending a request to a server. The address has parts. In http://[redacted]:8080/dags/dataset_consumes_1/gantt?root=..., [redacted] is the address of the machine (here a machine on a local network, not on the public internet), 8080 is the port, a numbered door on that machine where the web server listens, /dags/dataset_consumes_1/gantt is the path that tells the application which page you want, and everything after the ? is the query string, a list of named values the page receives. Each named value is a parameter. Here there is one parameter, root.

A DAG. In Airflow, a DAG (directed acyclic graph) is the description of a workflow: which tasks exist and in what order they must run. Each DAG has a name, and the name appears in the URL. In this report the DAG is called dataset_consumes_1.

Authentication. Many web applications require you to log in before you can see anything. Airflow does. The report's precondition is that the attacker is a logged-in user: they have a valid account and a session, but nothing more special than that. This matters because it lowers the severity: you cannot do this from the open internet without an account.

A regular expression. A regular expression, often shortened to regex, is a tiny pattern language for describing text. Instead of saying "does this string contain the word cat", you can say "does this string look like a date" with a compact pattern. Programs use regexes to check, search and extract text. The catch is that some patterns are cheap to match against short input and extremely expensive against certain other input.

ReDoS, regular expression denial of service. A regex engine works by trying possibilities. Some patterns contain nested repetitions: "repeat this group, and inside the group repeat something else". When the input does not match, the engine may try a huge number of combinations before giving up, and the number of combinations can grow exponentially with the length of the input. A short string can therefore keep the engine busy for minutes. If the server runs that match while handling your request, your request hangs, and so does the server's capacity to answer others. That is ReDoS. A useful everyday comparison: imagine a form that asks you to try every possible combination of a lock, and someone hands you a lock with many more dials than you expected. You are not doing anything wrong, you are just following the instructions, but you will be there for a very long time.

A proof of concept (PoC). A PoC is the smallest concrete demonstration that a bug is real: the exact steps someone else can repeat to see the same result. In this report the PoC is a single URL, visited twice.

The setup

The only precondition described is an authenticated Airflow user. The advisory says an authenticated user can use crafted input to make the current request hang, so no anonymous access is needed and no special role beyond being logged in is mentioned.

The proof of concept targets a local Airflow instance at [redacted] on port 8080, with a DAG named dataset_consumes_1. The report does not describe how that DAG was created or what tasks it contains; for reproducing the bug, all that matters is that a DAG with that name exists and that its Gantt page can be opened.

Finding it

The crafted value of the root parameter is taken from the URL and processed on the server, triggering the ReDoS vulnerability. The crafted value is a nested repetition pattern, the classic shape that makes a backtracking regex engine explore an exponential number of paths.

Why does this shape work? Look at the value as a series of layers: a group containing .*, wrapped in another group that repeats it, wrapped again, and so on. .* means "any characters, as many as possible". When the whole pattern is asked to match text that ends with something the pattern cannot satisfy (here a literal ! that is not present), the engine has to reconsider every way it could have divided the text among those nested repetitions. With enough layers, the number of ways explodes.

Exploitation

Step 1: Request the Gantt view with a crafted root value

The proof of concept is to visit the following URL twice:

HTTP
http://[redacted]:8080/dags/dataset_consumes_1/gantt?root=(((((((.*)*)*)*)*)*)*)!

Line by line, in plain words:

  • http:// is the protocol, the language the browser and server use to talk.
  • [redacted] is the address of the machine running Airflow. Addresses starting with 192.168. are private, meaning they only exist inside a local network, so this is a test instance, not a public website.
  • :8080 is the port, the numbered door on that machine where the Airflow web server is listening.
  • /dags/dataset_consumes_1/gantt is the path. It says: show me the DAG called dataset_consumes_1, and specifically its Gantt chart page.
  • ?root= starts the query string and names the parameter root, which the Gantt page uses to decide which task is the starting point of the chart.
  • (((((((.*)*)*)*)*)*)*)! is the value given to root. It is a chain of nested groups, each repeating .*, closed by a literal !. This is the crafted input: it is not a task name, it is a pattern designed to be expensive to process.

When this value is passed into the application, it triggers the ReDoS vulnerability and the service hangs for a while. Visiting the URL twice is part of the reproduction as written; the report does not explain why twice, only that this is how it was demonstrated.

The report also includes an email from the Airflow team confirming the issue, but its contents are not reproduced here.

Why it works

The crafted root value triggers a ReDoS vulnerability, and the request hangs. The report does not include the vulnerable code, so the exact expression is not shown.

Impact

Denial of service: the attacker can effectively crash the web application or server, preventing legitimate users from accessing it. The advisory frames the effect as making the current request hang, and the proof of concept notes the service hangs for a while. The attacker must be an authenticated user.

Fix

Upgrade to a version of Apache Airflow that is not affected. The advisory states that versions before 2.6.3 are vulnerable and recommends upgrading.

Variants to test

  1. Other Airflow views that take a task or root selector as a query parameter, such as graph or tree views. A positive result is the request hanging or timing out when a nested-quantifier value is supplied.
  2. Other parameters on the Gantt endpoint that are matched against regular expressions. A positive result is a measurable delay that scales with the nesting depth of the input.
  3. The same nested repetition shape against any endpoint that filters or validates user input with a regular expression. A positive result is response time growing sharply as the number of nested groups or the input length increases.

Hunting notes

This class of bug tends to hide in parameters that are validated or parsed with regular expressions on the server, especially selectors and filters in administrative or dashboard interfaces. During recon, look for endpoints that accept structured or pattern-like values and observe whether response time changes with input shape. The researcher demonstrated impact by showing that the crafted request makes the service hang.

Glossary

  • Apache Airflow: software that schedules and runs workflows made of tasks, with a web interface for managing them.
  • Authentication: proving who you are to an application, usually by logging in, so it can decide what you are allowed to see.
  • Backtracking: the way a regex engine retries alternative ways of matching when its first attempt fails; with nested repetitions the number of retries can explode.
  • Bounty: a payment made by a bug bounty program to a researcher who reports a valid vulnerability.
  • CVE: a public identifier for a known vulnerability, here CVE-2023-36543.
  • DAG: in Airflow, the description of a workflow: its tasks and the order they run in.
  • Denial of service (DoS): making a service unavailable to its legitimate users, for example by keeping it too busy to answer.
  • Gantt chart: a timeline view where each task is a bar showing when it ran and for how long.
  • HackerOne: a platform where researchers report vulnerabilities to organisations and programs.
  • Internet Bug Bounty: the program under which this report was filed.
  • Parameter: a named value passed to a web page in the URL, after the ?, such as root.
  • Path: the part of a URL that identifies which page or resource you want, such as /dags/dataset_consumes_1/gantt.
  • Port: a numbered door on a machine where a network service listens, such as 8080.
  • Proof of concept (PoC): the exact, repeatable steps that demonstrate a bug is real.
  • Query string: the part of a URL after the ? that carries parameters.
  • ReDoS (regular expression denial of service): a denial of service caused by a crafted input that makes a regex engine work for an extremely long time.
  • Regex (regular expression): a compact pattern language for describing and matching text.
  • Severity: a rating of how serious a vulnerability is, here low.
  • Synchronous: work that the server does immediately, blocking it from doing anything else until it finishes.
  • Vulnerability: a weakness in software that someone can abuse to cause harm or unwanted behaviour.
  • Workflow: a sequence of tasks run automatically in a defined order.

More from Internet Bug Bounty

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Denial of service

The lesson behind this report.

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.