
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-54697 is an integer overflow and excessive memory allocation vulnerability in the ConnectBot SSH Client Library (org.connectbot.sshlib:sshlib) affecting all versions up to and including 0.3.0. The flaw resides in the DER private-key parser, which fails to safely validate encoded length values before converting them to Int values or allocating arrays, enabling a malformed private-key file to trigger an uncaught OutOfMemoryError and potentially terminate the application process. It was published on June 11, 2026, and patched in version 0.3.1. The vulnerability carries a CVSS v4 base score of 6.7 (Moderate) (GitHub Advisory, GHSA).
The root cause is classified under CWE-190 (Integer Overflow or Wraparound) and CWE-789 (Memory Allocation with Excessive Size Value). The vulnerable code in DerReader.readLength() accumulated up to 127 length octets into a Kotlin Int using bitwise shifts (length = (length shl 8) or nextByte), allowing values such as 0x1_0000_0001 to wrap to 1 or 0x8000_0000 to wrap to Int.MIN_VALUE. Primitive readers like readInteger() then allocated byte arrays directly from the (potentially overflowed) length value without first checking it against the remaining input (val bytes = ByteArray(length); data.get(bytes)). Exploitation requires a user or application to load an attacker-supplied private-key file through APIs such as SshClient.authenticatePublicKey(), SshKeys.decodePemPrivateKey(), SshSigning.sign(), or SshSigning.getPublicKey(); the vulnerability is not reachable via SSH server host keys or agent-forwarding (GitHub Advisory).
Successful exploitation results in an availability impact only — there is no demonstrated confidentiality or integrity impact. A malformed private-key file can cause incorrect DER length interpretation due to integer wraparound, trigger excessive memory allocation, and produce an uncaught OutOfMemoryError that is not caught by the public-key authentication error handler, potentially terminating the entire application process. For example, a six-byte DER value declaring a 1 GiB INTEGER caused an immediate OutOfMemoryError in testing with a constrained JVM heap (GitHub Advisory).
0x8000_0000 to wrap to Int.MIN_VALUE) or declares an extremely large allocation (e.g., a 1 GiB INTEGER in six bytes).sshlib ≤ 0.3.0) to load the malformed key through one of the vulnerable APIs: SshClient.authenticatePublicKey(), SshKeys.decodePemPrivateKey(), SshSigning.sign(), or SshSigning.getPublicKey().ByteArray of the overflowed or excessively large length, triggering an OutOfMemoryError that is not caught by the authentication error handler, terminating the application process (GitHub Advisory).java.lang.OutOfMemoryError originating from DerReader.readLength(), DerReader.readInteger(), or related DER parsing stack frames within the org.connectbot.sshlib package.The fix is available in org.connectbot.sshlib:sshlib version 0.3.1, released June 11, 2026. The patched DER parser rejects indefinite lengths, limits long-form lengths to four octets and values above Int.MAX_VALUE, accumulates lengths in a Long before converting to Int, validates declared lengths against remaining input before allocation, and rejects zero-length and non-canonical encodings. No configuration-based workaround is available; upgrading to version 0.3.1 is the only remediation. Applications should also ensure private-key files are sourced only from trusted locations to reduce the attack surface (GitHub Advisory, Release v0.3.1).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."