Private key disclosure via raw EOFError contents
Published Jul 6, 2022 · Updated Apr 22, 2025
Information disclosure in Scott C Wang openssh-key-parser before 0.0.6 allows remote authenticated users to read private key material. The read_fixed_bytes method in pascal_style_byte_stream.py places an incomplete raw byte sequence in EOFError when a declared field length exceeds the remaining input. Exploitation requires control of a parsed key's length field and access to the resulting exception or log, exposing the remaining key bytes.
Summary
What happened
Information disclosure in Scott C Wang openssh-key-parser before 0.0.6 allows remote authenticated users to read private key material. The read_fixed_bytes method in pascal_style_byte_stream.py places an incomplete raw byte sequence in EOFError when a declared field length exceeds the remaining input. Exploitation requires control of a parsed key's length field and access to the resulting exception or log, exposing the remaining key bytes.
The record
- CVE
- CVE-2022-31124
- Published
- Jul 6, 2022
- Updated
- Apr 22, 2025
- Vendor
- Scott C Wang
- Product
- openssh-key-parser
- Classifications
- CWE-126, CWE-209, T1552.001
- Attack vector
- network
- Privileges
- authenticated
Timeline
How it unfolded
- Jul 6, 2022CVE publishedPublication date reported by the CVE source.
- Apr 22, 2025Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=< 0.0.6
What conditions does exploitation require?
What is affected?
Published CVSS scores
CVSS describes severity. EPSS estimates exploitation probability.
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
- Security review pull request #5proof of concept · demonstrated
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo