---
id: CVE-2026-54697
title: >-
  ConnectBot SSH Client Library is written in Kotlin with Kaitai Struct and
  KStateMachine
summary: >-
  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 a…
severity: medium
cvss: 6.7
cvssVector: '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'
cwe:
  - CWE-190
  - CWE-789
vendor: connectbot
product: cbssh
affected:
  - cbssh < 0.3.1
published: '2026-10-13'
updated: '2026-10-16'
sourceUpdated: '2026-10-16T20:04:29.760'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-54697'
references:
  - url: >-
      https://github.com/connectbot/cbssh/commit/2bb917517bec0df229a02ca768d6eae84be72df0
    label: security-advisories@github.com
  - url: 'https://github.com/connectbot/cbssh/releases/tag/v0.3.1'
    label: security-advisories@github.com
  - url: >-
      https://github.com/connectbot/cbssh/security/advisories/GHSA-vc8p-8pxg-rfwg
    label: security-advisories@github.com
tags:
  - nvd
  - cve.org
epss: 0.00125
epssPercentile: 0.02187
ssvc:
  exploitation: none
  automatable: 'no'
  technicalImpact: partial
  timestamp: '2026-10-13T16:07:40.579697Z'
cvssSource: cna
ingestedAt: '2026-10-13T16:35:46.741Z'
---

## Overview

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.

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
