# MA-1067.042024: MyCERT Advisory - PuTTY SSH Client Vulnerable to Key Recovery Attack

**Date:** 23 Apr 2024  
**Source:** https://www.mycert.org.my/portal/advisory?id=MA-1067.042024  
**Advisory ID:** MA-1067.042024

---

**1.0 Introduction**
Recently PuTTY Secure Shell (SSH) and Telnet client are alerting users a significant vulnerability, known as CVE-2024-31497, impacts the PuTTY SSH client. This vulnerability arises from a flaw in generating ECDSA nonces when utilizing the NIST P-521 elliptic curve. This flaw allows attackers to potentially retrieve private keys by observing a limited number of ECDSA signatures.
**2.0 Impact**
The vulnerability results in the compromise of the private key is with just a few dozen signed messages and the public key, an attacker can retrieve the private key, enabling them to forge signatures as if they were from you. This allows them, for example, to log in to any servers where you have employed that key for authentication. To acquire these signatures, an attacker only needs temporary access to any server you authenticate with the key or brief moment with a copy of Pageant holding key. (However, these signatures are not accessible to passive eavesdroppers of SSH connections.)
**3.0 Affected Products**
- PuTTY versions before 0.81.
- FileZilla versions from 3.24.1 to 3.66.5.
- WinSCP versions from 5.9.5 to 6.3.2.
- TortoiseGit versions from 2.4.0.2 to 2.15.0.
- TortoiseSVN versions from 1.10.0 to 1.14.6.
**4.0 Recommendations**
CyberSecurity Malaysia recommends system administrators review this advisory and take the below recommended mitigations:
- Update your software: Immediately update PuTTY to version 0.81 or later. Do the same for FileZilla (version 3.67.0), WinSCP (version 6.3.3), TortoiseGit (version 2.15.0.1) and TortoiseSVN. If you can’t update TortoiseSVN, switch to using the updated PuTTY Plink for SSH connections.
- Identify Vulnerable Keys: Check if you use ECDSA NIST P -521 keys. In PuTTYgen, the fingerprint starts with “ecdsa-sha2-nistp521”.
- Revoke the Compromised Keys: Remove the compromised public keys from all authorized\_keys files on servers and any online service where they are used.
- Generate New Keys: Create fresh key pairs (ideally using Ed25519, which is unaffected) to replace the compromised ones.
- Ensure systems, applications and third-party add-ons are updated with the latest upgrades and security patches. If you are running older versions of operating systems or software, upgrade it to the newest version, as older versions are vulnerable and easily manipulated by intruders. Also, patch your web-based applications and network-based appliances accordingly.
- Refer to your respective vendors' websites for the latest patches, service packs and upgrades. Otherwise, you may also refer to MyCERT’s website for the latest advisories on patches, service packs and upgrades as below:
- <https://www.mycert.org.my/portal/advisories?id=431fab9c-d24c-4a27-ba93-e92edafdefa5>
- Update the Anti-virus software running on hosts and email gateways with the latest signature files and ensure the settings to scan all files are enabled.
- Configure systems properly to avoid incidents such as information disclosure and directory listing due to system misconfiguration.
- Always enable logging systems and server activities and keep them in a sufficient period.
- Backup critical information regularly to limit the impact of data or system loss and to help expedite the recovery process. Ideally, backup daily on a separate media and store offline at an alternate site.
- Organisations are recommended to apply an defence in-depth strategy in protecting their networks. Firewalls, intrusion prevention systems (IPS), and network and host-based intrusion detection systems (IDS) can prevent and log most generic attacks.
- Data Centres and Web Hosting Companies should beware of any software or third-party add-ons they are running by applying the latest patches or upgrades to prevent intrusions that may exploit unpatched applications.
- Organisations must ensure the contact information of System Administrators is made available in the event of a security incident at or originating from your site.
- Financial Institutions must be vigilant against any possibilities of phishing and fraudulent activities that target Internet banking. Customers must be advised adequately to avoid becoming victims of these scams by applying safe browsing, email, and Internet banking practices.
- System Administrators must immediately report any suspicious activities they observe in systems and networks under their administrations to relevant authorities and seek assistance. Incidents can be reported to the Cyber999 Incident Response Centre through our reporting channels, as listed at the end of the page, and we will respond accordingly. To report any critical incident, call Cyber999 via the 24x7 On Call Incident Reporting channel.
Generally, CyberSecurity Malaysia advises the users of this devices to be updated with the latest security announcements by the vendor and follow best practice security policies to determine which updates should be applied.
For further enquiries, please contact us through the following channels:
E-mail: cyber999[at]cybersecurity.my 
Phone: 1-300-88-2999 (monitored during business hours)  
Mobile: +60 19 2665850 (24x7 call incident reporting) 
Business Hours: Mon - Fri 08:30 -17:30 MYT 
Web: [https://www.mycert.org.my](https://www.mycert.org.my/) 
**5.0 References**
- <https://cert.europa.eu/publications/security-advisories/2024-039/>
- <https://www.chiark.greenend.org.uk/~sgtatham/putty/wishlist/vuln-p521-bias.html>
- <https://securityonline.info/cve-2024-31497-critical-putty-vulnerability-exposes-private-keys-immediate-action-required/?expand_article=1>
- <https://www.openwall.com/lists/oss-security/2024/04/15/6>
- <https://nvd.nist.gov/vuln/detail/CVE-2024-31497>
- <https://www.bleepingcomputer.com/news/security/putty-ssh-client-flaw-allows-recovery-of-cryptographic-private-keys/>