CVE-2024-31497 - Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)

Severity

59%

Complexity

22%

Confidentiality

60%

In PuTTY 0.68 through 0.80 before 0.81, biased ECDSA nonce generation allows an attacker to recover a user's NIST P-521 secret key via a quick attack in approximately 60 signatures. This is especially important in a scenario where an adversary is able to read messages signed by PuTTY or Pageant. The required set of signed messages may be publicly readable because they are stored in a public Git service that supports use of SSH for commit signing, and the signatures were made by Pageant through an agent-forwarding mechanism. In other words, an adversary may already have enough signature information to compromise a victim's private key, even if there is no further use of vulnerable PuTTY versions. After a key compromise, an adversary may be able to conduct supply-chain attacks on software maintained in Git. A second, independent scenario is that the adversary is an operator of an SSH server to which the victim authenticates (for remote login or file copy), even though this server is not fully trusted by the victim, and the victim uses the same private key for SSH connections to other services operated by other entities. Here, the rogue server operator (who would otherwise have no way to determine the victim's private key) can derive the victim's private key, and then use it for unauthorized access to those other services. If the other services include Git services, then again it may be possible to conduct supply-chain attacks on software maintained in Git. This also affects, for example, FileZilla before 3.67.0, WinSCP before 6.3.3, TortoiseGit before 2.15.0.1, and TortoiseSVN through 1.14.6.

CVSS 3.1 Base Score 5.9. CVSS Attack Vector: network. CVSS Attack Complexity: high. CVSS Vector: (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N).

Demo Examples

Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)

CWE-338

Both of these examples use a statistical PRNG to generate a random number:


               
int accountID = random.nextInt();

               
int randNum = rand();

The random number functions used in these examples, rand() and Random.nextInt(), are not considered cryptographically strong. An attacker may be able to predict the random numbers generated by these functions. Note that these example also exhibit CWE-337 (Predictable Seed in PRNG).

Overview

First reported 10 months ago

2024-04-15 20:15:00

Last updated 3 months ago

2024-11-21 09:13:00

Affected Software

PuTTY

References

https://www.chiark.greenend.org.uk/~sgtatham/putty/changes.html

https://www.chiark.greenend.org.uk/~sgtatham/putty/wishlist/vuln-p521-bias.html

https://www.openwall.com/lists/oss-security/2024/04/15/6

https://filezilla-project.org/versions.php

https://tartarus.org/~simon/putty-snapshots/htmldoc/Chapter9.html#pageant-forward

https://docs.ccv.brown.edu/oscar/connecting-to-oscar/ssh/ssh-agent-forwarding/key-generation-and-agent-forwarding-with-putty

https://news.ycombinator.com/item?id=40044665

https://winscp.net/eng/news.php

https://tortoisegit.org

https://github.com/advisories/GHSA-6p4c-r453-8743

https://bugzilla.redhat.com/show_bug.cgi?id=2275183

https://bugzilla.suse.com/show_bug.cgi?id=1222864

https://security-tracker.debian.org/tracker/CVE-2024-31497

https://twitter.com/lambdafu/status/1779969509522133272

https://git.tartarus.org/?h=c193fe9848f50a88a4089aac647fecc31ae96d27&p=simon/putty.git

https://www.reddit.com/r/sysadmin/comments/1c4wmoj/putty_vulnerability_affecting_v068_to_v08/

https://github.com/daedalus/BreakingECDSAwithLLL

https://www.bleepingcomputer.com/news/security/putty-ssh-client-flaw-allows-recovery-of-cryptographic-private-keys/

https://twitter.com/CCBalert/status/1780229237569470549

https://securityonline.info/cve-2024-31497-critical-putty-vulnerability-exposes-private-keys-immediate-action-required/

FEDORA-2024-8401d42de6

FEDORA-2024-ff9a2fb31c

FEDORA-2024-0489e7ba1e

FEDORA-2024-08a4a5ead8

FEDORA-2024-cba85cc558

[oss-security] 20240415 CVE-2024-31497: Secret Key Recovery of NIST P-521 Private Keys Through Biased ECDSA Nonces in PuTTY Client

https://www.chiark.greenend.org.uk/~sgtatham/putty/changes.html

Release Notes, Vendor Advisory

https://www.chiark.greenend.org.uk/~sgtatham/putty/wishlist/vuln-p521-bias.html

Vendor Advisory

https://www.openwall.com/lists/oss-security/2024/04/15/6

Mailing List, Third Party Advisory

https://filezilla-project.org/versions.php

Release Notes

https://tartarus.org/~simon/putty-snapshots/htmldoc/Chapter9.html#pageant-forward

Product

https://docs.ccv.brown.edu/oscar/connecting-to-oscar/ssh/ssh-agent-forwarding/key-generation-and-agent-forwarding-with-putty

Product

https://news.ycombinator.com/item?id=40044665

Issue Tracking

https://winscp.net/eng/news.php

Third Party Advisory

https://tortoisegit.org

Third Party Advisory

https://github.com/advisories/GHSA-6p4c-r453-8743

Third Party Advisory

https://bugzilla.redhat.com/show_bug.cgi?id=2275183

Issue Tracking

https://bugzilla.suse.com/show_bug.cgi?id=1222864

Issue Tracking

https://security-tracker.debian.org/tracker/CVE-2024-31497

Third Party Advisory

https://twitter.com/lambdafu/status/1779969509522133272

Press/Media Coverage

https://git.tartarus.org/?h=c193fe9848f50a88a4089aac647fecc31ae96d27&p=simon/putty.git

Mailing List, Patch

https://www.reddit.com/r/sysadmin/comments/1c4wmoj/putty_vulnerability_affecting_v068_to_v08/

Press/Media Coverage

https://github.com/daedalus/BreakingECDSAwithLLL

Third Party Advisory

https://www.bleepingcomputer.com/news/security/putty-ssh-client-flaw-allows-recovery-of-cryptographic-private-keys/

Press/Media Coverage

https://twitter.com/CCBalert/status/1780229237569470549

Press/Media Coverage

https://securityonline.info/cve-2024-31497-critical-putty-vulnerability-exposes-private-keys-immediate-action-required/

Press/Media Coverage

FEDORA-2024-8401d42de6

Mailing List, Third Party Advisory

FEDORA-2024-ff9a2fb31c

Mailing List, Third Party Advisory

FEDORA-2024-0489e7ba1e

Mailing List, Third Party Advisory

FEDORA-2024-08a4a5ead8

Mailing List, Third Party Advisory

FEDORA-2024-cba85cc558

Mailing List, Third Party Advisory

[oss-security] 20240415 CVE-2024-31497: Secret Key Recovery of NIST P-521 Private Keys Through Biased ECDSA Nonces in PuTTY Client

Mailing List, Third Party Advisory

[debian-lts-announce] 20240620 [SECURITY] [DLA 3839-1] putty security update

https://www.vicarius.io/vsociety/posts/understanding-a-critical-vulnerability-in-putty-biased-ecdsa-nonce-generation-revealing-nist-p-521-private-keys-cve-2024-31497

Stay updated

ExploitPedia is constantly evolving. Sign up to receive a notification when we release additional functionality.

Get in touch

If you'd like to report a bug or have any suggestions for improvements then please do get in touch with us using this form. We will get back to you as soon as we can.