CVE-2024-31497
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…
Check your servers for CVE-2024-31497
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2024-31497 affects a package, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
Description
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.
Severity (CVSS)
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
- Attack vector
- network: an attacker can reach the vulnerable part over the network, often from the internet
- Attack complexity
- high: an attack depends on conditions outside the control of the attacker, such as a race
- Privileges required
- none: the attacker does not need an account
- User interaction
- none: nobody has to click or open anything
- Scope
- unchanged: the damage stays inside the vulnerable component
- Impact
- confidentiality high, integrity none, availability none: what an attacker can read (confidentiality), change (integrity) or stop (availability)
Exploitation
EPSS 5.73%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 93.2% of all scored CVEs. Scores of 1 Dec 2026.
The assessment of CISA (SSVC, 19 Apr 2024):
- Exploitation
- none: CISA did not find evidence of exploitation or a public proof of concept
- Automatable
- no: each attack takes manual steps
- Technical impact
- partial: limited control or limited data
Weakness
- CWE-338 Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
|
n/a
n/a
|
affected all versions
|
Is my server affected?
Find the installed version of the package (replace PACKAGE with its name) and compare it with the fixed version of your distribution. Distributions often fix a CVE in a package version of their own, so the version number of the upstream project can mislead.
Debian, Ubuntu
dpkg -l | grep -i PACKAGE
# packages whose changelog names the CVE (fixed in the installed version)
zgrep -l CVE-2024-31497 /usr/share/doc/*/changelog.Debian.gz
# Ubuntu
pro fix CVE-2024-31497RHEL, Rocky, Alma, Fedora
rpm -q PACKAGE
# lists the advisory while the fix is not installed
dnf updateinfo list --cve CVE-2024-31497Alpine
apk list --installed | grep -i PACKAGEWith Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2024-31497
trivy image --scanners vuln IMAGE | grep CVE-2024-31497
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Advisories
- FEDORA-2024-8401d42de6 lists.fedoraproject.org · vendor advisory
- FEDORA-2024-ff9a2fb31c lists.fedoraproject.org · vendor advisory
- FEDORA-2024-0489e7ba1e lists.fedoraproject.org · vendor advisory
- FEDORA-2024-08a4a5ead8 lists.fedoraproject.org · vendor advisory
- FEDORA-2024-cba85cc558 lists.fedoraproject.org · vendor advisory
Other references
- https://www.chiark.greenend.org.uk/~sgtatham/putty/changes.html chiark.greenend.org.uk
- https://filezilla-project.org/versions.php filezilla-project.org
- https://www.chiark.greenend.org.uk/~sgtatham/putty/wishlist/vuln-p521-bias.html chiark.greenend.org.uk
- https://www.openwall.com/lists/oss-security/2024/04/15/6 openwall.com
- https://tartarus.org/~simon/putty-snapshots/htmldoc/Chapter9.html#pageant-forward tartarus.org
- https://docs.ccv.brown.edu/oscar/connecting-to-oscar/ssh/ssh-agent-forwarding/key-generation-and-agent-forwarding-with-putty docs.ccv.brown.edu
- https://news.ycombinator.com/item?id=40044665 news.ycombinator.com
- https://winscp.net/eng/news.php winscp.net
- https://tortoisegit.org tortoisegit.org
- https://github.com/advisories/GHSA-6p4c-r453-8743 github.com
- https://bugzilla.redhat.com/show_bug.cgi?id=2275183 bugzilla.redhat.com
- https://bugzilla.suse.com/show_bug.cgi?id=1222864 bugzilla.suse.com
15 more
- https://security-tracker.debian.org/tracker/CVE-2024-31497 security-tracker.debian.org
- https://twitter.com/lambdafu/status/1779969509522133272 twitter.com
- https://git.tartarus.org/?h=c193fe9848f50a88a4089aac647fecc31ae96d27&p=simon/putty.git git.tartarus.org
- https://www.reddit.com/r/sysadmin/comments/1c4wmoj/putty_vulnerability_affecting_v068_to_v08/ reddit.com
- https://github.com/daedalus/BreakingECDSAwithLLL github.com
- https://www.bleepingcomputer.com/news/security/putty-ssh-client-flaw-allows-recovery-of-cryptographic-private-keys/ bleepingcomputer.com
- https://twitter.com/CCBalert/status/1780229237569470549 twitter.com
- https://securityonline.info/cve-2024-31497-critical-putty-vulnerability-exposes-private-keys-immediate-action-required/ securityonline.info
- [oss-security] 20240415 CVE-2024-31497: Secret Key Recovery of NIST P-521 Private Keys Through Biased ECDSA Nonces… openwall.com · mailing list
- [debian-lts-announce] 20240620 [SECURITY] [DLA 3839-1] putty security update lists.debian.org · mailing list
- 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 vicarius.io
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/PUOTQVGC4DISVHQGSPUYGXO6TLDK65LA/ lists.fedoraproject.org
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/IZS3B37GNGWOOV7QU7B7JFK76U4TOP4V/ lists.fedoraproject.org
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/WMJH7M663BVO3SY6MFAW2FAZWLLXAPRQ/ lists.fedoraproject.org
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/MMHILY2K7HQGQRHOC375KRRG2M6625RD/ lists.fedoraproject.org
Source: the record CVE-2024-31497 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse