CVE-2022-31124
MEDIUM 6.5CVSS 3.1Possible leak of key's raw field if declared length is incorrect
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.
- Published
- 6 Jul 2022
- Last modified
- 17 Jun 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Modified
- Weakness
- CWE-209
- Also known as
- GHSA-hm37-9xh2-q499PYSEC-2022-233
- Sources
- NVDJSONOSV GHSA-hm37-9xh2-q499JSONOSV PYSEC-2022-233JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| OSV | GitHub | CVSS 4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:N/SC:H/SI:N/SA:N | |
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | HIGH 7.7 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N |
| OSV | GitHub | CVSS 3.1 | HIGH 7.7 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | MEDIUM 6.5 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | MEDIUM 4.0 | AV:N/AC:L/Au:S/C:P/I:N/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | openssh_key_parser_project | openssh_key_parsercpe:2.3:a:openssh_key_parser_project:openssh_key_parser:*:*:*:*:*:python:*:* |
< 0.0.6 | 0.0.6 |
| OSV | PyPI | openssh-key-parser | < 0.0.6 | 0.0.6 |
References
- https://github.com/scottcwang/openssh_key_parser/commit/26e0a471e9fdb23e635bc3014cf4cbd2323a08d3 · Patch, Third Party Advisory, WEB, FIX
- https://github.com/scottcwang/openssh_key_parser/commit/274447f91b4037b7050ae634879b657554523b39 · Patch, Third Party Advisory, WEB, FIX
- https://github.com/scottcwang/openssh_key_parser/commit/d5b53b4b7e76c5b666fc657019dbf864fb04076c · Patch, Third Party Advisory, WEB, FIX
- https://github.com/scottcwang/openssh_key_parser/pull/5 · Exploit, Issue Tracking, Third Party Advisory, WEB
- https://github.com/scottcwang/openssh_key_parser/security/advisories/GHSA-hm37-9xh2-q499 · Third Party Advisory, WEB, ADVISORY
- https://nvd.nist.gov/vuln/detail/CVE-2022-31124 · ADVISORY
- https://github.com/pypa/advisory-database/tree/main/vulns/openssh-key-parser/PYSEC-2022-233.yaml · WEB
- https://github.com/scottcwang/openssh_key_parser · WEB
History
- 25 Nov 2026 20:34 UTC · NVD: first stored (published 6 Jul 2022)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 6 Jul 2022)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 6 Jul 2022)