Simon Tatham PuTTY up to 2010-06-01 SSH Handshake Message Length sshrsa.c/sshdss.c getstring numeric error

CVSS Meta Temp Score
CVSS is a standardized scoring system to determine possibilities of attacks. The Temp Score considers temporal factors like disclosure, exploit and countermeasures. The unique Meta Score calculates the average score of different sources to provide a normalized scoring system.
Current Exploit Price (≈)
Our analysts are monitoring exploit markets and are in contact with vulnerability brokers. The range indicates the observed or calculated exploit price to be seen on exploit markets. A good indicator to understand the monetary effort required for and the popularity of an attack.
CTI Interest Score
Our Cyber Threat Intelligence team is monitoring different web sites, mailing lists, exploit markets and social media networks. The CTI Interest Score identifies the interest of attackers and the security community for this specific vulnerability in real-time. A high score indicates an elevated risk to be targeted for this vulnerability.
7.7$0-$5k0.00

A vulnerability was found in Simon Tatham PuTTY (Connectivity Software) and classified as critical. Affected by this issue is the function getstring of the file sshrsa.c/sshdss.c of the component SSH Handshake Message Length Handler. The manipulation with an unknown input leads to a numeric error vulnerability. Using CWE to declare the problem leads to CWE-189. Impacted is confidentiality, integrity, and availability. CVE summarizes:

Integer overflow in PuTTY 0.62 and earlier, WinSCP before 5.1.6, and other products that use PuTTY allows remote SSH servers to cause a denial of service (crash) and possibly execute arbitrary code in certain applications that use PuTTY via a negative size value in an RSA key signature during the SSH handshake, which triggers a heap-based buffer overflow.

The weakness was published 07/21/2013 by Gergely Eberhardt with SEARCH-LAB Ltd. as PuTTY SSH handshake heap overflow (CVE-2013-4852) as confirmed advisory (Website). The advisory is shared for download at search-lab.hu. The public release has been coordinated with the vendor. This vulnerability is handled as CVE-2013-4852 since 07/16/2013. The exploitation is known to be difficult. The attack may be launched remotely. No form of authentication is required for exploitation. Technical details as well as a private exploit are known. The advisory points out:

(…) The bignum_from_bytes() function invoked by getstring() received a data buffer along with ist length represented by a signed integer (nbytes) and performed the following arithmetical operation before allocating memory to store he buffer: w = (nbytes + BIGNUM_INT_BYTES - 1) / BIGNUM_INT_BYTES; /* bytes->words */ result = newbn(w); If the value of nbytes was -1 (0xffffffff), the value of w would overflow to a very small positive number (depending on the value of BIGNUM_INT_BYTES), causing newbn() to reserve a very small memory area. Then a large number of bytes would be copied into the data buffer afterwards, resulting in a heap overflow. Similarly, if nbytes was chosen so that w would be -1, the newbn() function would allocate zero bytes in memory via snewn() and attempt to write the size of the Bignum (in four bytes) into the allocated zero-byte area, also resulting in a heap overflow.

It is declared as proof-of-concept. The vulnerability scanner Nessus provides a plugin with the ID 69476 (FileZilla Client < 3.7.2 SFTP Integer Overflow), which helps to determine the existence of the flaw in a target environment. It is assigned to the family Windows. The commercial vulnerability scanner Qualys is able to test this issue with plugin 166403 (OpenSuSE Security Update for Filezilla (openSUSE-SU-2013:1347-1)). The advisory illustrates:

In the standalone PuTTY client the attacker does not have precise control over the memory corruption, so this bug can only cause a local denial-of-service (crash). However, in other software that uses PuTTY code, such heap corruption could have more severe effects. Specifically in case of WinSCP, this vulnerability could potentially lead to code execution due to the exception handling employed by the program.

Upgrading to version Revision 9896 eliminates this vulnerability. The upgrade is hosted for download at svn.tartarus.org. Applying a patch is able to eliminate this problem. The bugfix is ready for download at svn.tartarus.org. The best possible mitigation is suggested to be upgrading to the latest version. A possible mitigation has been published even before and not after the disclosure of the vulnerability. The advisory contains the following remark:

This vulnerability has been fixed in the development version of PuTTY. All developers using PuTTY code are recommended to use revision 9896 or later. The potential code execution vulnerability has been addressed in WinSCP 5.1.6.

