J-Security Center

Title: scp File Create/Overwrite Vulnerability

Severity: MODERATE

Description:

A vulnerability exists in the 1.2.x releases of scp which, if properly exploited using a modified scp binary on the server end, can permit the remote server to spoof local pathnames and overwrite files belonging to the local user.

For example, following the command

scp user@remotehost:/somefile /home/user/newfile

the modified server on the remote machine maliciously sends the filename as ../../etc/passwd

the local user's scp program will then write the data to

/home/user/../../etc/passwd

(which is the same as /etc/passwd)

Note that the target file can only be overwritten if the local user has write access to it. As a result, it remains inadvisable to run scp as root.

This vulnerability applies to 1.2.x versions of ssh on the remote machine, irrespective of the version running as the client.

ssh-2.x on the remote employs a different protocol and as a result is reportedly not vulnerable to this bug.

Affected Products:

  • Debian Linux 2.2.0
  • Debian Linux 2.2.0 68k
  • Debian Linux 2.2.0 alpha
  • Debian Linux 2.2.0 arm
  • Debian Linux 2.2.0 powerpc
  • Debian Linux 2.2.0 sparc
  • Helsinki University of Technology ssh 1.2.14
  • Helsinki University of Technology ssh 1.2.15
  • Helsinki University of Technology ssh 1.2.16
  • Helsinki University of Technology ssh 1.2.17
  • Helsinki University of Technology ssh 1.2.18
  • Helsinki University of Technology ssh 1.2.19
  • Helsinki University of Technology ssh 1.2.20
  • Helsinki University of Technology ssh 1.2.21
  • Helsinki University of Technology ssh 1.2.22
  • Helsinki University of Technology ssh 1.2.23
  • Helsinki University of Technology ssh 1.2.24
  • Helsinki University of Technology ssh 1.2.25
  • Helsinki University of Technology ssh 1.2.26
  • Helsinki University of Technology ssh 1.2.27
  • OpenBSD OpenSSH 1.2.0
  • OpenBSD OpenSSH 1.2.3

Juniper Networks provides this content via a wide variety of sources and production methods. If notified of errors or omissions in the content of this page, Juniper Networks, at its discretion, will modify or remove the page or leave the content as is, depending on various factors including but not limited to the reputation and authority of the party providing the notification. Please use the contact information displayed elsewhere on this page to report any errors or omissions regarding the content on this page.