{"id":"CVE-2022-31124","aliases":["EUVD-2022-0188","GHSA-hm37-9xh2-q499","PYSEC-2022-233"],"status":"published","title":"Possible leak of key's raw field if declared length is incorrect in openssh_key_parser","description":"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.","severity":{"version":"3.1","score":7.7,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N","level":"high","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-09","score":0.01334,"percentile":0.71364,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-209"],"published":"2022-07-06T17:30:27Z","modified":"2026-10-28T02:30:42Z","fixes":[{"ecosystem":"PyPI","package":"openssh-key-parser","fixed_in":["0.0.6"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"PyPI","package":"openssh-key-parser","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.0.6"}]}]},{"source":"osv","ecosystem":"PyPI","package":"openssh-key-parser","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.0.6"}]}],"versions":["0.0.1","0.0.2","0.0.3","0.0.4","0.0.5"]},{"source":"osv","ecosystem":"PyPI","package":"openssh-key-parser","ranges":[{"type":"GIT","events":[{"introduced":"0"},{"fixed":"d5b53b4b7e76c5b666fc657019dbf864fb04076c"},{"fixed":"26e0a471e9fdb23e635bc3014cf4cbd2323a08d3"},{"fixed":"274447f91b4037b7050ae634879b657554523b39"}]},{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.0.6"}]}],"versions":["0.0.1","0.0.2","0.0.3","0.0.4","0.0.5"]}],"products":[{"vendor":"openssh_key_parser_project","product":"openssh_key_parser"},{"vendor":"scottcwang","product":"openssh_key_parser"}],"references":[{"url":"https://github.com/scottcwang/openssh_key_parser/security/advisories/GHSA-hm37-9xh2-q499","tags":["x_refsource_CONFIRM","x_transferred","Third Party Advisory","advisory","web"]},{"url":"https://github.com/scottcwang/openssh_key_parser/pull/5","tags":["x_refsource_MISC","x_transferred","Exploit","Issue Tracking","Third Party Advisory","fix","web"]},{"url":"https://github.com/scottcwang/openssh_key_parser/commit/26e0a471e9fdb23e635bc3014cf4cbd2323a08d3","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","web"]},{"url":"https://github.com/scottcwang/openssh_key_parser/commit/274447f91b4037b7050ae634879b657554523b39","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","web"]},{"url":"https://github.com/scottcwang/openssh_key_parser/commit/d5b53b4b7e76c5b666fc657019dbf864fb04076c","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-31124","tags":["advisory"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/openssh-key-parser/PYSEC-2022-233.yaml","tags":["web"]},{"url":"https://github.com/advisories/GHSA-hm37-9xh2-q499"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/31xxx/CVE-2022-31124.json","tags":["advisory"]},{"url":"https://github.com/scottcwang/openssh_key_parser","tags":["web"]}],"sources":{"cve":[{"id":"CVE-2022-31124","title":"Possible leak of key's raw field if declared length is incorrect in openssh_key_parser","description":"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.","status":"published","published":"2022-07-06T17:30:27Z","modified":"2025-04-22T17:51:53.172Z","cvss":[{"version":"3.1","score":7.7,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N","level":"high","assessor":"cna"}],"cwes":["CWE-209"],"updated_at":"2026-11-02T14:34:35.279735Z"}],"euvd":[{"id":"EUVD-2022-0188","description":"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.","status":"published","published":"2022-07-06T17:30:27Z","modified":"2025-04-22T17:51:53Z","cvss":[{"version":"3.1","score":7.7,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N","level":"high"}],"updated_at":"2026-11-02T20:52:15.540112Z"}],"ghsa":[{"id":"GHSA-hm37-9xh2-q499","title":"Possible leak of key's raw field if declared length is incorrect","description":"### Impact\nIf 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.\n\n### Patches\nUpgrade to version 0.0.6, which no longer includes the raw field value in the error message.\n\n### Workarounds\nN/A\n\n### References\nN/A\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [openssh_key_parser](https://github.com/scottcwang/openssh_key_parser)\n","status":"published","published":"2022-07-06T19:24:12Z","modified":"2024-10-07T21:17:18Z","cvss":[{"version":"4.0","score":6.3,"vector":"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","level":"medium"},{"version":"3.1","score":7.7,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N","level":"high"}],"cwes":["CWE-209"],"updated_at":"2026-11-02T14:38:08.742903Z"}],"nvd":[{"id":"CVE-2022-31124","description":"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.","status":"published","published":"2022-07-06T18:15:19.29Z","modified":"2026-06-17T04:44:51.22Z","cvss":[{"version":"3.1","score":7.7,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N","level":"high","assessor":"secondary"},{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","level":"medium","assessor":"primary"},{"version":"2.0","score":4,"vector":"AV:N/AC:L/Au:S/C:P/I:N/A:N","level":"medium","assessor":"primary"}],"cwes":["CWE-209"],"updated_at":"2026-11-02T14:07:22.966735Z"}],"osv":[{"id":"CVE-2022-31124","title":"Possible leak of key's raw field if declared length is incorrect in openssh_key_parser","description":"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.","status":"published","published":"2022-07-06T17:30:27Z","modified":"2026-10-28T02:30:42.374755288Z","cvss":[{"version":"3.1","score":7.7,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N","level":"high"}],"cwes":["CWE-209"],"updated_at":"2026-11-02T15:44:25.516981Z"},{"id":"GHSA-hm37-9xh2-q499","title":"Possible leak of key's raw field if declared length is incorrect","description":"### Impact\nIf 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.\n\n### Patches\nUpgrade to version 0.0.6, which no longer includes the raw field value in the error message.\n\n### Workarounds\nN/A\n\n### References\nN/A\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [openssh_key_parser](https://github.com/scottcwang/openssh_key_parser)\n","status":"published","published":"2022-07-06T19:24:12Z","modified":"2024-10-07T21:25:25.797866Z","cvss":[{"version":"3.1","score":7.7,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N","level":"high"},{"version":"4.0","score":6.3,"vector":"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","level":"medium"}],"cwes":["CWE-209"],"updated_at":"2026-11-02T15:46:49.28217Z"},{"id":"PYSEC-2022-233","description":"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.","status":"published","published":"2022-07-06T18:15:00Z","modified":"2023-11-08T04:09:26.994947Z","updated_at":"2026-11-02T15:52:53.449407Z"}]}}
