{"answers":{"affected":"3 open source packages ship an affected version, including openssh-key-parser. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-31124 exists.","fix":"Upgrade openssh-key-parser to 0.0.6 or later.","what":"CVE-2022-31124 is a high-severity vulnerability in scottcwang openssh_key_parser, published on 6 Jul 2022. Any signed-in user can exploit it over the network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2022-31124 and fix it if it is affected.\n\nWhat it is: CVE-2022-31124 is a high-severity vulnerability in scottcwang openssh_key_parser, published on 6 Jul 2022. Any signed-in user can exploit it over the network, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-31124 exists.\n\nAffected packages and fixed versions:\n- openssh-key-parser (PyPI): affected all versions; fixed in 0.0.6\n- openssh-key-parser (PyPI): affected all versions; fixed in 0.0.6\n- openssh-key-parser (PyPI): affected all versions; fixed in 0.0.6\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2022-31124/ (Markdown: https://insights.sbomify.com/CVE-2022-31124/index.md)","id":"CVE-2022-31124","markdown":"https://insights.sbomify.com/CVE-2022-31124/index.md","name":"CVE-2022-31124","record":{"aliases":["GHSA-hm37-9xh2-q499","PYSEC-2022-233"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_read"],"network_reachable":"yes","non_default_config":false,"product_category":"Python OpenSSH parser","requires_auth":"low_privilege","summary":"An attacker can expose sensitive key data by manipulating declared field lengths, causing the parser to leak raw values in error messages.","user_interaction":"not_required","vuln_class":"information_disclosure"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"openssh_key_parser","vendor":"openssh_key_parser_project"}],"cvss":{"score":7.7,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N","version":"3.1"},"cwes":[{"id":"CWE-209","name":"Generation of Error Message Containing Sensitive Information"}],"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.","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"Possible leak of key's raw field if declared length is incorrect in openssh_key_parser","id":"CVE-2022-31124","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"information_disclosure","year":"2022"},"n_packages":3,"n_references":5,"next":{"headline":"Authentication Bypass in Roxy-wi","id":"CVE-2022-31125"},"packages":[{"ecosystem":"PyPI","fixed":["0.0.6"],"introduced":["0"],"last_affected":[],"package":"openssh-key-parser","purl":null,"source":"GHSA-hm37-9xh2-q499"},{"ecosystem":"PyPI","fixed":["0.0.6"],"introduced":["0"],"last_affected":[],"package":"openssh-key-parser","purl":"pkg:pypi/openssh-key-parser","source":"GHSA-hm37-9xh2-q499"},{"ecosystem":"PyPI","fixed":["0.0.6"],"introduced":["0"],"last_affected":[],"package":"openssh-key-parser","purl":"pkg:pypi/openssh-key-parser","source":"PYSEC-2022-233"}],"prev":{"headline":"Grafana plugin signature bypass vulnerability","id":"CVE-2022-31123"},"products":["openssh_key_parser"],"published":"2022-07-06","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-04-22","vendors":["scottcwang"]},"summary":"An attacker can expose sensitive key data by manipulating declared field lengths, causing the parser to leak raw values in error messages.","url":"https://insights.sbomify.com/CVE-2022-31124/"}