CVE-2024-24789 Mishandling of corrupt central directory record in archive/zip
Attackers can craft zip files that behave differently across implementations, potentially bypassing security checks or causing data inconsistencies in Go applications.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Local or same network only
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2024-24789?
CVE-2024-24789 is a medium-severity vulnerability in Golang Go, published on 5 Jun 2024. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Official description
The archive/zip package's handling of certain types of invalid zip files differs from the behavior of most zip implementations. This misalignment could be exploited to create an zip file with contents that vary depending on the implementation reading the file. The archive/zip package now rejects files containing these errors.
Which versions are affected by CVE-2024-24789?
2 open source packages ship an affected version, including golang and stdlib. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
golang Bitnami | All versions | 1.21.11, 1.22.4 |
stdlib Go | All versions | 1.21.11, 1.22.4 |
Linux distribution packages (2)
openshift-serverless-clients Red Hat:serverless:1.0::el8 | All versions | 0:1.12.0-10.el8 |
forgejo openSUSE:Tumbleweed | All versions | 7.0.4-1.1 |
Products include Golang Go.
How do I fix CVE-2024-24789?
Upgrade golang to a fixed version for your release line: 1.21.11 or 1.22.4.
Is CVE-2024-24789 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-24789 exists.
Other vulnerabilities in Golang Go
- CVE-2020-0601 Microsoft Windows CryptoAPI Spoofing
- CVE-2026-27143 Missing bound checks can lead to memory corruption in safe Go in cmd/compile
- CVE-2024-24790 Unexpected behavior from Is methods for IPv4-mapped IPv6 addresses in net/netip
- CVE-2023-39320 Arbitrary code execution via go.mod toolchain directive in cmd/go
- CVE-2023-24540 Improper handling of JavaScript whitespace in html/template
Sources
Also known as AZL-42389, AZL-42412, AZL-42415, AZL-52663, AZL-79044, AZL-98643 and 15 more.