The vulnerability is also documented in the databases at X-Force (86179) and Tenable (69476). seclists.org is providing further details. Similar entries are available at 9901, 9902 and 9945.

Affected

  • PuTTY 0.62
  • WinSCP 5.1.6

Productinfo

Type

Vendor

Name

Version

License

CPE 2.3info

CPE 2.2info

CVSSv4info

VulDB CVSS-B Score: 🔍
VulDB CVSS-BT Score: 🔍
VulDB Vector: 🔍
VulDB Reliability: 🔍

CVSSv3info

VulDB Meta Base Score: 8.6
VulDB Meta Temp Score: 7.7

VulDB Base Score: 8.6
VulDB Temp Score: 7.7
VulDB Vector: 🔍
VulDB Reliability: 🔍

CVSSv2info

AVACAuCIA
💳💳💳💳💳💳
💳💳💳💳💳💳
💳💳💳💳💳💳
VectorComplexityAuthenticationConfidentialityIntegrityAvailability
unlockunlockunlockunlockunlockunlock
unlockunlockunlockunlockunlockunlock
unlockunlockunlockunlockunlockunlock

VulDB Base Score: 🔍
VulDB Temp Score: 🔍
VulDB Reliability: 🔍

NVD Base Score: 🔍

Exploitinginfo

Class: Numeric error
CWE: CWE-189
ATT&CK: Unknown

Local: No
Remote: Yes

Availability: 🔍
Access: Private
Status: Proof-of-Concept

EPSS Score: 🔍
EPSS Percentile: 🔍

Price Prediction: 🔍
Current Price Estimation: 🔍

0-Dayunlockunlockunlockunlock
Todayunlockunlockunlockunlock

Nessus ID: 69476
Nessus Name: FileZilla Client < 3.7.2 SFTP Integer Overflow
Nessus File: 🔍
Nessus Risk: 🔍
Nessus Family: 🔍

OpenVAS ID: 892736
OpenVAS Name: Debian Security Advisory DSA 2736-1 (putty - several vulnerabilities
OpenVAS File: 🔍
OpenVAS Family: 🔍

Qualys ID: 🔍
Qualys Name: 🔍

Threat Intelligenceinfo

Interest: 🔍
Active Actors: 🔍
Active APT Groups: 🔍

Countermeasuresinfo

Recommended: Upgrade
Status: 🔍

0-Day Time: 🔍

Upgrade: PuTTY Revision 9896
Patch: svn.tartarus.org

Timelineinfo

07/08/2013 🔍
07/08/2013 +0 days 🔍
07/16/2013 +8 days 🔍
07/21/2013 +5 days 🔍
08/05/2013 +15 days 🔍
08/05/2013 +0 days 🔍
08/08/2013 +3 days 🔍
08/12/2013 +4 days 🔍
08/13/2013 +1 days 🔍
08/19/2013 +6 days 🔍
05/21/2021 +2832 days 🔍

Sourcesinfo

Advisory: PuTTY SSH handshake heap overflow (CVE-2013-4852)
Researcher: Gergely Eberhardt
Organization: SEARCH-LAB Ltd.
Status: Confirmed
Confirmation: 🔍
Coordinated: 🔍

CVE: CVE-2013-4852 (🔍)
OVAL: 🔍

X-Force: 86179
Vulnerability Center: 40971 - PuTTY <=0.62 'getstring()\x27 Function Integer Overflow Allows Remote DoS, Medium
SecurityFocus: 61599 - PuTTY 'getstring()' Function Multiple Integer Overflow Vulnerabilities
Secunia: 54354 - PuTTY Multiple Integer Overflow Vulnerabilities, Moderately Critical
OSVDB: 95970

scip Labs: https://www.scip.ch/en/?labs.20161013
Misc.: 🔍
See also: 🔍

Entryinfo

Created: 08/08/2013 10:47
Updated: 05/21/2021 09:02
Changes: 08/08/2013 10:47 (95), 05/08/2017 09:03 (4), 05/21/2021 09:02 (3)
Complete: 🔍

Discussion

No comments yet. Languages: en.

Please log in to comment.

Are you interested in using VulDB?

Download the whitepaper to learn more about our service!