# CVE-2016-5725: Improper Limitation of a Pathname to a Restricted Directory in JCraft JSch

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.9
- **CVSS:** 5.9 (v3.0, NVD) `CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N`
- **CVSS metrics:** Attack vector: Network; Attack complexity: High; Privileges required: None; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: High; Availability impact: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** Yes (see exploit references)
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 24.14% (percentile 98, 2026-11-26)
- **CWE:** CWE-22
- **Aliases:** EDB-40411, GHSA-q446-82vq-w674
- **Published:** 2016-09-22T00:00:00.000Z
- **Modified:** 2026-09-10T03:49:36.585Z

## Who should check

- Projects that depend on Maven package com.jcraft:jsch (\< 0.1.54)
- Anyone running n/a (versions: see the vendor advisory)

## Description

Directory traversal vulnerability in JCraft JSch before 0.1.54 on Windows, when the mode is ChannelSftp.OVERWRITE, allows remote SFTP servers to write to arbitrary files via a ..\\ (dot dot backslash) in a response to a recursive GET command.

## Affected and fixed versions

- Maven `com.jcraft:jsch`: affected \< 0.1.54; fixed 0.1.54 (osv)
- n/a: see vendor advisory (nvd)

## Mitigation

- Upgrade com.jcraft:jsch to 0.1.54 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2016-5725. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2016-5725.md
Affected: com.jcraft:jsch < 0.1.54
Fixed in: 0.1.54

Steps:
1. Search this machine and project for com.jcraft:jsch (Maven), n/a: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2016-5725 being exploited?

There is no confirmed exploitation: CVE-2016-5725 is not in the CISA Known Exploited Vulnerabilities catalog. Public exploit code or a proof of concept is available. EPSS estimates a 24.14% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2016-5725?

Medium: CVSS 5.9 (v3.0, scored by NVD). Remote, no login needed. The attack needs conditions outside the attacker's control, which makes it harder.

### Which versions are affected by CVE-2016-5725?

com.jcraft:jsch \< 0.1.54.

### Is there a fix for CVE-2016-5725?

Yes. Fixed in 0.1.54. Upgrade com.jcraft:jsch to 0.1.54 or later.

### How do I check if I'm affected by CVE-2016-5725?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://access.redhat.com/errata/RHSA-2017:3115>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2016-5725>
- exploit: <https://www.exploit-db.com/exploits/40411/>
- exploit: <http://packetstormsecurity.com/files/138809/jsch-0.1.53-Path-Traversal.html>
- exploit: <https://www.exploit-db.com/exploits/40411>
- other: <http://seclists.org/fulldisclosure/2016/Sep/53>
- other: <http://www.securityfocus.com/bid/93100>
- other: <https://lists.debian.org/debian-lts-announce/2020/04/msg00017.html>
- other: <https://www.oracle.com/security-alerts/cpuoct2020.html>
- other: <https://github.com/tintinweb/pub/tree/master/pocs/cve-2016-5725>
- other: <http://www.jcraft.com/jsch/ChangeLog>
- other: <https://www.oracle.com/security-alerts/cpujan2021.html>
- other: <https://www.oracle.com/security-alerts/cpuApr2021.html>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2016-5725>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-q446-82vq-w674> (license: <https://creativecommons.org/licenses/by/4.0/>)
- Exploit-DB: Exploit metadata (ID and link only) from the Exploit Database <https://www.exploit-db.com/exploits/40411>

HTML: <https://flawdb.com/CVE-2016-5725> · JSON: <https://flawdb.com/api/v1/entries/CVE-2016-5725>
