Skip to main content

CVE-2022-37866: CWE-22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in Apache Software Foundation Apache Ivy

High
VulnerabilityCVE-2022-37866cvecve-2022-37866cwe-22
Published: Mon Nov 07 2022 (11/07/2022, 00:00:00 UTC)
Source: CVE
Vendor/Project: Apache Software Foundation
Product: Apache Ivy

Description

When Apache Ivy downloads artifacts from a repository it stores them in the local file system based on a user-supplied "pattern" that may include placeholders for artifacts coordinates like the organisation, module or version. If said coordinates contain "../" sequences - which are valid characters for Ivy coordinates in general - it is possible the artifacts are stored outside of Ivy's local cache or repository or can overwrite different artifacts inside of the local cache. In order to exploit this vulnerability an attacker needs collaboration by the remote repository as Ivy will issue http requests containing ".." sequences and a "normal" repository will not interpret them as part of the artifact coordinates. Users of Apache Ivy 2.0.0 to 2.5.1 should upgrade to Ivy 2.5.1.

AI-Powered Analysis

AILast updated: 07/03/2025, 07:40:05 UTC

Technical Analysis

CVE-2022-37866 is a high-severity path traversal vulnerability affecting Apache Ivy versions 2.0.0 through 2.5.1. Apache Ivy is a dependency management tool used primarily in Java projects to download and cache artifacts from remote repositories. The vulnerability arises because Ivy stores downloaded artifacts on the local filesystem using a user-supplied pattern that can include placeholders for artifact coordinates such as organization, module, or version. These coordinates can legally contain "../" sequences, which Ivy does not properly sanitize or restrict. As a result, an attacker controlling a remote repository can craft artifact coordinates containing "../" sequences, causing Ivy to write files outside its intended local cache directory. This can lead to overwriting arbitrary files on the local filesystem where Ivy runs, potentially corrupting or replacing critical files. Exploitation requires the attacker to control or collaborate with a remote repository since Ivy will send HTTP requests containing ".." sequences, which normal repositories would reject or not interpret as part of artifact coordinates. The vulnerability does not require authentication or user interaction and can be triggered remotely by Ivy clients that fetch artifacts from a malicious repository. The CVSS 3.1 base score is 7.5 (high), reflecting the network attack vector, low attack complexity, no privileges or user interaction required, and impact limited to integrity (file overwrite) without confidentiality or availability impact. No known exploits in the wild have been reported. Users of Apache Ivy should upgrade to version 2.5.1 or later where this issue is fixed.

Potential Impact

For European organizations, this vulnerability poses a significant risk especially for software development teams and build environments relying on Apache Ivy for dependency management. Successful exploitation could allow an attacker to overwrite arbitrary files on build servers or developer machines, potentially injecting malicious code, corrupting build artifacts, or disrupting development workflows. This could lead to supply chain compromise, where malicious code is introduced into software products during the build process. The integrity of software builds and artifacts is critical for organizations adhering to strict software supply chain security standards prevalent in Europe. Additionally, compromised build environments could be leveraged to escalate attacks into production systems or leak sensitive intellectual property. While the vulnerability does not directly impact confidentiality or availability, the integrity impact alone can have severe consequences for trustworthiness of software and compliance with European cybersecurity regulations such as the NIS Directive and GDPR if software integrity is compromised. The lack of required authentication or user interaction increases the risk in automated build pipelines that fetch dependencies without manual oversight.

Mitigation Recommendations

European organizations should immediately upgrade all Apache Ivy installations to version 2.5.1 or later, where this path traversal vulnerability is addressed. Additionally, organizations should audit their build environments to identify any use of Ivy versions prior to 2.5.1 and replace or patch them accordingly. As a supplementary measure, restrict network access from build servers to only trusted artifact repositories to prevent fetching from malicious or untrusted sources. Implement monitoring and alerting on filesystem changes in build environments to detect unexpected file overwrites. Consider sandboxing or containerizing build processes to limit the impact of any file system tampering. Review and harden repository URL patterns and artifact coordinate validation if custom repositories are used. Finally, integrate supply chain security best practices such as artifact signing and verification to detect tampered dependencies early in the build process.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
apache
Date Reserved
2022-08-08T00:00:00.000Z
Cisa Enriched
true
Cvss Version
3.1
State
PUBLISHED

Threat ID: 682d9838c4522896dcbec288

Added to database: 5/21/2025, 9:09:12 AM

Last enriched: 7/3/2025, 7:40:05 AM

Last updated: 7/31/2025, 6:50:40 PM

Views: 30

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats