CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



GHSA-VC8P-8PXG-RFWG

GHSA-vc8p-8pxg-rfwg: Denial of Service via Integer Overflow and Memory Exhaustion in ConnectBot SSH Client Library

Alon Barad
Alon Barad
Software Engineer

Jun 15, 2026·7 min read·5 visits

Executive Summary (TL;DR)

ConnectBot SSH library contains an integer overflow in its DER parser, allowing malformed private keys to trigger an OutOfMemoryError and crash the application.

An integer overflow and excessive memory allocation vulnerability in the Distinguished Encoding Rules (DER) private-key parser of ConnectBot SSH Client Library (connectbot/cbssh) allows a local attacker to cause a Denial of Service (DoS) via process termination. By inducing an application utilizing the library to parse a malformed DER-encoded private key file, the library attempts massive memory allocations, triggering an uncaught OutOfMemoryError on the JVM.

Vulnerability Overview

The ConnectBot SSH Client Library (commercially managed as cbssh, and distributed via Maven under org.connectbot.sshlib:sshlib) contains a denial of service vulnerability in its parser for Distinguished Encoding Rules (DER). The affected component, which resides in the cryptographic key decoding subsystem, is responsible for processing private-key files encoded in DER or PEM format. When an application attempts to load or authenticate a private key, this parser processes the file's binary ASN.1 structure to extract cryptographic material.

This implementation is exposed to local attack vectors where an application takes private-key input from users, local file paths, or untrusted external storage. If the library parses a specially crafted private key, it triggers an integer overflow and subsequently an unchecked memory allocation request. Because the parser is used during initial authentication configuration and key loading, the exposure is limited to clients and server-side components processing user-supplied key files.

The vulnerability is classified under CWE-190 (Integer Overflow or Wraparound), which propagates into CWE-770 (Allocation of Resources Without Limits or Throttling) and CWE-400 (Uncontrolled Resource Consumption). The vulnerability results in an uncaught OutOfMemoryError, terminating the Java Virtual Machine (JVM) thread or process. Standard cryptographic operations remain uncompromised, but the availability of any system executing this library is fully degraded when processing malformed inputs.

Root Cause Analysis

The underlying flaw is located within the logic used to read length indicators in the DER reader implementation (DerReader.kt). When parsing ASN.1 structures under DER rules, elements such as sequences, integers, or octet strings are preceded by an identifier byte and a length indicator. If the length indicator's most significant bit is set, it indicates a long-form length where the lower 7 bits of the initial byte specify how many subsequent bytes represent the actual length.

The vulnerable parser allowed up to 127 length octets to be read without placing a limit on the total number of bytes or the size of the accumulated value. The library accumulated these bytes into a 32-bit signed Kotlin Int accumulator. Because there was no upper bounds checking on this calculation, shifting and logical OR operations caused a signed integer overflow. Specifically, length indicators representing values larger than 2147483647 wrapped around to negative numbers or small positive values.

Furthermore, once the length was parsed, the reader immediately attempted to allocate memory for the data payload. In Kotlin and Java, allocating arrays (such as ByteArray) utilizes the parsed integer directly. Because the parser did not check whether the remaining bytes in the input stream matched or exceeded the declared length, the application attempted to allocate unbounded blocks of memory based entirely on a fabricated length header in a tiny file. This leads to an immediate JVM OutOfMemoryError.

Code Analysis

The vulnerable code in DerReader.kt processes lengths through a loop that does not validate the integer boundaries or compare the declared length to the available stream size. Before the patch was applied, the reader accumulated bytes using unchecked logical operations:

fun readLength(): Int {
    val next = data.get().toInt() and 0xFF
    if (next and 0x80 == 0) {
        return next
    } 
    val count = next and 0x7F
    var length = 0
    for (i in 0 until count) {
        val nextByte = data.get().toInt() and 0xFF
        length = (length shl 8) or nextByte
    }
    return length
}
 
fun readInteger(): ByteArray {
    val length = readLength()
    val bytes = ByteArray(length)
    data.get(bytes)
    return bytes
}

The remediation applied in version v0.3.1 addresses this issue by replacing the unchecked accumulator with a 64-bit Long variable and validating both the octet count and the calculated length against the actual buffer size. The updated code behaves as follows:

