LiveActive security incident?Get immediate response
CVE Record

CVE-2022-31124: Possible leak of key's raw field if declared length is incorrect in openssh_key_parser

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.

HighCVSS 7.7Not KEV-listedUpdated
Glexia's TakeAutomated analysishigh

Security readout for executives and security teams

Plain-English summary

A bug in openssh_key_parser can reveal sensitive key data in an error message when a malformed key claims a field is longer than it really is. The risk is confidentiality loss, especially where parsing errors are logged or returned. The advisory says upgrade to 0.0.6; no workaround is listed.

Executive priority

Treat this as a targeted confidentiality issue, not a broad infrastructure emergency. Prioritize environments where this package processes user-supplied key material or where errors are exposed beyond trusted operators. Upgrade is straightforward and should be handled in the next dependency remediation cycle.

Technical view

Versions before 0.0.6 mishandle key fields whose actual length is shorter than the declared length, raising an exception that includes the raw field value. This is CWE-209, information exposure through an error message. CVSS 3.1 is 7.7, with high confidentiality impact and no integrity or availability impact stated.

Likely exposure

Exposure is limited to systems using the Python openssh_key_parser package before 0.0.6, especially services or automation that parse OpenSSH key files from users or lower-trust sources and expose parser errors through logs, APIs, or support diagnostics.

Exploitation context

The supplied sources do not show known active exploitation, and KEV is false. Exploitation requires an actor able to modify a key field's declared length and observe the resulting error message or a place where that error is captured.

Researcher notes

The advisory and commits indicate the fix removes raw field values from error messages. Evidence supports information disclosure only; the supplied sources do not claim code execution, privilege escalation, data modification, or availability impact. Validate both vulnerable dependency presence and error-message observability.

Mitigation direction

  • Upgrade openssh_key_parser to version 0.0.6 or later.
  • Check vendor guidance before relying on any alternative mitigation.
  • Avoid exposing parser exception text to users or shared logs.
  • Review logs for historical leakage of key material from parser errors.

Validation and detection

  • Inventory dependencies for openssh_key_parser versions below 0.0.6.
  • Identify applications that parse OpenSSH keys from untrusted or user-controlled sources.
  • Confirm error handling does not return raw parser exceptions to callers.
  • Review logs and monitoring sinks for sensitive key values in exception messages.
Prepared
Confidence
high
Sources
7

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · medium confidence lookup

CWE-209: Information exposure and cloud metadata lookup

Information exposure and SSRF weaknesses can make discovery, cloud metadata, and credential material review relevant. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2022-31124 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
High
CVSS
7.7 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
0Timeline events
0ADP providers
6Source links

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
7.7CVSS 3.1HighCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N3.14Primary CVE score

Vulnerability scoring details

Base CVSS 3.1 score

7.7High
CVSS 3.1 vector shape for CVE-2022-31124Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone
Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
scottcwangopenssh_key_parser< 0.0.6Listed
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-209 · source CWE mapping

Generation of Error Message Containing Sensitive Information

Generation of Error Message Containing Sensitive Information represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.