#VU66153 Heap-based buffer overflow in Zlib


Published: 2022-10-17 | Updated: 2023-10-23

Vulnerability identifier: #VU66153

Vulnerability risk: High

CVSSv3.1: 7.3 [CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H/E:P/RL:O/RC:C]

CVE-ID: CVE-2022-37434

CWE-ID: CWE-122

Exploitation vector: Network

Exploit availability: Yes

Vulnerable software:
Zlib
Universal components / Libraries / Libraries used by multiple products

Vendor: GNU

Description

The vulnerability allows a remote attacker to execute arbitrary code on the target system.

The vulnerability exists due to a boundary error when processing a large gzip header within inflateGetHeader in inflate.c. A remote attacker can pass a specially crafted file to the affected application, trigger heap-based buffer overflow and execute arbitrary code on the target system.


Mitigation
Install update from vendor's website.

Vulnerable software versions

Zlib: 0.8 - 1.2.12


External links
http://github.com/nodejs/node/blob/75b68c6e4db515f76df73af476eccf382bbcb00a/deps/zlib/inflate.c#L762-L764
http://github.com/ivd38/zlib_overflow
http://github.com/madler/zlib/commit/eff308af425b67093bab25f80f1ae950166bece1
http://github.com/madler/zlib/blob/21767c654d31d2dccdde4330529775c6c5fd5389/zlib.h#L1062-L1063
http://www.openwall.com/lists/oss-security/2022/08/05/2


Q & A

Can this vulnerability be exploited remotely?

Yes. This vulnerability can be exploited by a remote non-authenticated attacker via the Internet.

Is there known malware, which exploits this vulnerability?

No. We are not aware of malware exploiting this vulnerability. However, proof of concept for this vulnerability is available.


Latest bulletins with this vulnerability