fun readLength(): Int {
    val next = data.get().toInt() and 0xFF
    if (next and 0x80 == 0) {
        return next
    }
    val count = next and 0x7F
    if (count > 4) {
        throw IOException(\"DER length octet count exceeds 4 bytes\")
    }
    var length: Long = 0L
    for (i in 0 until count) {
        val nextByte = data.get().toInt() and 0xFF
        length = (length shl 8) or nextByte.toLong()
    }
    if (length > Int.MAX_VALUE || length < 0) {
        throw IOException(\"DER length overflow or invalid negative length\")
    }
    if (length > data.remaining()) {
        throw IOException(\"DER length $length exceeds remaining input stream size\")
    }
    return length.toInt()
}

This patch completely resolves the vulnerability because it prevents integer overflow through the use of a Long accumulator, enforces a strict 4-octet ceiling on the length field, and verifies that the remaining payload size matches the declared length before triggering a heap allocation.

Exploitation Methodology

Exploitation of GHSA-vc8p-8pxg-rfwg requires that an application use the cbssh library to parse an attacker-supplied DER or PEM-encoded private key. This occurs when an end-user uploads a private SSH key to authenticate an SSH session managed by the client application. Because the parsing happens locally, the attack vector is classified as Local, and the exploit cannot be executed remotely by a malicious SSH server during a connection handshake.

To craft a proof-of-concept payload, an attacker constructs a file containing a malformed ASN.1 sequence. The header specifies an identifier tag (such as 0x02 for an ASN.1 INTEGER), followed by a multi-byte long-form length indicator. By configuring the long-form length bytes to declare an excessive value (for example, 1 GiB) while only supplying a few trailing dummy bytes, the total file size remains under 10 bytes.

The following diagram illustrates the execution flow and failure point when the vulnerable parser processes the malformed key file:

When the application reads the file and invokes decodePemPrivateKey(), the DER parser processes the length declaration and attempts to instantiate a ByteArray. This causes the JVM to seek a contiguous block of heap memory of that size. If the JVM's available heap space is smaller than the requested size, an OutOfMemoryError is immediately thrown, bypassing standard exception catches and causing a process crash.

Impact Assessment

The security impact of GHSA-vc8p-8pxg-rfwg is primarily concentrated on application availability, leading to a complete Denial of Service (DoS) for the affected thread or process. Because the error thrown is java.lang.Error (specifically java.lang.OutOfMemoryError) rather than a standard java.lang.Exception, typical try-catch blocks targeting standard exceptions do not intercept this event. This causes the error to propagate upward, terminating the active thread, or crashing the hosting process entirely.

There is no direct impact on data confidentiality or integrity. The vulnerability cannot be used to leak sensitive session tokens, read memory contents, or execute arbitrary binary code. It does not undermine the cryptographic strength of successfully negotiated SSH connections, nor does it allow authentication bypass.

According to the CVSS v4.0 calculator, the metric vector evaluates to 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, yielding a severity score of 6.8. The vulnerability is not documented in the CISA KEV catalog, and there are no reports of active exploitation in the wild.

Remediation & Mitigation Guidance

The primary remediation path is upgrading the cbssh library dependency to version v0.3.1 or higher. This release integrates the necessary bounds checks on length fields within DerReader and adds verification of physical input availability before memory is allocated. For developers using Maven or Gradle, this requires updating the dependency configuration to target the latest stable version of org.connectbot.sshlib:sshlib.

For environments where upgrading the library is not immediately feasible, specific defense-in-depth mitigations should be applied. Applications should implement strict file size validation on any user-provided key files before passing them to the parser. Since a standard RSA or EC private-key file rarely exceeds 16 kilobytes, enforcing a hard limit of 16 KB on input stream buffers blocks payloads attempting large allocations.

Additionally, standard JVM deployment hardening can reduce the impact of local Denial of Service attacks. Configuring the JVM to restart automatically upon critical failure (using flags such as -XX:+OnOutOfMemoryError to trigger recovery scripts) ensures that the service recovers quickly from a process termination. However, these configuration workarounds are secondary to applying the library patch.

Official Patches

ConnectBotRelease v0.3.1 containing the fix for DER parsing vulnerabilities

Technical Appendix

CVSS Score
6.8/ 10
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

Affected Systems

ConnectBot SSH Client Library (connectbot/cbssh) versions <= 0.3.0

Affected Versions Detail

Product
Affected Versions
Fixed Version
sshlib
ConnectBot
<= 0.3.00.3.1
AttributeDetail
CWE IDCWE-190, CWE-770, CWE-400
Attack VectorLocal (AV:L)
CVSS v4.0 Score6.8
ImpactDenial of Service (DoS)
Exploit StatusProof-of-Concept
CISA KEV StatusNot Listed

MITRE ATT&CK Mapping

T1499Endpoint Denial of Service
Impact
T1204.002User Execution: Malicious File
Execution
CWE-190
Integer Overflow or Wraparound

The software performs a calculation that can produce an integer overflow or wraparound, which is then used to specify the amount of resource to allocate, leading to memory exhaustion.

Vulnerability Timeline

Security advisory published under GHSA-vc8p-8pxg-rfwg
2026-06-12
Version v0.3.1 released with complete parsing bounds checks
2026-06-12

References & Sources

  • [1]GitHub Security Advisory GHSA-vc8p-8pxg-rfwg

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•2 days ago•CVE-2026-54068
5.9

CVE-2026-54068: Unauthenticated Server-Side Template Injection and SQLite Exfiltration in SiYuan PKM

An authentication bypass in the SiYuan personal knowledge management system before version 3.7.0 exposes a dynamic icon rendering endpoint. This endpoint processes client-supplied Go template directives. By submitting a crafted request, an unauthenticated remote attacker can leverage registered database template functions to execute arbitrary read-only SQL queries and exfiltrate workspace contents.

Amit Schendel
Amit Schendel
13 views•5 min read
•2 days ago•CVE-2026-54069
9.1

CVE-2026-54069: Authentication Bypass in SiYuan Note via Origin Header Spoofing

CVE-2026-54069 is a critical authentication bypass vulnerability in the SiYuan Note personal knowledge management system. The flaw is located in the HTTP server's middleware handling API authorization, which unconditionally trusts requests carrying a 'chrome-extension://' scheme in the Origin HTTP header, granting administrative access without validating API tokens.

Alon Barad
Alon Barad
10 views•5 min read
•2 days ago•CVE-2026-54089
9.1

CVE-2026-54089: Authentication Bypass by Spoofing in File Browser

CVE-2026-54089 is a critical authentication bypass vulnerability in File Browser affecting instances configured with proxy-based authentication. An unauthenticated remote attacker with direct network access can impersonate arbitrary users or register new accounts by spoofing configured HTTP headers.

Amit Schendel
Amit Schendel
8 views•7 min read
•2 days ago•GHSA-99J7-FHR2-XFJ4
10.0

GHSA-99J7-FHR2-XFJ4: Malicious Remote Code Execution Payload in 'exploration' Cargo Crate

The malicious Cargo package 'exploration' was uploaded to the crates.io registry. During compilation or package import, the crate executes code designed to establish an outbound TCP/HTTP connection, download an external second-stage binary, and execute the binary locally on the host machine. This creates an unauthenticated remote code execution vector impacting developer environments and continuous integration pipelines.

Amit Schendel
Amit Schendel
11 views•6 min read
•2 days ago•CVE-2026-54088
9.3

CVE-2026-54088: Pre-Authentication Remote Code Execution in File Browser Hook Authentication

CVE-2026-54088 is a critical command injection vulnerability in File Browser prior to version 2.63.6. When Hook Authentication is enabled, the application interpolates unsanitized credentials into a shell command, allowing unauthenticated remote code execution.

Alon Barad
Alon Barad
10 views•6 min read
•2 days ago•GHSA-QV4M-M73M-8HJ7
8.8

GHSA-qv4m-m73m-8hj7: Authenticated Arbitrary File Upload leading to Remote Code Execution in NotrinosERP

An authenticated remote code execution vulnerability exists in NotrinosERP (versions up to and including 1.0.0) within the Human Resource Management (HRM) module. Users with employee management permissions can upload arbitrary file types, including PHP scripts, which are written directly to a web-accessible directory. This allows for arbitrary code execution in the context of the web-server user.

Alon Barad
Alon Barad
8 views•6 min read