GHSA-hwhf-64mh-r662 BIT-fluentd-2021-41186 CVE-2021-41186
ReDoS vulnerability in parser_apache2
- Severity
- 5.9 / 10
- Medium · CVSS 3.1
- Exploit chance (EPSS)
- 2.21%
- Chance of exploitation in the next 30 days. Higher than 82.63% of scored vulnerabilities.
- Known exploited
- No
- Not in CISA's catalog
- Weakness
- CWE-400 Uncontrolled Resource Consumption
- Fix
1.14.2- Upgrade fluentd to this version or later
Description
Impact
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.
Patches
v1.14.2
Workarounds
Either of the following:
- Don't use parser_apache2 for parsing logs which cannot guarantee generated by Apache.
- Put patched version of parser_apache2.rb into /etc/fluent/plugin directory (or any other directories specified by the environment variable
FLUENT_PLUGINor--pluginoption of fluentd).
References
Affected versions
RubyGems
| Package | Vulnerable | Fixed in |
|---|---|---|
| fluentd | >= 0.14.14, < 1.14.2 |
1.14.2 |
How to fix
Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.
fluentd RubyGems → 1.14.2
- bundler
bundle update fluentd # Gemfile: gem "fluentd", ">= 1.14.2"
Severity breakdown
CVSS 3.1 5.9
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
- Attack vector
- Network
- Attack complexity
- High
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- None
- Integrity
- None
- Availability
- High
Weakness
CWE-400: Uncontrolled Resource Consumption
The product does not properly control the allocation and maintenance of a limited resource.
How to prevent it
- Architecture and Design: Design throttling mechanisms into the system architecture. The best protection is to limit the amount of resources that an unauthorized user can cause to be expended. A strong authentication and access control model will help prevent such attacks from occurring in the first place. The login application should be protected against DoS attacks as much as possible. Limiting the database access, perhaps by caching result sets, can help minimize the resources expended. To further limit the potential for a DoS attack, consider tracking the rate of requests received from users and blocking requests that exceed a defined rate threshold.
- Architecture and Design: Mitigation of resource exhaustion attacks requires that the target system either: recognizes the attack and denies that user further access for a given amount of time, or uniformly throttles all requests in order to make it more difficult to consume resources more quickly than they can again be freed. The first of these solutions is an issue in itself though, since it may allow attackers to prevent the use of the system by a particular valid user. If the attacker impersonates the valid user, they may be able to prevent the user from accessing the server in question. The second solution is simply difficult to effectively institute -- and even when properly done, it does not provide a full solution. It simply makes the attack require more resources on the part of the attacker.
- Architecture and Design: Ensure that protocols have specific limits of scale placed on them.
- Implementation: Ensure that all failures in resource allocation place the system into a safe posture.
References
Advisories
Packages
Other links
- github.com/fluent/fluentd/security/advisories/GHSA-hwhf-64mh-r662
- github.com/fluent/fluentd/commit/5482a3d049dab351de0be68f4b4bc562319d8511
- github.com/fluent/fluentd/blob/master/CHANGELOG.md
- github.com/github/securitylab-vulnerabilities/blob/52dc4a2a828c6dc24231967c2937…
- github.com/rubysec/ruby-advisory-db/blob/master/gems/fluentd/CVE-2021-41186.yml
Timeline
- Published
- Last updated by the source
- Latest EPSS score
Related advisories
| Advisory | Severity | Why it's related |
|---|---|---|
| GHSA-72f5-rr8c-r6gr Fluentd is Vulnerable to Server-Side Request Forgery (SSRF) via Placeholder Expansion in `out_http` | High | Also affects fluentd |
| GHSA-j9cw-hwqf-85w7 Fluentd is Vulnerable to Denial of Service (DoS) via Gzip Decompression Bomb in `in_http` and `in_forward` | High | Also affects fluentd |
| GHSA-pr7j-96cj-549h Fluentd is Vulnerable to Exposure of Sensitive Information via Monitor Agent API | High | Also affects fluentd |
| GHSA-44hj-4m45-frj3 Fluentd is Vulnerable to Remote Code Execution (RCE) via Arbitrary File Write in `${tag}` Placeholder | Critical | Also affects fluentd |
| GHSA-fppq-mj76-fpj2 fluentd vulnerable to remote code execution due to insecure deserialization (in non-default configuration) | Low | Also affects fluentd |
| GHSA-5jrp-w8fr-mrww Fluentd Escape Sequence Injection Vulnerability | Critical | Also affects fluentd |
| GHSA-cggf-277g-3q54 pypdf has possible large memory usage when parsing page tree | High | Same weakness, CWE-400 |
| GHSA-3g3m-2fjr-6pw4 Glob: AbortSignal cancellation bypass allows post-timeout filesystem traversal | Medium | Same weakness, CWE-400 |
MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.
Check your repos with MergeHarbor