Junglewise Threat Intelligence

ConnectBot SSH Client Library integer overflow in DER private-key parsing

Severity: medium · CVSS 6.7 · Published 2026-06-12

Vendors: Maven.

Executive brief

The ConnectBot SSH library, used for secure remote connections, contains a flaw in how it processes private key files. An attacker can provide a specially crafted key file that causes the application to crash or run out of memory when it attempts to load the key. This results in a denial-of-service, preventing the user from accessing the application or its secure connection features.

Technical details

An integer overflow vulnerability exists in the `DerReader.readLength()` method of the ConnectBot SSH library. The parser fails to validate encoded length values before accumulating them into an `Int`, allowing for wraparound values or extremely large allocation requests. When primitive readers like `readInteger()` attempt to allocate a `ByteArray` based on these unvalidated lengths, the application may trigger an uncaught `OutOfMemoryError`. This vulnerability is triggered when an application uses the library to process attacker-supplied private keys via APIs such as `SshClient.authenticatePublicKey()`. A fix is available in version 0.3.1 which introduces strict length checks and uses `Long` for accumulation.

Affected products

  • ConnectBot sshlib <= 0.3.0

Timeline

  • 2026-06-11: disclosed
  • 2026-06-12: advisory: GitHub Advisory published
  • 2026-06-11: patched: Version 0.3.1 released

References

Related threats