Possible leak of key's raw field if declared length is incorrect in openssh_key_parser
Key facts
- Attack vector
- Network
- Privileges required
- Low
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Information disclosure
- Confidentiality · integrity · availability
- High · None · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-209.
Summary
openssh_key_parser is an open source Python package providing utilities to parse and pack OpenSSH private and public key files. In versions prior to 0.0.6 if a field of a key is shorter than it is declared to be, the parser raises an error with a message containing the raw field value. An attacker able to modify the declared length of a key's sensitive field can thus expose the raw value of that field. Users are advised to upgrade to version 0.0.6, which no longer includes the raw field value in the error message. There are no known workarounds for this issue.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| scottcwang | openssh_key_parser | before 0.0.6 | 0.0.6 | Patch available | CNA |
| — | openssh-key-parser (PyPI) | before 0.0.6 | 0.0.6 | Patch available | GHSA-hm37-9xh2-q499 |
- openssh_key_parser Vendorscottcwang Affected before 0.0.6 Fixed in 0.0.6 Patch available CNA
- openssh-key-parser (PyPI) Vendor— Affected before 0.0.6 Fixed in 0.0.6 Patch available GHSA-hm37-9xh2-q499
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:openssh_key_parser_project:openssh_key_parser:*:*:*:*:*:python:*:* | before 0.0.6 | Vulnerable | Openssh Key Parser Project |
- cpe:2.3:a:openssh_key_parser_project:openssh_key_parser:*:*:*:*:*:python:*:* Versions before 0.0.6 Vulnerable ·Openssh Key Parser Project
Remediation
- Fix · CNA openssh_key_parser (scottcwang) Fixed in 0.0.6
- Fix · GHSA-hm37-9xh2-q499 openssh-key-parser (PyPI) Fixed in 0.0.6 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2022-31124
- 2026-10-03 Alias added: GHSA-hm37-9xh2-q499
References
Patch 3
Advisory 2
Sources
- CVE-2022-31124 · CVE Program
- CVE-2022-31124 · NVD
- FIRST EPSS
- GHSA-hm37-9xh2-q499 · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences