Public vulnerability disclosure

CVE-2026-54890

BEAM VM crash via integer underflow in binary_to_term BIT_BINARY_EXT decoding

publishedCWE-191CWE-789CWE-1284

Integer Underflow (Wrap or Wraparound) vulnerability in erlang otp erlang/otp (erts modules), erlang otp erts (erts modules) allows Forced Integer Overflow, Excessive Allocation. This vulnerability is associated with program files erts/emulator/beam/external.c, emulator/beam/external.c. The BIT_BINARY_EXT tag (77) handler in the External Term Format (ETF) decoder accepts an encoding with both length and trailing-bits fields set to zero. The subsequent computation of the bitstring size underflows an unsigned integer, producing a value of roughly 2^64 that is then passed as a memory allocation size. The allocator aborts the entire node with a message such as Cannot allocate 2305843009213693951 bytes of memory (of type "binary"). The crash is a VM-level abort, not an Erlang-level exception. It cannot be intercepted by supervision trees, by try/catch, or by passing the [safe] option to binary_to_term/2 (which only restricts atom creation and does not perform structural validation of binary encodings). Any application that decodes ETF from untrusted sources via binary_to_term/1,2 or enif_binary_to_term() is exposed. The Erlang distribution protocol also decodes incoming terms through the same code path, but distribution is expected to run on trusted networks per the OTP Secure Coding Guidelines (DSG-011). This issue affects OTP from OTP 27.0 before OTP 27.3.4.15, OTP 28.5.0.4, and OTP 29.0.4, corresponding to erts from 15.0 before 15.2.7.11, 16.4.0.4, and 17.0.4.

Technical severity8.2 highCVSS 4.0 · CNA: EEF
Published2026-07-27Source updated 2026-11-11
Collected2026-11-112 attributed sources

Fixes and workarounds

Workaround

Do not call binary_to_term/1,2 or enif_binary_to_term() on data from untrusted sources. The OTP Secure Coding Guidelines (DSG-011) recommend avoiding these functions altogether on untrusted input and using an alternative serialization format (for example JSON or Protocol Buffers) instead.

Source: CNA: EEF

Fix

The reporting source identifies this reference as a patch. Check the advisory for affected versions and supported release branches.

Source: CNA: EEF

Affected products and versions

Affected products, source version ranges and reporting authorities
ProductVersionsAuthority
OTP
Erlang
otp
software-id
≥ 27.0; < * (affected, otp); unaffected at 27.3.4.15; unaffected at 28.5.0.4; unaffected at 29.0.4
Other versions: unaffected
CNA: EEF
OTP
Erlang
erts
otp
≥ 15.0; < * (affected, otp); unaffected at 15.2.7.11; unaffected at 16.4.0.4; unaffected at 17.0.4
Other versions: unaffected
CNA: EEF
OTP
Erlang
erlang/otp
github
≥ 24ef4cbaeda9b9c26682cba75f2f15b0c58722aa; < dc1bf9344c0ce62717cf60866590cea0242780fd (affected, git)
Other versions: unaffected
CNA: EEF

Version ranges are source assertions. Check the vendor advisory and your installed configuration before determining exposure.

CVSS assessments

CVSS scores, vectors and reporting authorities
Version / scoreVectorAuthority
4.0 / 8.2
high
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:NCNA: EEF

Exploit evidence

No exploit evidence in collected sources. This is not proof of no exploitation.

References

For agents and automation

Read public disclosures for free as Markdown or JSON. Compatible browsers also expose native WebMCP tools to search disclosures, read this page, and discover API access.

Use the ontology-linked Cyber API with x402 pay per request, or a Y2 Pro or Elite API key with the intel:cyber scope.

Endpoints and access details

https://api.y2.dev/api/v2/cyber/cves
https://api.y2.dev/api/v2/cyber/cves/{cveId}

A workspace owner or admin can create a Pro or Elite API key. Send Authorization: Bearer <Y2_API_KEY> from your trusted agent runtime.

For x402, omit Authorization and read the HTTP 402 payment challenge before signing a retry. Public browser tools do not make payments.

Agent access JSON · OpenAPI · CVE API guide