Vulnerabilities in pkg:maven/com.alibaba.oneagent/one-java-agent-plugin

PACKAGE
Advisory Identifier: GHSA-9hr3-j9mc-xmq2
Advisory Summary

CVE-2022-25842 is a MODERATE (CVSS 6.9) one-java-agent-plugin vulnerability (CWE-29: Path Traversal: '\..\filename') affecting One java agent plugin libraries in the Maven ecosystem. The issue involves one-java-agent-plugin. Remediation is available by upgrading affected packages to version 0.0.2.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:maven/com.alibaba.oneagent/one-java-agent-plugin

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:maven/com.alibaba.oneagent/one-java-agent-plugin. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-9hr3-j9mc-xmq2 CVE-2022-25842 MODERATE Path Traversal in com.alibaba.oneagent:one-java-agent-plugin

CVE-2022-25842 at a Glance

CVE Identifier CVE-2022-25842
GHSA Identifier GHSA-9hr3-j9mc-xmq2
Severity MODERATE
CVSS v3.1 Base Score 6.9
CWE Classification CWE-29: Path Traversal: '\..\filename'
Affected Product One java agent plugin
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 6.9

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:N/A:L).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity None (I:N)
Availability Low (A:L)

How to Fix CVE-2022-25842

To remediate this vulnerability, upgrade all affected One java agent plugin dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

com.alibaba.oneagent:one-java-agent-plugin fixed: 0.0.2
<dependency>
    <groupId>com.alibaba.oneagent</groupId>
    <artifactId>one-java-agent-plugin</artifactId>
    <version>0.0.2</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=com.alibaba.oneagent

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2022-25842, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=com.alibaba.oneagent

Analyze the terminal output to locate any version of One java agent plugin in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.0.2), your application is affected.

Note: The mvn dependency:tree -Dincludes=com.alibaba.oneagent command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-29: Path Traversal: '\..\filename', where the product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize '\..\filename' (leading backslash dot dot) sequences that can resolve to a location that is outside of that directory. In One java agent plugin, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

All versions of package `com.alibaba.oneagent:one-java-agent-plugin` are vulnerable to Arbitrary File Write via Archive Extraction (Zip Slip) using a specially crafted archive that holds directory traversal filenames (e.g. `../../evil.exe`). The attacker can overwrite executable files and either invoke them remotely or wait for the system or user to call them, thus achieving remote command execution on the victim’s machine.

CVE-2022-25842 Affected One java agent plugin Versions

1 component(s)
Fixed Versions:
0.0.2
Product / Package Ecosystem Affected Versions Fixed Version
com.alibaba.oneagent:one-java-agent-plugin
Maven
< 0.0.2
0.0.2

References

Frequently Asked Questions

What is CVE-2022-25842?
CVE-2022-25842 is a security vulnerability in One java agent plugin involving one-java-agent-plugin under CWE-29: Path Traversal: '\..\filename'.
Which One java agent plugin versions are affected?
Affected versions include releases prior to 0.0.2 across affected packages: com.alibaba.oneagent:one-java-agent-plugin.
What version fixes CVE-2022-25842?
Upgrading to 0.0.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is one-java-agent-plugin affected?
Yes, com.alibaba.oneagent:one-java-agent-plugin is affected in releases prior to 0.0.2. Upgrade your dependency to 0.0.2 or later.
What is the CVSS score of CVE-2022-25842?
CVE-2022-25842 has a CVSS v3.1 base score of 6.9 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:N/A:L.
What CWE is associated with CVE-2022-25842?
CVE-2022-25842 is classified under CWE-29: Path Traversal: '\..\filename' (The product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize '\..\filename' (leading backslash dot dot) sequences that can resolve to a location that is outside of that directory.).
How can I check Maven dependencies for CVE-2022-25842?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=com.alibaba.oneagent'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-9hr3-j9mc-xmq2",
  "modified" : "2022-05-20T21:17:03Z",
  "published" : "2022-05-03T00:00:44Z",
  "aliases" : [ "CVE-2022-25842" ],
  "summary" : "Path Traversal in com.alibaba.oneagent:one-java-agent-plugin",
  "details" : "All versions of package `com.alibaba.oneagent:one-java-agent-plugin` are vulnerable to Arbitrary File Write via Archive Extraction (Zip Slip) using a specially crafted archive that holds directory traversal filenames (e.g. `../../evil.exe`). The attacker can overwrite executable files and either invoke them remotely or wait for the system or user to call them, thus achieving remote command execution on the victim’s machine.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:N/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "com.alibaba.oneagent:one-java-agent-plugin"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.0.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-25842"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/alibaba/one-java-agent/pull/29"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/alibaba/one-java-agent/pull/29/commits/359603b63fc6c59d8b57e061c171954bab3433bf"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/alibaba/one-java-agent/pull/29/commits/b5b437f9f4c8cbfe7bdbe266e975a4bd513c13fe"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/alibaba/one-java-agent"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/alibaba/one-java-agent/blob/1f399a2299a8a409d15ea6111a7098629b8f1050/one-java-agent-plugin/src/main/java/com/alibaba/oneagent/utils/IOUtils.java"
  }, {
    "type" : "WEB",
    "url" : "https://snyk.io/vuln/SNYK-JAVA-COMALIBABAONEAGENT-2407874"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22", "CWE-29" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-05-20T21:17:03Z",
    "nvd_published_at" : "2022-05-01T16:15:00Z"
  }
}