CVE-2021-41186 ReDoS vulnerability in parser_apache2
Attackers can cause a denial of service in Fluentd by sending malformed Apache logs that trigger excessive CPU usage in the parser_apache2 plugin.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2021-41186?
CVE-2021-41186 is a medium-severity denial of service vulnerability in fluentd, published on 29 Oct 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
Fluentd collects events from various data sources and writes them to files to help unify logging infrastructure. The parser_apache2 plugin in Fluentd v0.14.14 to v1.14.1 suffers from a regular expression denial of service (ReDoS) vulnerability. A broken apache log with a certain pattern of string can spend too much time in a regular expression, resulting in the potential for a DoS attack. This issue is patched in version 1.14.2 There are two workarounds available. Either don't use parser_apache2 for parsing logs (which cannot guarantee generated by Apache), or put patched version of parser_apache2.rb into /etc/fluent/plugin directory (or any other directories specified by the environment variable `FLUENT_PLUGIN` or `--plugin` option of fluentd).
Weakness: CWE-400
Which versions are affected by CVE-2021-41186?
3 open source packages ship an affected version, including fluentd. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
fluentd Bitnami | From 0.14.14 | 1.14.2 |
fluentd RubyGems | From 0.14.14 | 1.14.2 |
fluentd RubyGems | From 0.14.14 | 1.14.2 |
Linux distribution packages (5)
ruby3.2-rubygem-fluentd openSUSE:Tumbleweed | All versions | 1.15.3-1.4 |
rubygem-fluentd openSUSE:Tumbleweed | All versions | 1.14.4-1.1 |
rubygem-fluentd openSUSE:Tumbleweed | All versions | 1.17.0-1.1 |
rubygem-fluentd openSUSE:Tumbleweed | All versions | 1.17.1-1.3 |
rubygem-fluentd openSUSE:Tumbleweed | All versions | 1.17.1-1.5 |
Products include Fluentd Fluentd.
How do I fix CVE-2021-41186?
Upgrade fluentd to 1.14.2 or later.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is CVE-2021-41186 being exploited?
There is no known exploitation of CVE-2021-41186 in the wild and no public exploit code.
Other vulnerabilities in fluentd
- CVE-2026-44024 Fluentd: Remote Code Execution (RCE) via Arbitrary File Write in `${tag}` Placeholder
- CVE-2017-10906 Fluentd Escape Sequence Injection Vulnerability
- CVE-2020-21514 Fluent Fluentd and Fluent-ui use default password
- CVE-2026-44025 Fluentd: Exposure of Sensitive Information via Monitor Agent API
- CVE-2026-44160 Fluentd: Denial of Service (DoS) via Gzip Decompression Bomb in `in_http` and `in_forward`
Sources
Also known as BIT-fluentd-2021-41186, GHSA-hwhf-64mh-r662, openSUSE-SU-2024:11795-1, openSUSE-SU-2024:13155-1, openSUSE-SU-2024:14072-1, openSUSE-SU-2025:15115-1 and 1 more.