CVE-2026-135272 in Kotlinx-io
Summary
by MITRE • 11/23/2026
In JetBrains Kotlinx-io before 0.9.3 information disclosure was possible via partial file writes on Node.js
Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.
Analysis
by VulDB Data Team • 11/23/2026
The vulnerability identified in JetBrains kotlinx-io prior to version 0.9.3 represents a critical flaw within the library's implementation of asynchronous input and output operations specifically targeting the Node.js runtime environment. This issue stems from an improper handling of stream buffering and write completion mechanisms, which allows for partial file writes under specific concurrency conditions. In standard Java-based implementations of kotlinx-io, the abstraction layer typically ensures atomicity or consistent state management through synchronized blocks or thread-safe queues. However, when transpiled to JavaScript for Node.js execution, these guarantees are not automatically preserved due to the single-threaded event loop model and the asynchronous nature of file system operations in that environment. The core technical flaw lies in how the library manages internal buffers during write operations. When multiple write requests are queued or processed concurrently without adequate synchronization primitives specific to the JavaScript runtime, the underlying file descriptor may receive data segments out of order or incomplete relative to the intended logical stream structure. This results in a state where only a portion of the expected data is persisted to disk while other parts remain in memory buffers that have not yet been flushed or committed.
This behavior leads directly to an information disclosure vulnerability, classified under CWE-200 as Exposure of Sensitive Information to an Unauthorized Actor. The severity of this issue depends heavily on the context in which kotlinx-io is utilized by application developers. If the library is employed for writing sensitive configuration files, user data logs, or temporary storage containing personally identifiable information, a partial write can result in corrupted files that fail validation checks, potentially causing application crashes or unexpected behavior. More critically, if an attacker can influence the timing of these operations through race conditions or by manipulating input streams to trigger specific edge cases in the buffer management logic, they may be able to observe intermediate states or access data that was intended to be written atomically but was instead split across multiple incomplete writes. In some scenarios, this could allow for side-channel attacks where the partial state of a file provides clues about its contents before it is fully overwritten or closed, although the primary risk remains data integrity and potential exposure if temporary files are not securely managed.
From an operational perspective, the impact manifests as both reliability degradation and security compromise. Applications relying on kotlinx-io for high-throughput I/O operations may experience silent data corruption where written records are truncated or malformed. This can lead to downstream failures in systems that parse these files, such as databases importing CSV exports or services reading JSON configurations. The information disclosure aspect arises because the partial write mechanism does not guarantee that sensitive data is fully isolated from other processes or users who might access the file system during the window of incomplete persistence. For instance, if a temporary file containing session tokens or API keys is partially written and then accessed by another process before completion, those credentials could be exposed. This aligns with ATT&CK technique T1005, which covers Data from Local System, as it involves accessing data stored locally on the system without necessarily gaining full control over the host machine but rather exploiting a flaw in how that local data is managed and persisted.
Mitigation strategies for this vulnerability are straightforward given its resolution status. The primary remediation step is to upgrade the kotlinx-io dependency to version 0.9.3 or any later release where JetBrains has addressed these concurrency issues specific to the Node.js backend implementation. Developers should verify their build configurations, such as Gradle or Maven dependencies, to ensure that no older versions are being pulled in transitively by other libraries. In addition to upgrading, organizations should implement strict file permission policies for temporary directories used by applications running on Node.js, ensuring that files created during write operations have restrictive access controls like umask settings set to 077 or similar values to prevent unauthorized reading of partial data. Furthermore, adopting a pattern where sensitive data is written to a temporary location and then atomically moved to its final destination can provide an additional layer of defense against race conditions, although the library update remains the definitive fix for this specific implementation flaw within kotlinx-io itself.