CVE-2022-41920 Zip slip in Lancet

Medium 6.3 Published Updated

Attackers can exploit a Zip Slip vulnerability in the Lancet Go library to write files outside the intended directory, potentially leading to code execution or data modification.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2022-41920?

CVE-2022-41920 is a medium-severity path traversal vulnerability in duke-git lancet, published on 17 Nov 2022. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

Lancet is a general utility library for the go programming language. Affected versions are subject to a ZipSlip issue when using the fileutil package to unzip files. This issue has been addressed and a fix will be included in versions 2.1.10 and 1.3.4. Users are advised to upgrade. There are no known workarounds for this issue.

Weakness: CWE-22

Which versions are affected by CVE-2022-41920?

6 open source packages ship an affected version, including github.com/duke-git/lancet and github.com/duke-git/lancet/v2. It affects 1 product.

PackageAffectedFixed in
github.com/duke-git/lancet GoAll versions1.3.4
github.com/duke-git/lancet GoAll versions1.3.4
github.com/duke-git/lancet GoAll versions1.3.4
github.com/duke-git/lancet/v2 GoFrom 2.0.02.1.10
github.com/duke-git/lancet/v2 GoFrom 2.0.02.1.10
github.com/duke-git/lancet/v2 GoFrom 2.0.02.1.10

Products include Lancet Project Lancet.

How do I fix CVE-2022-41920?

Upgrade github.com/duke-git/lancet to 1.3.4 or later.

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

Is CVE-2022-41920 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-41920 exists.

Sources

Also known as GHSA-pp3f-xrw5-q5j4, GO-2022-1114.

Is CVE-2022-41920 in your software?

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

Check your SBOMs for free