Skip to content
OpenAdvisories
Medium · 5.9 Public exploit CVE-2016-5725 EUVD-2022-4872GHSA-q446-82vq-w674

Improper Limitation of a Pathname to a Restricted Directory in JCraft JSch

Published Jan 19, 2017 · Updated Aug 6, 2024 · Assigned by mitre

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.

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 jsch 0.1.54-1 —
Debian 13 jsch 0.1.54-1 —
Debian 12 jsch 0.1.54-1 —
Debian 8 jsch 0.1.51-1+deb8u1 DLA-2184-1
Debian 7 jsch 0.1.42-2+deb7u1 DLA-611-1
ReleasePackageFixed inAdvisory
SUSE Manager Server 3.0 jsch 0.1.54-3.1 SUSE-SU-2017:0715-1

Public exploits

Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.

Third-party code, not reviewed by us. Public PoCs are sometimes fake or contain malware. Read the code first and run it only in an isolated lab, against systems you are authorised to test.

Exploit-DB 1

Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.

Affected packages

EcosystemPackageAffectedFixedRecord
Maven com.jcraft:jsch < 0.1.54 0.1.54 GHSA-q446-82vq-w674

Advisories 4

References