CVE-2024-45436 Ollama can extract members of a ZIP archive outside of the parent directory

Critical 9.1 Published Updated

Attackers can extract files outside the intended directory via malicious ZIP archives, potentially reading or modifying sensitive system files.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2024-45436?

CVE-2024-45436 is a critical path traversal vulnerability in n/a, published on 29 Aug 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

extractFromZipFile in model.go in Ollama before 0.1.47 can extract members of a ZIP archive outside of the parent directory.

Weakness: CWE-22

Which versions are affected by CVE-2024-45436?

3 open source packages ship an affected version, including github.com/ollama/ollama. It affects 1 product.

PackageAffectedFixed in
github.com/ollama/ollama GoAll versions0.1.47
github.com/ollama/ollama GoAll versions0.1.47
github.com/ollama/ollama GoAll versions0.1.47

Products include Ollama Ollama.

How do I fix CVE-2024-45436?

Upgrade github.com/ollama/ollama to 0.1.47 or later.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2024-45436 being exploited?

There is no known exploitation of CVE-2024-45436 in the wild and no public exploit code.

Public exploit code: 1 proofs of concept on GitHub.

Sources

Also known as CVE-2024-7773, GHSA-846m-99qv-67mg, GO-2024-3104.

Is CVE-2024-45436 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free