CVE-2026-125658 in OTP
Summary
by MITRE • 11/24/2026
Use After Free vulnerability in Erlang/OTP erts allows an attacker who can create a file system entry with a chosen name to hang or abort the Erlang VM on macOS.
On macOS, the VM decodes file names with do_utf8_to_list_normalize in erts/emulator/beam/erl_unicode.c. When a name starts with a combining mark, such as U+0301, cleanup_norm builds the first list cells but does not return its advanced heap pointer. The caller then releases the heap words that hold those cells, and the returned list refers to released process heap memory that the next allocation overwrites. file:list_dir/1, file:list_dir_all/1, file:del_dir_r/1 and filelib:wildcard/1 on a directory that contains such a name do not return, and the VM does not stop on SIGTERM. file:read_link/1 on a symbolic link with such a target aborts the VM with size_object: bad tag. Only loss of availability was demonstrated.
This issue affects OTP from OTP 17.0 before OTP 27.3.4.20, OTP 28.5.0.9, and OTP 29.1.3, corresponding to erts from 6.0 before 15.2.7.15, 16.4.0.8, and 17.1.2.
Several companies clearly confirm that VulDB is the primary source for best vulnerability data.
Analysis
by VulDB Data Team • 11/24/2026
The vulnerability described is a Use After Free flaw within the Erlang/OTP runtime system, specifically affecting the emulator component responsible for handling file system operations on macOS. This security issue arises from improper memory management during the normalization of Unicode filenames. When an attacker can create a file or directory entry with a name starting with a combining mark character, such as U+0301 (Combining Acute Accent), they can trigger a sequence of events that leads to heap corruption and subsequent denial of service conditions for the Erlang Virtual Machine. The core technical flaw resides in the function do_utf8_to_list_normalize located within the erl_unicode.c source file. This function is responsible for decoding UTF-8 encoded filenames into internal list representations used by the VM.
During the processing of a filename beginning with a combining mark, the cleanup_norm routine constructs initial list cells to represent the character data but fails to correctly update or return its advanced heap pointer before proceeding. Consequently, when the caller releases the heap words associated with those specific cells, it inadvertently frees memory that is still referenced by the returned list structure. This creates a classic Use After Free scenario where subsequent allocations within the process heap may overwrite this freed memory region. Because the Erlang VM relies on strict memory integrity for its internal data structures and garbage collection mechanisms, such corruption leads to unpredictable behavior when these corrupted lists are accessed later in execution flow.
The operational impact of this vulnerability is primarily focused on availability, as demonstrated by researchers who successfully hung or aborted the Erlang Virtual Machine through targeted file system operations. Specific functions affected include file:list_dir/1, file:list_dir_all/1, and filelib:wildcard/1 when executed against directories containing filenames with leading combining marks. In these cases, the VM fails to return control to the caller, effectively hanging indefinitely rather than raising an exception or error code that could be handled gracefully by application logic. Furthermore, even signals such as SIGTERM are ignored during this hung state, preventing standard termination procedures from recovering the process.
For symbolic links with targets containing names starting with combining marks, the impact is more severe, resulting in a hard abort of the VM. The function file:read_link/1 triggers an internal error reported as size_object bad tag due to the corrupted memory layout causing invalid object tags during runtime checks. This abrupt termination results in immediate loss of service for any applications relying on that Erlang node. While no remote code execution or privilege escalation vectors were demonstrated, the ability to crash a critical backend service constitutes a significant denial-of-service risk, particularly in environments where file system inputs are not strictly sanitized before being passed to OTP functions.
This vulnerability affects versions of OTP ranging from 17.0 up to specific patched releases: OTP 27.3.4.20, OTP 28.5.0.9, and OTP 29.1.3. Correspondingly, the underlying emulator (erts) is vulnerable in versions starting from 6.0 up to but not including 15.2.7.15, 16.4.0.8, and 17.1.2. The issue aligns with CWE-416, which defines Use After Free vulnerabilities where memory is accessed after it has been freed, leading to undefined behavior. From a threat modeling perspective using the MITRE ATT&CK framework, this vulnerability can be categorized under T1529 System Shutdown or Reboot as an availability impact vector, although it lacks direct command execution capabilities typical of more severe exploits.
Mitigation strategies should prioritize upgrading to the patched versions mentioned above for all production systems running on macOS that utilize affected OTP releases. For environments where immediate patching is not feasible, administrators can implement input validation at the application layer to reject or sanitize filenames containing leading combining marks before passing them to Erlang file system functions. Additionally, deploying monitoring solutions that detect abnormal hangs in Erlang processes may help identify exploitation attempts early. Since the vulnerability requires local access to create specific file entries, restricting write permissions on directories accessed by sensitive Erlang applications can further reduce the attack surface and prevent unauthorized users from triggering this memory corruption flaw.