AZL-116123: CVE-2026-125658 affecting package erlang 26.2.5.21-8
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 doutf8tolistnormalize in erts/emulator/beam/erlunicode.c. When a name starts with a combining mark, such as U+0301, cleanupnorm 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:listdir/1, file:listdirall/1, file:deldirr/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:readlink/1 on a symbolic link with such a target aborts the VM with sizeobject: 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.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 27.3.4.20 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 28.5.0.9 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 29.1.3
Event History
Frequently Asked Questions
Which environments are realistically exposed?
The demonstrated issue is specific to Erlang VM operation on macOS, where file names are decoded through the affected normalization path. The available data demonstrates loss of availability only.
What does an attacker need to trigger the failure?
An attacker needs the ability to create a file-system entry with a chosen name that begins with a combining mark, such as U+0301. A symbolic link whose target has such a name can also trigger an abort when it is read.
Which operations can trigger the issue?
Processing a directory containing a crafted name through file:list_dir/1, file:list_dir_all/1, file:del_dir_r/1, or filelib:wildcard/1 can cause the VM to hang. file:read_link/1 on an affected symbolic link can abort the VM.
What can be done before patching?
Prevent untrusted parties from creating or controlling file names and symbolic-link targets in directories processed by the affected Erlang file APIs. Avoid running the listed directory operations against locations that may contain names beginning with combining marks.
How can an administrator determine whether the runtime needs an update?
The issue affects OTP releases from 17.0 before OTP 27.3.4.20, OTP 28.5.0.9, and OTP 29.1.3, corresponding to erts releases from 6.0 before 15.2.7.15, 16.4.0.8, and 17.1.2. Check the installed OTP or erts version and update to the applicable fixed release or later.