CVE-2021-36088
📋 TL;DR
CVE-2021-36088 is a double-free vulnerability in Fluent Bit's JSON parser that can lead to memory corruption and potential remote code execution. This affects Fluent Bit versions 1.7.0 through 1.7.4 when processing malicious JSON input. Organizations using vulnerable Fluent Bit deployments for log processing are at risk.
💻 Affected Systems
- Fluent Bit
📦 What is this software?
Fluent Bit by Treasuredata
⚠️ Risk & Real-World Impact
Worst Case
Remote code execution with the privileges of the Fluent Bit process, potentially leading to complete system compromise.
Likely Case
Denial of service through application crash or memory corruption leading to instability.
If Mitigated
Limited impact if Fluent Bit runs with minimal privileges and network exposure is restricted.
🎯 Exploit Status
The vulnerability is triggered by sending specially crafted JSON data to Fluent Bit. Proof-of-concept code exists in the OSS-Fuzz reports.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 1.7.5 and later
Vendor Advisory: https://github.com/fluent/fluent-bit/security/advisories/GHSA-6w9v-4x7f-3vj9
Restart Required: Yes
Instructions:
1. Upgrade Fluent Bit to version 1.7.5 or later. 2. Download from https://fluentbit.io/download/. 3. Replace existing installation. 4. Restart Fluent Bit service.
🔧 Temporary Workarounds
Disable JSON parsing
allIf JSON parsing is not required, disable it in Fluent Bit configuration
# In Fluent Bit config, remove or comment out JSON parser configurations
Network isolation
linuxRestrict network access to Fluent Bit endpoints
# Use firewall rules to limit access
# Example: iptables -A INPUT -p tcp --dport 24224 -s trusted_ip -j ACCEPT
🧯 If You Can't Patch
- Run Fluent Bit with minimal privileges (non-root user)
- Implement network segmentation to limit which systems can send data to Fluent Bit
🔍 How to Verify
Check if Vulnerable:
Check Fluent Bit version: fluent-bit --version. If version is between 1.7.0 and 1.7.4 inclusive, the system is vulnerable.
Check Version:
fluent-bit --version
Verify Fix Applied:
After patching, verify version is 1.7.5 or later with: fluent-bit --version
📡 Detection & Monitoring
Log Indicators:
- Fluent Bit crash logs
- Segmentation fault errors in system logs
- Unexpected process termination
Network Indicators:
- Unusual JSON payloads sent to Fluent Bit ports
- Multiple connection attempts with malformed data
SIEM Query:
source="fluent-bit" AND ("segmentation fault" OR "double free" OR "corrupted")
🔗 References
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=33750
- https://github.com/fluent/fluent-bit/commit/22346a74c07ceb90296be872be2d53eb92252a54
- https://github.com/fluent/fluent-bit/pull/3453
- https://github.com/google/oss-fuzz-vulns/blob/main/vulns/fluent-bit/OSV-2021-702.yaml
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=33750
- https://github.com/fluent/fluent-bit/commit/22346a74c07ceb90296be872be2d53eb92252a54
- https://github.com/fluent/fluent-bit/pull/3453
- https://github.com/google/oss-fuzz-vulns/blob/main/vulns/fluent-bit/OSV-2021-702.yaml