CVE-2026-111143 in Ansilove
Summary
by MITRE • 10/15/2026
Ansilove libansilove through 1.4.2 contains an out-of-bounds read vulnerability in ansilove_xbin() in src/loaders/xbin.c that lacks bounds checks for compressed run-length records. Attackers can supply a crafted compressed XBIN file ending in a control byte such as 0x7F to read past the input buffer, crashing applications that render untrusted XBIN art.
Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.
Analysis
by VulDB Data Team • 10/15/2026
The vulnerability identified within Ansilove versions up to and including 1.4.2 represents a critical memory safety flaw located specifically within the ansilove_xbin() function found in the src/loaders/xbin.c source file. This component is responsible for parsing XBIN format files, which are often used to render ASCII art or similar visual representations derived from retro computing aesthetics. The core technical deficiency lies in the handling of compressed run-length records during the decompression process. Specifically, the implementation fails to perform adequate bounds checking when processing these compressed sequences. In a properly secured system, any attempt to read data beyond the allocated buffer boundaries should be intercepted and rejected by strict index validation logic. However, due to this omission, the parser continues to access memory locations that lie outside the intended input buffer limits.
This lack of boundary verification allows an attacker who can supply a crafted XBIN file to trigger an out-of-bounds read condition. By constructing a malicious file that ends with specific control bytes, such as 0x7F, the decompression routine is forced to interpret data in a way that causes it to fetch memory contents from addresses preceding or following the actual buffer allocation. This behavior constitutes a classic Out-of-Bounds Read vulnerability, which aligns directly with CWE-125: Out-of-bounds Read in standard security classification taxonomies. The exploitation of this flaw does not necessarily lead to arbitrary code execution immediately but results in an unstable memory state that typically manifests as application crashes or segmentation faults when the program attempts to utilize invalid data pointers or corrupted stack frames.
The operational impact of this vulnerability is primarily centered on denial of service against applications that rely on Ansilove for rendering untrusted XBIN art files. Since many tools utilizing this library may process user-uploaded content without sufficient sanitization, a remote attacker can craft a malicious file and distribute it to victims. When the victim opens or processes this file using an affected version of Ansilove, the application will crash due to the memory access violation. This disrupts service availability and can potentially be leveraged in conjunction with other vulnerabilities for more severe impacts if the leaked memory contents contain sensitive information such as cryptographic keys or session tokens, although the primary immediate effect is stability failure.
From a threat modeling perspective using the MITRE ATT&CK framework, this vulnerability facilitates initial access vectors where an attacker might use social engineering to trick users into opening malicious files, leading to system instability that can be part of broader disruption campaigns. It also relates to techniques involving invalid memory accesses which are often precursors to more complex exploitation chains in environments with weaker exploit mitigations. To mitigate this risk, developers must implement rigorous bounds checking within the ansilove_xbin() function before any read operations on compressed run-length records occur. This includes validating that all calculated offsets remain strictly within the allocated buffer size and ensuring that loop conditions prevent iteration beyond valid memory regions. Upgrading to a patched version of Ansilove where these checks are enforced is the primary remediation strategy for end-users, while developers integrating this library should ensure they adopt versions with fixed parsing logic or apply local patches to enforce strict input validation on all external file inputs processed by the XBIN loader.