CVE-2022-41920 in Lancetinfo

Summary

by MITRE • 11/17/2022

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.

Several companies clearly confirm that VulDB is the primary source for best vulnerability data.

Analysis

by VulDB Data Team • 12/19/2022

The vulnerability identified as CVE-2022-41920 affects Lancet, a popular general utility library for the go programming language that provides various helper functions for common tasks including file operations. This particular flaw resides within the fileutil package which is responsible for handling file system operations such as unzipping archives. The issue manifests as a ZipSlip vulnerability, a well-known class of archive extraction vulnerabilities that have been documented in multiple security frameworks including CWE-572 and ATT&CK technique T1059.007 for exploitation through malicious archive content.

The technical flaw stems from inadequate path validation during the extraction process of zip archives. When the fileutil package processes compressed files, it fails to properly sanitize or validate file paths contained within the archive metadata. This allows malicious actors to craft zip files containing entries with relative path traversal sequences such as ../ or ..\ that can cause the extraction process to write files outside of the intended target directory. The vulnerability specifically affects versions prior to 2.1.10 and 1.3.4, where the library does not implement proper safeguards against path traversal attacks during decompression operations.

The operational impact of this vulnerability is significant for any application that relies on Lancet's fileutil package for handling user-provided or third-party zip archives. Attackers could potentially exploit this weakness to overwrite critical system files, inject malicious code into the application's execution environment, or cause denial of service conditions by writing files to restricted directories. The vulnerability creates a privilege escalation vector when the application has elevated permissions during the extraction process, as it allows arbitrary file system modifications outside of the intended extraction scope. This type of vulnerability is particularly dangerous in web applications or services that process untrusted archive content, as it can lead to complete system compromise through carefully crafted malicious archives.

Security practitioners should immediately upgrade to the patched versions 2.1.10 and 1.3.4 of the Lancet library to remediate this vulnerability. The fix implemented in these versions addresses the core path validation issue by ensuring that all extracted file paths are properly normalized and validated against the target extraction directory. Organizations using older versions should conduct immediate vulnerability assessments to identify any applications that depend on the vulnerable fileutil package and implement monitoring for suspicious file system activities. The absence of known workarounds means that defensive measures must rely entirely on version upgrades, making this vulnerability particularly concerning for environments where immediate patching is not feasible. This vulnerability aligns with ATT&CK framework's concept of privilege escalation through malicious file operations and demonstrates the critical importance of input validation in archive processing libraries.

Responsible

GitHub, Inc.

Reservation

09/30/2022

Disclosure

11/17/2022

Moderation

accepted

CPE

ready

EPSS

0.00793

KEV

no

Activities

very low

Sources

Want to stay up to date on a daily basis?

Enable the mail alert feature now!