{"containers":{"cna":{"affected":[{"cpes":["cpe:2.3:a:erlang:erlang\\/otp:*:*:*:*:*:*:*:*"],"defaultStatus":"unknown","packageName":"erts","packageURL":"pkg:otp/erts?repository_url=https:%2F%2Fgithub.com%2Ferlang%2Fotp&vcs_url=git%2Bhttps:%2F%2Fgithub.com%2Ferlang%2Fotp.git","product":"OTP","repo":"https://github.com/erlang/otp","vendor":"Erlang","versions":[{"changes":[{"at":"15.2.7.15","status":"unaffected"},{"at":"16.4.0.8","status":"unaffected"},{"at":"17.1.2","status":"unaffected"}],"lessThan":"*","status":"affected","version":"6.0","versionType":"otp"}]},{"cpes":["cpe:2.3:a:erlang:erlang\\/otp:*:*:*:*:*:*:*:*"],"defaultStatus":"unknown","packageName":"otp","packageURL":"pkg:software-id/erlang.org/otp","product":"OTP","vendor":"Erlang","versions":[{"changes":[{"at":"27.3.4.20","status":"unaffected"},{"at":"28.5.0.9","status":"unaffected"},{"at":"29.1.3","status":"unaffected"}],"lessThan":"*","status":"affected","version":"17.0","versionType":"otp"}]},{"collectionURL":"https://github.com","cpes":["cpe:2.3:a:erlang:erlang\\/otp:*:*:*:*:*:*:*:*"],"defaultStatus":"unknown","packageName":"erlang/otp","packageURL":"pkg:github/erlang/otp","product":"OTP","repo":"https://github.com/erlang/otp","vendor":"Erlang","versions":[{"lessThan":"e5a9d3d141b8b5609803c3b78c8b420cd294ca82","status":"affected","version":"84adefa331c4159d432d22840663c38f155cd4c1","versionType":"git"},{"lessThan":"*","status":"unaffected","version":"e5a9d3d141b8b5609803c3b78c8b420cd294ca82","versionType":"git"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:a:erlang:erlang\\/otp:*:*:*:*:*:*:*:*","versionEndExcluding":"27.3.4.20","vulnerable":true},{"criteria":"cpe:2.3:a:erlang:erlang\\/otp:*:*:*:*:*:*:*:*","versionEndExcluding":"28.5.0.9","versionStartIncluding":"28.0","vulnerable":true},{"criteria":"cpe:2.3:a:erlang:erlang\\/otp:*:*:*:*:*:*:*:*","versionEndExcluding":"29.1.3","versionStartIncluding":"29.0","vulnerable":true}],"negate":false,"operator":"OR"}],"operator":"AND"}],"credits":[{"lang":"en","type":"finder","value":"Sungho Park"},{"lang":"en","type":"reporter","value":"Sungho Park"},{"lang":"en","type":"coordinator","value":"Ingela Anderton Andin"},{"lang":"en","type":"coordinator","value":"Jonatan Männchen / EEF"},{"lang":"en","type":"remediation developer","value":"Sverker Eriksson"}],"dateAssigned":"2026-10-28T15:30:45.000Z","datePublic":"2026-11-24T15:08:18.000Z","descriptions":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<p>Out-of-bounds Write vulnerability in the external term format decoder in Erlang OTP erts allows an attacker who controls the input to <code>binary_to_term/1,2</code> to abort the Erlang VM via a <code>NEWER_REFERENCE_EXT</code> term with a zero-length ID. <code>decoded_size</code> in <code>erts/emulator/beam/external.c</code> accepts a reference whose 16-bit <code>Len</code> field is zero, but <code>dec_term</code> always reads one ID word. <code>dec_term</code> then runs 4 bytes ahead of the position that <code>decoded_size</code> validated. It decodes the bytes that follow as terms that were never sized, and writes past the reserved process heap.</p>\n<p>The abort takes down every process on the node. Supervision, <code>try</code>/<code>catch</code> and the <code>safe</code> option do not prevent it. <code>enif_binary_to_term()</code> and the distribution protocol reach the same decoder, and distribution is assumed to run on trusted networks only. <code>NEW_REFERENCE_EXT</code> also accepts a zero length, but its range check on the first ID word rejects the shifted input. On 32-bit builds, a zero-length reference of either type at the end of the input, followed by trailing bytes, can write one word past the reserved heap.</p>\n<p>This issue affects OTP from OTP&nbsp;17.0 before OTP&nbsp;27.3.4.20, OTP&nbsp;28.5.0.9, and OTP&nbsp;29.1.3, corresponding to erts from 6.0 before 15.2.7.15, 16.4.0.8, and 17.1.2. Whether OTP before OTP&nbsp;17.0, corresponding to erts before 6.0, is affected is unknown.</p>"},{"base64":false,"type":"text/markdown","value":"Out-of-bounds Write vulnerability in the external term format decoder in Erlang OTP erts allows an attacker who controls the input to `binary_to_term/1,2` to abort the Erlang VM via a `NEWER_REFERENCE_EXT` term with a zero-length ID. `decoded_size` in `erts/emulator/beam/external.c` accepts a reference whose 16-bit `Len` field is zero, but `dec_term` always reads one ID word. `dec_term` then runs 4 bytes ahead of the position that `decoded_size` validated. It decodes the bytes that follow as terms that were never sized, and writes past the reserved process heap.\n\nThe abort takes down every process on the node. Supervision, `try`/`catch` and the `safe` option do not prevent it. `enif_binary_to_term()` and the distribution protocol reach the same decoder, and distribution is assumed to run on trusted networks only. `NEW_REFERENCE_EXT` also accepts a zero length, but its range check on the first ID word rejects the shifted input. On 32-bit builds, a zero-length reference of either type at the end of the input, followed by trailing bytes, can write one word past the reserved heap.\n\nThis 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. Whether OTP before OTP 17.0, corresponding to erts before 6.0, is affected is unknown."}],"value":"Out-of-bounds Write vulnerability in the external term format decoder in Erlang OTP erts allows an attacker who controls the input to binary_to_term/1,2 to abort the Erlang VM via a NEWER_REFERENCE_EXT term with a zero-length ID. decoded_size in erts/emulator/beam/external.c accepts a reference whose 16-bit Len field is zero, but dec_term always reads one ID word. dec_term then runs 4 bytes ahead of the position that decoded_size validated. It decodes the bytes that follow as terms that were never sized, and writes past the reserved process heap.\n\nThe abort takes down every process on the node. Supervision, try/catch and the safe option do not prevent it. enif_binary_to_term() and the distribution protocol reach the same decoder, and distribution is assumed to run on trusted networks only. NEW_REFERENCE_EXT also accepts a zero length, but its range check on the first ID word rejects the shifted input. On 32-bit builds, a zero-length reference of either type at the end of the input, followed by trailing bytes, can write one word past the reserved heap.\n\nThis 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. Whether OTP before OTP 17.0, corresponding to erts before 6.0, is affected is unknown."}],"impacts":[{"capecId":"CAPEC-100","descriptions":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<p>An attacker who can supply bytes to <code>binary_to_term/1,2</code> or <code>enif_binary_to_term()</code> can abort the Erlang VM and stop every application on the node.</p>"},{"base64":false,"type":"text/markdown","value":"An attacker who can supply bytes to `binary_to_term/1,2` or `enif_binary_to_term()` can abort the Erlang VM and stop every application on the node."}],"value":"An attacker who can supply bytes to binary_to_term/1,2 or enif_binary_to_term() can abort the Erlang VM and stop every application on the node."}]}],"metrics":[{"cvssV4_0":{"Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","Safety":"NOT_DEFINED","attackComplexity":"LOW","attackRequirements":"NONE","attackVector":"LOCAL","baseScore":7,"baseSeverity":"HIGH","privilegesRequired":"NONE","providerUrgency":"NOT_DEFINED","subAvailabilityImpact":"NONE","subConfidentialityImpact":"NONE","subIntegrityImpact":"NONE","userInteraction":"NONE","valueDensity":"NOT_DEFINED","vectorString":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:H/SC:N/SI:N/SA:N","version":"4.0","vulnAvailabilityImpact":"HIGH","vulnConfidentialityImpact":"LOW","vulnIntegrityImpact":"NONE","vulnerabilityResponseEffort":"NOT_DEFINED"},"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}]}],"problemTypes":[{"descriptions":[{"cweId":"CWE-1284","description":"CWE-1284 Improper Validation of Specified Quantity in Input","lang":"en","type":"CWE"}]},{"descriptions":[{"cweId":"CWE-787","description":"CWE-787 Out-of-bounds Write","lang":"en","type":"CWE"}]},{"descriptions":[{"cweId":"CWE-125","description":"CWE-125 Out-of-bounds Read","lang":"en","type":"CWE"}]}],"providerMetadata":{"dateUpdated":"2026-11-24T15:08:20.708Z","orgId":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","shortName":"EEF"},"references":[{"name":"binary_to_term Heap Overrun via NEWER_REFERENCE_EXT with Zero ID Words Aborts the VM","tags":["vendor-advisory","related"],"url":"https://github.com/erlang/otp/security/advisories/GHSA-6qhv-446c-985v"},{"name":"EEF CNA record for CVE-2026-116293","tags":["related"],"url":"https://cna.erlef.org/cves/CVE-2026-116293.html"},{"name":"OSV record EEF-CVE-2026-116293","tags":["related"],"url":"https://osv.dev/vulnerability/EEF-CVE-2026-116293"},{"name":"Erlang/OTP version ordering","tags":["x_version-scheme"],"url":"https://www.erlang.org/doc/system/versions.html#order-of-versions"},{"name":"Fix commit e5a9d3d in erlang/otp","tags":["patch"],"url":"https://github.com/erlang/otp/commit/e5a9d3d141b8b5609803c3b78c8b420cd294ca82"}],"source":{"discovery":"EXTERNAL"},"title":"binary_to_term Heap Overrun via NEWER_REFERENCE_EXT with Zero ID Words Aborts the VM","workarounds":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<ul>\n<li>Do not call <code>binary_to_term/1,2</code> on data from untrusted sources. The OTP Secure Coding Guidelines (DSG-011) recommend avoiding these functions altogether on untrusted data.</li>\n<li>If distribution is exposed to untrusted networks, configure it to use TLS with client certificate verification.</li>\n<li>Use alternative serialization formats (JSON, Protocol Buffers) for untrusted external input.\nNote: the <code>[safe]</code> option to <code>binary_to_term/2</code> does NOT protect against this crash. It only restricts atom creation, not structural validation of binary encodings.</li>\n</ul>"},{"base64":false,"type":"text/markdown","value":"* Do not call `binary_to_term/1,2` on data from untrusted sources. The OTP Secure Coding Guidelines (DSG-011) recommend avoiding these functions altogether on untrusted data.\n* If distribution is exposed to untrusted networks, configure it to use TLS with client certificate verification.\n* Use alternative serialization formats (JSON, Protocol Buffers) for untrusted external input.\nNote: the `[safe]` option to `binary_to_term/2` does NOT protect against this crash. It only restricts atom creation, not structural validation of binary encodings."}],"value":"* Do not call binary_to_term/1,2 on data from untrusted sources. The OTP Secure Coding Guidelines (DSG-011) recommend avoiding these functions altogether on untrusted data.\n* If distribution is exposed to untrusted networks, configure it to use TLS with client certificate verification.\n* Use alternative serialization formats (JSON, Protocol Buffers) for untrusted external input. Note: the [safe] option to binary_to_term/2 does NOT protect against this crash. It only restricts atom creation, not structural validation of binary encodings."}],"x_proofOfConcept":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<ol>\n<li>Build a <code>NEWER_REFERENCE_EXT</code> (tag 90) with <code>Len</code> 0, the node atom <code>nonode@nohost</code> as <code>SMALL_ATOM_UTF8_EXT</code>, and a 4-byte creation for another node, for example 1.</li>\n<li>Build a <code>BINARY_EXT</code> (tag 109) whose payload starts with a 32-bit arity N, followed by N <code>SMALL_INTEGER_EXT</code> elements. Pad the payload so that the low byte of the 32-bit binary length is 105 (<code>LARGE_TUPLE_EXT</code>).</li>\n<li>Wrap both in a two-element <code>SMALL_TUPLE_EXT</code> after the version byte 131. With N = 40 the input is 391 bytes.</li>\n<li>Call <code>binary_to_term/1</code>, or <code>binary_to_term/2</code> with <code>[safe]</code>, on the input. The VM aborts with <code>heap overrun by 33 words(s)</code> instead of raising <code>badarg</code>.</li>\n</ol>"},{"base64":false,"type":"text/markdown","value":"1. Build a `NEWER_REFERENCE_EXT` (tag 90) with `Len` 0, the node atom `nonode@nohost` as `SMALL_ATOM_UTF8_EXT`, and a 4-byte creation for another node, for example 1.\n2. Build a `BINARY_EXT` (tag 109) whose payload starts with a 32-bit arity N, followed by N `SMALL_INTEGER_EXT` elements. Pad the payload so that the low byte of the 32-bit binary length is 105 (`LARGE_TUPLE_EXT`).\n3. Wrap both in a two-element `SMALL_TUPLE_EXT` after the version byte 131. With N = 40 the input is 391 bytes.\n4. Call `binary_to_term/1`, or `binary_to_term/2` with `[safe]`, on the input. The VM aborts with `heap overrun by 33 words(s)` instead of raising `badarg`."}],"value":"* Build a NEWER_REFERENCE_EXT (tag 90) with Len 0, the node atom nonode@nohost as SMALL_ATOM_UTF8_EXT, and a 4-byte creation for another node, for example 1.\n* Build a BINARY_EXT (tag 109) whose payload starts with a 32-bit arity N, followed by N SMALL_INTEGER_EXT elements. Pad the payload so that the low byte of the 32-bit binary length is 105 (LARGE_TUPLE_EXT).\n* Wrap both in a two-element SMALL_TUPLE_EXT after the version byte 131. With N = 40 the input is 391 bytes.\n* Call binary_to_term/1, or binary_to_term/2 with [safe], on the input. The VM aborts with heap overrun by 33 words(s) instead of raising badarg."}],"x_technicalAnalysis":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<p><strong>1. Size pass.</strong> <code>binary_to_term_int</code> first calls <code>decoded_size</code> to reserve the process heap. For <code>NEWER_REFERENCE_EXT</code>, <code>decoded_size</code> rejects an ID-word count above <code>ERTS_MAX_REF_NUMBERS</code> but not a count of zero. With <code>Len</code> 0 it skips the tag, the length, the node atom and the 4-byte creation, and no ID bytes.</p>\n<p><strong>2. Decode pass.</strong> <code>dec_term</code> reads <code>Len</code>, the node atom and the creation, then reads the first ID word <code>r0</code> without checking <code>Len</code>. From here <code>dec_term</code> is 4 bytes ahead of the position <code>decoded_size</code> validated.</p>\n<p><strong>3. Heap overrun.</strong> In the reported input, the reference is followed by a <code>BINARY_EXT</code>. <code>decoded_size</code> treats the binary payload as opaque bytes. The shifted <code>dec_term</code> consumes the binary tag and the top three length bytes as <code>r0</code>, reads the low length byte (105, <code>LARGE_TUPLE_EXT</code>) as the next tag, and builds a tuple from the payload. The tuple-build loop stores past the heap that was reserved for a reference and a binary.</p>\n<p><strong>4. Abort.</strong> After <code>dec_term</code> returns, <code>binary_to_term_int</code> compares the heap pointer with the reserved end and calls <code>erts_exit</code> with <code>heap overrun</code>. That check runs after the out-of-bounds stores. Larger inputs can fault with SIGSEGV first.</p>\n<p><strong><code>NEW_REFERENCE_EXT</code>.</strong> Tag 114 also accepts <code>Len</code> 0, but <code>dec_term</code> rejects <code>r0 &gt;= MAX_REFERENCE</code> for that tag. A shifted <code>r0</code> begins with a term tag byte, so the input fails with <code>badarg</code>.</p>"},{"base64":false,"type":"text/markdown","value":"**1. Size pass.** `binary_to_term_int` first calls `decoded_size` to reserve the process heap. For `NEWER_REFERENCE_EXT`, `decoded_size` rejects an ID-word count above `ERTS_MAX_REF_NUMBERS` but not a count of zero. With `Len` 0 it skips the tag, the length, the node atom and the 4-byte creation, and no ID bytes.\n\n**2. Decode pass.** `dec_term` reads `Len`, the node atom and the creation, then reads the first ID word `r0` without checking `Len`. From here `dec_term` is 4 bytes ahead of the position `decoded_size` validated.\n\n**3. Heap overrun.** In the reported input, the reference is followed by a `BINARY_EXT`. `decoded_size` treats the binary payload as opaque bytes. The shifted `dec_term` consumes the binary tag and the top three length bytes as `r0`, reads the low length byte (105, `LARGE_TUPLE_EXT`) as the next tag, and builds a tuple from the payload. The tuple-build loop stores past the heap that was reserved for a reference and a binary.\n\n**4. Abort.** After `dec_term` returns, `binary_to_term_int` compares the heap pointer with the reserved end and calls `erts_exit` with `heap overrun`. That check runs after the out-of-bounds stores. Larger inputs can fault with SIGSEGV first.\n\n**`NEW_REFERENCE_EXT`.** Tag 114 also accepts `Len` 0, but `dec_term` rejects `r0 >= MAX_REFERENCE` for that tag. A shifted `r0` begins with a term tag byte, so the input fails with `badarg`."}],"value":"1. Size pass. binary_to_term_int first calls decoded_size to reserve the process heap. For NEWER_REFERENCE_EXT, decoded_size rejects an ID-word count above ERTS_MAX_REF_NUMBERS but not a count of zero. With Len 0 it skips the tag, the length, the node atom and the 4-byte creation, and no ID bytes.\n\n2. Decode pass. dec_term reads Len, the node atom and the creation, then reads the first ID word r0 without checking Len. From here dec_term is 4 bytes ahead of the position decoded_size validated.\n\n3. Heap overrun. In the reported input, the reference is followed by a BINARY_EXT. decoded_size treats the binary payload as opaque bytes. The shifted dec_term consumes the binary tag and the top three length bytes as r0, reads the low length byte (105, LARGE_TUPLE_EXT) as the next tag, and builds a tuple from the payload. The tuple-build loop stores past the heap that was reserved for a reference and a binary.\n\n4. Abort. After dec_term returns, binary_to_term_int compares the heap pointer with the reserved end and calls erts_exit with heap overrun. That check runs after the out-of-bounds stores. Larger inputs can fault with SIGSEGV first.\n\nNEW_REFERENCE_EXT. Tag 114 also accepts Len 0, but dec_term rejects r0 >= MAX_REFERENCE for that tag. A shifted r0 begins with a term tag byte, so the input fails with badarg."}]}},"cveMetadata":{"assignerOrgId":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","assignerShortName":"EEF","cveId":"CVE-2026-116293","datePublished":"2026-11-24T15:08:20.708Z","dateReserved":"2026-10-26T09:45:01.452Z","dateUpdated":"2026-11-24T15:08:20.708Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"}