{"affected":[{"package":{"ecosystem":"Hex","name":"partisan","purl":"pkg:hex/partisan"},"ranges":[{"events":[{"introduced":"3.0.0"},{"fixed":"6.4.0"}],"type":"SEMVER"}],"versions":["3.0.0","4.1.0","5.0.0-beta.13","5.0.0-beta.14","5.0.0-beta.15","5.0.0-beta.16","5.0.0-beta.17","5.0.0-beta.18","5.0.0-beta.20","5.0.0-beta.21","5.0.0-beta.24","5.0.0-rc.1","5.0.0-rc.2","5.0.0-rc.8","5.0.0-rc.16","5.0.0","5.0.1","5.0.2","5.0.3","6.0.0","6.1.0","6.2.0","6.3.0","6.3.1","6.3.2","6.3.3"]},{"ranges":[{"events":[{"introduced":"04314463df1d3cb213c7a07beb60bf7af3389dfc"},{"fixed":"5c75b3368620ef9f7f07af5e7f70ade95030fe92"}],"repo":"https://github.com/lasp-lang/partisan","type":"GIT"}]}],"aliases":["GHSA-38p4-3gp9-mfx9","CVE-2026-118898"],"credits":[{"name":"Quinn Wilton","type":"FINDER"},{"name":"Quinn Wilton","type":"REPORTER"},{"name":"Jonatan Männchen / EEF","type":"COORDINATOR"},{"name":"Alejandro M. Ramallo / Leapsight","type":"REMEDIATION_DEVELOPER"}],"database_specific":{"capec_ids":["CAPEC-130"],"cpe_ids":["cpe:2.3:a:lasp-lang:partisan:*:*:*:*:*:*:*:*"],"cwe_ids":["CWE-502"]},"details":"## Summary\n\nDeserialization of Untrusted Data vulnerability in lasp-lang partisan allows an unauthenticated remote attacker to abort the Erlang VM of a node via Excessive Allocation. `partisan_peer_service_server:handle_info/2` decodes every frame that arrives on the peer listener with `binary_to_term/1`, without the `safe` option, before `handle_inbound/2` interprets the message and before any peer authentication takes place. TLS is off by default and the listener accepts connections from any host, so one frame that names more atoms than the atom table holds aborts the VM. `partisan_peer_service_client:handle_info/2` decodes frames from the server side of a connection the same way.\n\nThe decode also materializes funs, ports and references the frame encodes and inflates compressed terms. The demonstrated impact is denial of service. partisan does not invoke decoded funs, so code execution was not shown.\n\nThis issue affects partisan: from 3.0.0 before 6.4.0.\n\n## Details\n\n**1. Listener.** `partisan_acceptor_socket` opens the peer port with `{packet, 4}` framing and a `packet_size` of `max_message_size` (64 MB by default). The cap bounds bytes per frame, not the term a frame decodes to. With `tls` unset the socket is plain TCP, and the listener binds to the node's host address unless `listen_addrs` says otherwise.\n\n**2. Greeting.** `partisan_peer_service_server:acceptor_continue/3` accepts the socket, sends `{hello, Node}` unprompted and enters a `gen_server` loop. No cookie, shared secret or certificate check happens here.\n\n**3. Unsafe decode.** The first frame reaches `partisan_peer_service_server:handle_info/2`, which calls `binary_to_term(Data)` with no `safe` option. The BIF interns every atom in the frame, builds every fun, port and reference, and inflates a compressed term, all before `handle_inbound/2` sees the result. A frame that names more atoms than the atom table holds aborts the VM at this step.\n\n**4. Client side.** `partisan_peer_service_client:handle_info/2` decodes frames from the server end of a connection with the same call, so a node that connects to a hostile peer is exposed the same way.\n\n**5. TLS.** Enabling `tls` wraps the socket but does not authenticate the peer unless both sides set `{verify, verify_peer}` with a cluster CA. Server-only TLS still lets any client that completes the handshake reach the decode.\n\n## Proof of concept\n\n1. Start partisan with its default configuration, so `tls` is `false`, and let the peer listener bind to `127.0.0.1:12345`.\n2. From a plain TCP socket opened with `{packet, 4}`, send one frame holding the External Term Format of a list of 100,000 atoms the node has never seen (tag 131, `LIST_EXT`, 100,000 `SMALL_ATOM_UTF8_EXT` elements, `NIL_EXT`).\n3. Read `erlang:system_info(atom_count)` before and after. The count rises by 100,001 and the sample atoms resolve with `binary_to_term(_, [safe])`, so the server interned them before any message interpretation or authentication. A frame naming more than 1,048,576 atoms, within the 64 MB default frame cap, aborts the VM.\n\n## Impact\n\nAny host that can open a TCP connection to the peer port stops the node with one frame, with no credentials and no cluster membership. The abort happens at VM level, so supervision trees cannot recover it, and every application running in that node goes down with partisan.\n\n## Workarounds\n\nEnable mutual TLS on the peer plane. Set `tls` to `true` and give `tls_server_options` a cluster CA in `cacertfile` together with `{verify, verify_peer}` and `{fail_if_no_peer_cert, true}`, and give `tls_client_options` the same CA with `{verify, verify_peer}`. The server then rejects a connection during the handshake unless the client presents a certificate the cluster CA issued, so the decode is only reachable by cluster members. Server-only TLS, or `verify_none`, does not help.\n\nWhere TLS cannot be enabled, restrict the peer listener port to trusted hosts with a host firewall or a private network segment.\n\n## Solutions\n\nThe fixed release adds peer authentication and leaves it off by default (`peer_auth_methods` is `[]`). A node stays exposed until the option is set.\n\nSet `peer_auth_methods` on every node to a list of `cryptosign`, `gossip_keyring` or `hmac_secret` without `anonymous`, with the trust material of each listed method (`peer_auth_cryptosign`, `peer_auth_keyring`, `peer_auth_secret`). The node then accepts only authentication frames of at most 4096 bytes from a peer that has not authenticated, and reads them without `binary_to_term/1`.\n\nA node on an earlier release cannot connect to a node that requires authentication. Set the option on all nodes with `anonymous` at the end of the list, then remove `anonymous`. Peer authentication does not encrypt or sign later traffic, so use it over TLS 1.3 on a network that is not trusted.","id":"EEF-CVE-2026-118898","modified":"2026-11-25T04:42:18.053293Z","published":"2026-11-25T04:42:17.564Z","references":[{"type":"ADVISORY","url":"https://github.com/lasp-lang/partisan/security/advisories/GHSA-38p4-3gp9-mfx9"},{"type":"WEB","url":"https://cna.erlef.org/cves/CVE-2026-118898.html"},{"type":"WEB","url":"https://github.com/lasp-lang/partisan/commit/04314463df1d3cb213c7a07beb60bf7af3389dfc"},{"type":"FIX","url":"https://github.com/lasp-lang/partisan/commit/5c75b3368620ef9f7f07af5e7f70ade95030fe92"},{"type":"PACKAGE","url":"https://hex.pm/packages/partisan"}],"related":[],"schema_version":"1.8.0","severity":[{"score":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","source":"CNA","type":"CVSS_V4"}],"summary":"partisan decodes peer-plane frames with binary_to_term before authentication, allowing a remote VM abort","upstream":[]}