CVE-2026-125658 PUBLISHED

Use after free in erts file name normalization on macOS

Assigner: EEF
Reserved: 12.11.2026 Published: 24.11.2026 Updated: 24.11.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.

Metrics

CVSS Vector: CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
CVSS Score: 5.7

Product Status

Vendor Erlang
Product OTP
Versions Default: unaffected
  • affected from 6.0 to * (excl.)
Vendor Erlang
Product OTP
Versions Default: unaffected
  • affected from 17.0 to * (excl.)
Vendor Erlang
Product OTP
Versions Default: unaffected
  • affected from 9622ab2132e2501ee5769357a914dcc6635e515c to 322b04488d9445c7258abce3e7f3bc79aa7c45d8 (excl.)

Affected Configurations

The node runs on macOS with the default utf8 file name encoding, and reads a directory listing or a symbolic link target that contains a name an attacker chose. Linux and other platforms do not normalize file names and are not affected.

Workarounds

Start the VM with the +fnl flag, for example through ERL_FLAGS. The VM then does not decode or normalize file names. This changes the result of file name functions for names outside ASCII: the VM returns each byte of the name as one Latin-1 character.

Credits

  • Sam Baud finder
  • Sam Baud reporter
  • Jonatan Männchen / EEF coordinator

References

Problem Types

  • CWE-416 Use After Free CWE

Impacts

  • An attacker who can create a file, directory or symbolic link target with a chosen name in a location that an Erlang node on macOS reads can make the VM hang or abort. The hung VM does not stop on SIGTERM.