VYPR
Moderate severityNVD Advisory· Published Oct 29, 2021· Updated Aug 4, 2024

ReDoS vulnerability in parser_apache2

CVE-2021-41186

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).

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

Fluentd parser_apache2 plugin versions 0.14.14 to 1.14.1 contain a ReDoS vulnerability that can cause denial of service via a crafted Apache log line.

Vulnerability

The parser_apache2 plugin in Fluentd versions 0.14.14 to 1.14.1 contains a regular expression denial of service (ReDoS) vulnerability [1][2]. The flaw exists in the regular expression used to parse Apache log entries. An attacker can craft a malformed log line with a specific pattern that causes the regex engine to exhibit catastrophic backtracking, resulting in excessive CPU consumption [1]. This affects all deployments using parser_apache2 to parse logs that cannot be guaranteed to originate from a legitimate Apache instance [1].

Exploitation

An attacker does not require authentication or special network position if they can inject log lines into a source that Fluentd processes using parser_apache2 [1]. The attacker must send a log line with a carefully constructed pattern that triggers exponential backtracking in the vulnerable regex [1]. No user interaction beyond normal log processing is needed; the attack manifests during the parsing step [1].

Impact

Successful exploitation leads to prolonged CPU usage by the Fluentd process, potentially causing a denial of service (DoS) condition where log processing stalls or the system becomes unresponsive [1]. The impact is strictly availability; no data confidentiality or integrity is compromised [1].

Mitigation

The vulnerability is patched in Fluentd version 1.14.2 [1][3]. As a workaround, administrators can either avoid using parser_apache2 for logs that may originate from untrusted sources, or manually place a patched version of parser_apache2.rb into the plugin directory (e.g., /etc/fluent/plugin or a directory specified by the FLUENT_PLUGIN environment variable or --plugin option) [1].

AI Insight generated on May 21, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
fluentdRubyGems
>= 0.14.14, < 1.14.21.14.2

Affected products

5

Patches

1
5482a3d049da

Merge pull request from GHSA-hwhf-64mh-r662

https://github.com/fluent/fluentdTakuro AshieOct 29, 2021via ghsa
1 file changed · +1 1
  • lib/fluent/plugin/parser_apache2.rb+1 1 modified
    @@ -21,7 +21,7 @@ module Plugin
         class Apache2Parser < Parser
           Plugin.register_parser('apache2', self)
     
    -      REGEXP = /^(?<host>[^ ]*) [^ ]* (?<user>[^ ]*) \[(?<time>[^\]]*)\] "(?<method>\S+)(?: +(?<path>(?:[^\"]|\\.)*?)(?: +\S*)?)?" (?<code>[^ ]*) (?<size>[^ ]*)(?: "(?<referer>(?:[^\"]|\\.)*)" "(?<agent>(?:[^\"]|\\.)*)")?$/
    +      REGEXP = /^(?<host>[^ ]*) [^ ]* (?<user>[^ ]*) \[(?<time>[^\]]*)\] "(?<method>\S+)(?: +(?<path>(?:[^\"]|\\")*?)(?: +\S*)?)?" (?<code>[^ ]*) (?<size>[^ ]*)(?: "(?<referer>(?:[^\"]|\\")*)" "(?<agent>(?:[^\"]|\\")*)")?$/
           TIME_FORMAT = "%d/%b/%Y:%H:%M:%S %z"
     
           def initialize
    

Vulnerability mechanics

Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

7

News mentions

0

No linked articles in our index yet.