CVE-2026-54697: ConnectBot SSH: Excessive allocation and integer overflow in DER private-key parsing
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.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
ConnectBot SSH Client Libraryto a version that resolves this vulnerability.Fixed in 0.3.1
Event History
Frequently Asked Questions
Who is exposed to this issue?
Applications or users that load attacker-provided private-key files through SshClient.authenticatePublicKey(), SshKeys.decodePemPrivateKey(), SshSigning.sign(), or SshSigning.getPublicKey() are exposed. SSH server host keys and agent-forwarding messages do not use the affected input path.
What does an attacker need to exploit it?
The attacker needs to cause the application or user to load a crafted private-key file through one of the affected private-key APIs. The malformed DER length encoding can cause integer wraparound, excessive allocation, or an uncaught OutOfMemoryError.
What is the impact of successful exploitation?
The demonstrated impact is resource exhaustion or application failure from excessive allocation or an uncaught OutOfMemoryError. No usable weakened key or confidentiality or integrity impact has been demonstrated.
What should be done if the application processes untrusted private-key files?
Upgrade ConnectBot SSH Client Library to version 0.3.1. Until upgrading, do not pass attacker-provided private-key files to the affected authentication, decoding, signing, or public-key extraction APIs.