CVE-2026-54697

ConnectBot SSH: Excessive allocation and integer overflow in DER private-key parsing

Published Oct 13, 2026 CVSS 4.0 · 6.7 Medium EPSS < 1% KEV · Not listed
Description
ConnectBot SSH Client Library is written in Kotlin with Kaitai Struct and KStateMachine. Prior to 0.3.1, DerReader.readLength() accepts excessive long-form DER length octets, accumulates them into an Int, and primitive readers allocate arrays without checking the declared size against the remaining input. An application or user that loads an attacker-provided private-key file through SshClient.authenticatePublicKey(), SshKeys.decodePemPrivateKey(), SshSigning.sign(), or SshSigning.getPublicKey() can trigger integer wraparound, excessive allocation, or an uncaught OutOfMemoryError. SSH server host keys and agent-forwarding messages do not use this application-supplied private-key input path. No usable weakened key and no confidentiality or integrity impact have been demonstrated. This issue is fixed in version 0.3.1.

Analysis

AI-generated

Technical impact

ConnectBot SSH Client Library accepts excessively long DER length octets in private key parsing, accumulating them into a 32‑bit integer without bounds checking. When an attacker supplies a crafted private‑key file, the library can wrap the length integer, allocate arrays larger than the available input, and ultimately trigger an OutOfMemoryError. While no confidentiality or integrity compromise has been demonstrated, the result is a denial of service that could exhaust system memory or cause the application to crash. This weakness manifests as integer overflow (CWE‑190) and improper input handling leading to out‑of‑range allocations (CWE‑789).

Affected Systems

All versions of the ConnectBot SSH client library prior to 0.3.1 are affected. The vulnerability exists in the DerReader.readLength() component of the Kotlin implementation and is triggered when SshClient.authenticatePublicKey(), SshKeys.decodePemPrivateKey(), SshSigning.sign(), or SshSigning.getPublicKey() process an attacker‑supplied key. The issue does not affect SSH server host keys or agent‑forwarding messages.

Risk and Exploitability

The CVSS score of 6.7 indicates a medium severity, and no exploitation probability metric is provided, so the real‑world exploitation probability cannot be quantified. The vulnerability is not listed in the CISA KEV catalog. The likely attack vector is either a local user who can provide a malicious private‑key file or an application that processes untrusted key files from an external source. Exploitation would lead to a denial‑of‑service condition rather than code execution or data exfiltration.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the ConnectBot SSH client library to version 0.3.1 or later in all applications that depend on it.
  • Replace any older library copies on the system to prevent accidental usage of the vulnerable component.
  • If an upgrade is temporarily infeasible, implement input validation that checks DER length fields and limits key file size before parsing to avoid integer overflow or excessive allocation.

Generated by OpenCVE AI on October 13, 2026 at 19:41 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-vc8p-8pxg-rfwg ConnectBot SSH Client Library: Excessive allocation and integer overflow in DER private-key parsing
History
Type Values Removed Values Added
First Time appeared Connectbot
Connectbot cbssh
Vendors & Products Connectbot
Connectbot cbssh
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description ConnectBot SSH Client Library is written in Kotlin with Kaitai Struct and KStateMachine. Prior to 0.3.1, DerReader.readLength() accepts excessive long-form DER length octets, accumulates them into an Int, and primitive readers allocate arrays without checking the declared size against the remaining input. An application or user that loads an attacker-provided private-key file through SshClient.authenticatePublicKey(), SshKeys.decodePemPrivateKey(), SshSigning.sign(), or SshSigning.getPublicKey() can trigger integer wraparound, excessive allocation, or an uncaught OutOfMemoryError. SSH server host keys and agent-forwarding messages do not use this application-supplied private-key input path. No usable weakened key and no confidentiality or integrity impact have been demonstrated. This issue is fixed in version 0.3.1.
Title ConnectBot SSH: Excessive allocation and integer overflow in DER private-key parsing
Weaknesses CWE-190
CWE-789
References
Metrics cvssV4_0

{'score': 6.7, 'vector': 'CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N'}

Weaknesses
  • CWE-190

    Integer Overflow or Wraparound

  • CWE-789

    Memory Allocation with Excessive Size Value

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Oct 13, 2026, 4:07 PM
Reserved
Jun 15, 2026, 10:58 PM
Status
Deferred
Published
Oct 13, 2026, 4:17 PM
Modified
Oct 16, 2026, 8:04 PM