See how erlang compares to other vendors in security performance
Summary
Improper Restriction of Operations within the Bounds of a Memory Buffer vulnerability in the AArch64 JIT in Erlang OTP erts allows an attacker to crash the BEAM virtual machine via input that reaches a chained integer range guard, such as an oversized numeric character reference parsed by xmerlsaxparser.
In erts/emulator/beam/jit/arm/instrcommon.cpp, BeamModuleAssembler::emitisgelt wraps its generated code in preservecache and marks only TMP1 as clobbered. When the compared value is not a small integer, the generated code calls the shared fragment isgeltshared, which also overwrites ARG1 and other caller-saved registers. The register cache keeps stale entries, so later instructions may use a clobbered register as an Erlang term and the emulator dies with a segmentation fault. A reference such as � takes this path in the ?ischar guard of the SAX parser. Only AArch64 builds that run the JIT are affected. The x86-64 JIT and interpreter builds do not contain the faulty code.
This issue affects OTP from OTP 27.0 before OTP 27.3.4.20, OTP 28.5.0.9, and OTP 29.1.3, corresponding to erts from 15.0 before 15.2.7.15, 16.4.0.8, and 17.1.2.
Details
1. Code generation. BeamModuleAssembler::emitisgelt in erts/emulator/beam/jit/arm/instrcommon.cpp emits the isgelt instruction, which the compiler produces for a chained guard of the form A =< X, X < B. The AArch64 emitter wraps the whole sequence in preservecache and declares TMP1 as the only clobbered register, so the register cache keeps its entries across the instruction.
2. Generic path. When the operand is not a small integer, the generated code loads it into ARG1 and calls the global fragment BeamGlobalAssembler::emitisgeltshared. The fragment performs a generic term comparison and overwrites ARG1 and other caller-saved registers.
3. Stale cache. The cache still records ARG1 as holding a copy of a BEAM Y register. A later instruction that needs that Y register reuses ARG1 instead of reloading it from the stack, and so operates on whatever the fragment left behind.
4. Crash. The leftover value is treated as a tagged Erlang term. When it is dereferenced as a boxed term, the emulator reads an invalid address and dies with SIGSEGV. The whole node terminates without a crash dump.
5. Trigger. The ?ischar guard in lib/xmerl/src/xmerlsaxparserbase.erlsrc compares a decoded numeric character reference against several ranges in sequence. A value that does not fit a small integer on a 64-bit runtime, for example � (2^59), takes the generic path. The expected outcome is a fatalerror naming an illegal character.
The fix removes the preservecache wrapper so the cache is invalidated after the instruction, matching emitisinrange. The x86-64 emitter never preserved the cache here.
Proof of concept
1. Run an AArch64 build of OTP 27 or later with the JIT enabled; erlang:systeminfo(emuflavor) returns jit. 2. Parse an XML document that contains a numeric character reference too large for a small integer, for example <a>�</a>, with xmerlsaxparser:stream/2 or xmerlsaxparser:file/2. No entity expansion or external resource is needed. 3. The emulator exits with SIGSEGV (status 139) instead of returning {fatalerror, , "Not a legal character: #576460752303423488", , }.
Impact
An attacker who can get an affected AArch64 node to parse crafted XML, or to run other code that compiles to the same comparison sequence over a non-small integer, terminates the whole BEAM VM, including every unrelated application on it. Supervision cannot contain a native crash. Code execution, information disclosure and data modification have not been demonstrated.
Workarounds
On AArch64 hosts, run the emulator without the JIT: start it with erl -emuflavor emu when the interpreter flavor is installed, or build OTP with --disable-jit. The interpreter does not execute the affected generated code.
Configurations
Only AArch64 (ARM64) runtimes that execute the JIT are affected; erlang:systeminfo(emuflavor) returns jit on such a node. The x86-64 JIT, interpreter builds (emu flavor) and 32-bit platforms do not run the affected code. The demonstrated path requires an application to pass attacker-controlled XML to xmerlsaxparser, but other Erlang code that compiles to the same chained range guard over a non-small integer can reach the same defect.
Summary
Improper Restriction of Operations within the Bounds of a Memory Buffer vulnerability in the AArch64 JIT in Erlang OTP erts allows an attacker to crash the BEAM virtual machine via input that reaches a chained integer range guard, such as an oversized numeric character reference parsed by xmerlsaxparser.
In erts/emulator/beam/jit/arm/instrcommon.cpp, BeamModuleAssembler::emitisgelt wraps its generated code in preservecache and marks only TMP1 as clobbered. When the compared value is not a small integer, the generated code calls the shared fragment isgeltshared, which also overwrites ARG1 and other caller-saved registers. The register cache keeps stale entries, so later instructions may use a clobbered register as an Erlang term and the emulator dies with a segmentation fault. A reference such as � takes this path in the ?ischar guard of the SAX parser. Only AArch64 builds that run the JIT are affected. The x86-64 JIT and interpreter builds do not contain the faulty code.
This issue affects OTP from OTP 27.0 before OTP 27.3.4.20, OTP 28.5.0.9, and OTP 29.1.3, corresponding to erts from 15.0 before 15.2.7.15, 16.4.0.8, and 17.1.2.
Details
1. Code generation. BeamModuleAssembler::emitisgelt in erts/emulator/beam/jit/arm/instrcommon.cpp emits the isgelt instruction, which the compiler produces for a chained guard of the form A =< X, X < B. The AArch64 emitter wraps the whole sequence in preservecache and declares TMP1 as the only clobbered register, so the register cache keeps its entries across the instruction.
2. Generic path. When the operand is not a small integer, the generated code loads it into ARG1 and calls the global fragment BeamGlobalAssembler::emitisgeltshared. The fragment performs a generic term comparison and overwrites ARG1 and other caller-saved registers.
3. Stale cache. The cache still records ARG1 as holding a copy of a BEAM Y register. A later instruction that needs that Y register reuses ARG1 instead of reloading it from the stack, and so operates on whatever the fragment left behind.
4. Crash. The leftover value is treated as a tagged Erlang term. When it is dereferenced as a boxed term, the emulator reads an invalid address and dies with SIGSEGV. The whole node terminates without a crash dump.
5. Trigger. The ?ischar guard in lib/xmerl/src/xmerlsaxparserbase.erlsrc compares a decoded numeric character reference against several ranges in sequence. A value that does not fit a small integer on a 64-bit runtime, for example � (2^59), takes the generic path. The expected outcome is a fatalerror naming an illegal character.
The fix removes the preservecache wrapper so the cache is invalidated after the instruction, matching emitisinrange. The x86-64 emitter never preserved the cache here.
Proof of concept
1. Run an AArch64 build of OTP 27 or later with the JIT enabled; erlang:systeminfo(emuflavor) returns jit. 2. Parse an XML document that contains a numeric character reference too large for a small integer, for example <a>�</a>, with xmerlsaxparser:stream/2 or xmerlsaxparser:file/2. No entity expansion or external resource is needed. 3. The emulator exits with SIGSEGV (status 139) instead of returning {fatalerror, , "Not a legal character: #576460752303423488", , }.
Impact
An attacker who can get an affected AArch64 node to parse crafted XML, or to run other code that compiles to the same comparison sequence over a non-small integer, terminates the whole BEAM VM, including every unrelated application on it. Supervision cannot contain a native crash. Code execution, information disclosure and data modification have not been demonstrated.
Workarounds
On AArch64 hosts, run the emulator without the JIT: start it with erl -emuflavor emu when the interpreter flavor is installed, or build OTP with --disable-jit. The interpreter does not execute the affected generated code.
Configurations
Only AArch64 (ARM64) runtimes that execute the JIT are affected; erlang:systeminfo(emuflavor) returns jit on such a node. The x86-64 JIT, interpreter builds (emu flavor) and 32-bit platforms do not run the affected code. The demonstrated path requires an application to pass attacker-controlled XML to xmerlsaxparser, but other Erlang code that compiles to the same chained range guard over a non-small integer can reach the same defect.
Summary
Improper Restriction of Operations within the Bounds of a Memory Buffer vulnerability in the AArch64 JIT in Erlang OTP erts allows an attacker to crash the BEAM virtual machine via input that reaches a chained integer range guard, such as an oversized numeric character reference parsed by xmerlsaxparser.
In erts/emulator/beam/jit/arm/instrcommon.cpp, BeamModuleAssembler::emitisgelt wraps its generated code in preservecache and marks only TMP1 as clobbered. When the compared value is not a small integer, the generated code calls the shared fragment isgeltshared, which also overwrites ARG1 and other caller-saved registers. The register cache keeps stale entries, so later instructions may use a clobbered register as an Erlang term and the emulator dies with a segmentation fault. A reference such as � takes this path in the ?ischar guard of the SAX parser. Only AArch64 builds that run the JIT are affected. The x86-64 JIT and interpreter builds do not contain the faulty code.
This issue affects OTP from OTP 27.0 before OTP 27.3.4.20, OTP 28.5.0.9, and OTP 29.1.3, corresponding to erts from 15.0 before 15.2.7.15, 16.4.0.8, and 17.1.2.
Details
1. Code generation. BeamModuleAssembler::emitisgelt in erts/emulator/beam/jit/arm/instrcommon.cpp emits the isgelt instruction, which the compiler produces for a chained guard of the form A =< X, X < B. The AArch64 emitter wraps the whole sequence in preservecache and declares TMP1 as the only clobbered register, so the register cache keeps its entries across the instruction.
2. Generic path. When the operand is not a small integer, the generated code loads it into ARG1 and calls the global fragment BeamGlobalAssembler::emitisgeltshared. The fragment performs a generic term comparison and overwrites ARG1 and other caller-saved registers.
3. Stale cache. The cache still records ARG1 as holding a copy of a BEAM Y register. A later instruction that needs that Y register reuses ARG1 instead of reloading it from the stack, and so operates on whatever the fragment left behind.
4. Crash. The leftover value is treated as a tagged Erlang term. When it is dereferenced as a boxed term, the emulator reads an invalid address and dies with SIGSEGV. The whole node terminates without a crash dump.
5. Trigger. The ?ischar guard in lib/xmerl/src/xmerlsaxparserbase.erlsrc compares a decoded numeric character reference against several ranges in sequence. A value that does not fit a small integer on a 64-bit runtime, for example � (2^59), takes the generic path. The expected outcome is a fatalerror naming an illegal character.
The fix removes the preservecache wrapper so the cache is invalidated after the instruction, matching emitisinrange. The x86-64 emitter never preserved the cache here.
Proof of concept
1. Run an AArch64 build of OTP 27 or later with the JIT enabled; erlang:systeminfo(emuflavor) returns jit. 2. Parse an XML document that contains a numeric character reference too large for a small integer, for example <a>�</a>, with xmerlsaxparser:stream/2 or xmerlsaxparser:file/2. No entity expansion or external resource is needed. 3. The emulator exits with SIGSEGV (status 139) instead of returning {fatalerror, , "Not a legal character: #576460752303423488", , }.
Impact
An attacker who can get an affected AArch64 node to parse crafted XML, or to run other code that compiles to the same comparison sequence over a non-small integer, terminates the whole BEAM VM, including every unrelated application on it. Supervision cannot contain a native crash. Code execution, information disclosure and data modification have not been demonstrated.
Workarounds
On AArch64 hosts, run the emulator without the JIT: start it with erl -emuflavor emu when the interpreter flavor is installed, or build OTP with --disable-jit. The interpreter does not execute the affected generated code.
Configurations
Only AArch64 (ARM64) runtimes that execute the JIT are affected; erlang:systeminfo(emuflavor) returns jit on such a node. The x86-64 JIT, interpreter builds (emu flavor) and 32-bit platforms do not run the affected code. The demonstrated path requires an application to pass attacker-controlled XML to xmerlsaxparser, but other Erlang code that compiles to the same chained range guard over a non-small integer can reach the same defect.
Summary
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.
Details
1. Decoder entry
primfile:listdir/1 and primfile:readlink/1 decode each native name with primfile:internalnative2name/1. Its implementation, primfileinternalnative2name1 in erts/emulator/beam/erlunicode.c, calls doutf8tolistnormalize when the file name encoding is ERLFILENAMEUTF8MAC. ertsinitsyscommonmisc selects that encoding only on macOS.
2. Missing heap pointer write-back
doutf8tolistnormalize reserves 2 num heap words with HAlloc, reads the name from its end, and keeps code points that can compose (U+0300 and above) in savepoints. If saved points remain when it reaches the start of the name, it calls cleanupnorm(&hp, savepoints, numpoints, &ret) and then HRelease(p, hpend, hp). cleanupnorm copies hpp to a local hp, builds one cons cell per saved point, and writes back only retp. The caller's hp still points below the new cells, so HRelease returns them to the process heap. handlepotentialnorm has the same structure and does write hpp = hp.
3. Effect
The returned list starts in released heap memory. The next allocation of the process overwrites the cells. erlang:display/1 shows a header word in place of the first code point. When the term is copied, for example in the reply of the file server, sizeobjectx either loops without end on a cyclic term or aborts the VM with sizeobject: bad tag.
Proof of concept
1. On macOS, create a directory with one file whose name starts with U+0301: mkdir d && printf x > "d/$(printf '\314\201b')". 2. Run erl -noshell -eval 'io:format("~w~n", [file:listdir("d")]), halt().'. The command prints nothing and does not return. The VM does not stop on SIGTERM. The expected output is {ok,[[769,98]]}. 3. Run erl -noshell -eval 'erlang:display(primfile:internalnative2name(<<204,129,$b>>)), halt().'. The output starts with [<cp/header:0x00000000000000c0>. The expected output is [769,98]. 4. Create a symbolic link with the same name as its target (ln -s "$(printf '\314\201b')" link) and call file:readlink("link"). The VM aborts with sizeobject: bad tag for 0x80.
Impact
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.
Workarounds
Start the VM with the +fnl flag, for example through ERLFLAGS. 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.
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.
Summary
Improper Verification of Cryptographic Signature vulnerability in Erlang OTP ssl (sslhandshake module) allows an on-path attacker to impersonate any server to a TLS 1.2 or DTLS client.
When a server sends no Certificate message and a ServerKeyExchange without a signature, sslhandshake:decodeserverkey/3 reports the signature algorithm as anon, and sslhandshake:verifysignature/5 returns true for anon without a public key. The client does not require a certificate for a certificate-authenticated key exchange, so the handshake completes for the ecdhersa, ecdheecdsa, dhersa and dhedss key exchanges with a cipher suite the client offered. Certificate path validation, verifyfun and the hostname check do not run, and ssl:connect/3 returns {ok, Socket} with {verify, verifypeer} set. The TLS 1.3 client is not affected.
This issue affects OTP from OTP 17.0 before OTP 27.3.4.14, OTP 28.5.0.9, and OTP 29.0.3, corresponding to ssl from 5.3.4 before 11.2.12.10, 11.6.0.8, and 11.7.3.
Details
1. Signature decoding. sslhandshake:decodeserverkey/3 splits the ServerKeyExchange body into the key exchange parameters and a signature. The internal decserverkeysignature/3 maps an empty remainder, a zero-length signature, and the TLS 1.2 anonymous signature algorithm with an empty signature to the signature algorithm anon. It does this for every key exchange algorithm, not only for the anonymous ones.
2. Signature verification. In the certify state the client calls sslhandshake:verifyserverkey/5 for the non-anonymous key exchanges. No Certificate message arrived, so the stored public key is undefined. sslhandshake:verifysignature/5 has a clause that returns true for the anon signature algorithm with any key, and that clause matches.
3. Handshake completion. The client does not check that it received a certificate before it handles ServerHelloDone. It derives the master secret from the unauthenticated (EC)DH parameters and sends ClientKeyExchange, ChangeCipherSpec and Finished. The attacker holds the (EC)DH private key and completes the handshake. ssl:connect/3 returns {ok, Socket}, and ssl:peercert/1 returns {error, nopeercert} on that socket.
Proof of concept
1. Start a TCP server that answers a TLS 1.2 ClientHello with a ServerHello that selects an offered ECDHERSA suite (for example TLSECDHERSAWITHAES128GCMSHA256), then a ServerKeyExchange with x25519 parameters and no signature, then ServerHelloDone. Send no Certificate message. The UnauthenticatedECDH test of the BoringSSL test runner (BoGo) provides such a server. 2. Connect with ssl:connect/3 and the options {verify, verifypeer}, {cacerts, publickey:cacertsget()}, {servernameindication, "www.example.com"} and {customizehostnamecheck, [{matchfun, publickey:pkixverifyhostnamematchfun(https)}]}. 3. On the server, derive the session keys from its own ECDH key pair and the client's ClientKeyExchange, then send ChangeCipherSpec and Finished. 4. ssl:connect/3 returns {ok, Socket}, and the server decrypts the application data that the client sends. A fixed client aborts with a fatal alert after step 1.
Impact
An on-path attacker can impersonate any server to an affected client, then read and modify all application data on the connection. Certificate path validation, verifyfun and the hostname check do not run.
Workarounds
Restrict TLS client connections to TLS 1.3 by setting versions to ['tlsv1.3'] in the client's ssl options.
If a client must use TLS 1.2, offer only the static RSA key exchange cipher suites. These suites have no ServerKeyExchange message. They provide no forward secrecy, and many servers do not accept them.
erlang RsaOnly = ssl:filterciphersuites( ssl:ciphersuites(all, 'tlsv1.2'), [{keyexchange, fun(rsa) -> true; () -> false end}] ), Opts = [ {verify, verifypeer}, {cacerts, publickey:cacertsget()}, {versions, ['tlsv1.2']}, {ciphers, RsaOnly}, {servernameindication, "www.example.com"}, {customizehostnamecheck, [ {matchfun, publickey:pkixverifyhostnamematchfun(https)} ]} ].
Configurations
The vulnerability affects clients whose connection can use TLS 1.2 or DTLS 1.2. The default ssl:connect options allow TLS 1.2. Clients restricted to TLS 1.3 are not affected. Cipher suites that do not use a ServerKeyExchange message (the rsa, ecdhrsa and ecdhecdsa key exchanges) are not affected. Servers are not affected. Exploitation requires an on-path (adversary-in-the-middle) attacker between the client and the intended server.
Summary
Allocation of Resources Without Limits or Throttling vulnerability in Erlang OTP inets (httpdscriptenv module) allows an unauthenticated remote attacker to exhaust the atom table of an httpd server that serves ESI scripts.
When modesi builds the environment for an ESI callback, httpdscriptenv:httpenvelement/3 checks that a request header name already exists as an atom, then creates the atom http<header-name> with listtoatom/1. Atoms are never garbage collected, and each new atom passes the existence check on a later request. So a header named node creates httpnode, a header named httpnode creates httphttpnode, and so on. A stream of requests to any ESI URL grows the atom table until it reaches its limit (+t), and then the whole Erlang VM aborts, together with every application on the node.
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 inets from 5.10 before 9.3.2.9, 9.6.2.5, and 9.8.2. Whether OTP before OTP 17.0, corresponding to inets before 5.10, is affected is unknown.
Proof of concept
1. Start httpd with {erlscriptalias, {"/esi", [Mod]}}, where Mod exports any ESI callback fun/3. 2. Send GET /esi/Mod:fun with a request header named node. The node now holds the atom httpnode. 3. Send the same request with a header named httpnode. The node now holds httphttpnode. 4. Repeat with each new name. Each request adds an atom that persists, until the atom table limit aborts the VM.
Impact
An unauthenticated remote client can permanently grow the atom table of the node with ordinary HTTP requests. When the table reaches its limit, the Erlang VM aborts and takes down every application on the node, not only httpd.
Workarounds
If you do not need ESI, remove erlscriptalias from the httpd configuration. Restrict the ESI URL prefixes to trusted clients, for example with modauth directory protection. Authenticated clients can still trigger the issue. Put httpd behind a reverse proxy that forwards only an allowlist of standard request headers to the ESI URL prefixes. For nginx, set proxypassrequestheaders off and add one proxysetheader for each allowed header.
Configurations
Only httpd servers with at least one erlscriptalias configured are affected, and only for clients that can reach an ESI URL prefix. Where modauth or modsecurity directory protection sits in front of modesi, only authenticated clients can trigger the issue. CGI scripts served by modcgi and the httpc client are not affected.
Summary
Allocation of Resources Without Limits or Throttling vulnerability in Erlang OTP inets (httpdscriptenv module) allows an unauthenticated remote attacker to exhaust the atom table of an httpd server that serves ESI scripts.
When modesi builds the environment for an ESI callback, httpdscriptenv:httpenvelement/3 checks that a request header name already exists as an atom, then creates the atom http<header-name> with listtoatom/1. Atoms are never garbage collected, and each new atom passes the existence check on a later request. So a header named node creates httpnode, a header named httpnode creates httphttpnode, and so on. A stream of requests to any ESI URL grows the atom table until it reaches its limit (+t), and then the whole Erlang VM aborts, together with every application on the node.
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 inets from 5.10 before 9.3.2.9, 9.6.2.5, and 9.8.2. Whether OTP before OTP 17.0, corresponding to inets before 5.10, is affected is unknown.
Proof of concept
1. Start httpd with {erlscriptalias, {"/esi", [Mod]}}, where Mod exports any ESI callback fun/3. 2. Send GET /esi/Mod:fun with a request header named node. The node now holds the atom httpnode. 3. Send the same request with a header named httpnode. The node now holds httphttpnode. 4. Repeat with each new name. Each request adds an atom that persists, until the atom table limit aborts the VM.
Impact
An unauthenticated remote client can permanently grow the atom table of the node with ordinary HTTP requests. When the table reaches its limit, the Erlang VM aborts and takes down every application on the node, not only httpd.
Workarounds
If you do not need ESI, remove erlscriptalias from the httpd configuration. Restrict the ESI URL prefixes to trusted clients, for example with modauth directory protection. Authenticated clients can still trigger the issue. Put httpd behind a reverse proxy that forwards only an allowlist of standard request headers to the ESI URL prefixes. For nginx, set proxypassrequestheaders off and add one proxysetheader for each allowed header.
Configurations
Only httpd servers with at least one erlscriptalias configured are affected, and only for clients that can reach an ESI URL prefix. Where modauth or modsecurity directory protection sits in front of modesi, only authenticated clients can trigger the issue. CGI scripts served by modcgi and the httpc client are not affected.
Summary
Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Request/Response Splitting') vulnerability in Erlang OTP inets (httpc module) allows HTTP Request Splitting.
httpc writes request header names and values to the wire without neutralizing CR, LF or NUL characters. On the default path httprequest:mkkeyvaluestr/2, and with the headersasis option httpcrequest:httpheaders/2, build each header line by plain concatenation of the name, ": ", the value and CRLF. A CR/LF in a name or value ends the header line early. An attacker who controls data that an application puts into a header passed to httpc:request/4,5 can add or override request headers, or append a second request on the same connection.
Applications that pass only constant or validated header names and values are not affected. The request line is not affected, because uristring rejects URLs that contain raw CR/LF.
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 inets from 5.10 before 9.3.2.9, 9.6.2.5, and 9.8.2. Whether OTP before OTP 17.0, corresponding to inets before 5.10, is affected is unknown.
Proof of concept
1. Start a TCP listener that prints the bytes it receives, for example on localhost:4444. 2. Call httpc:request(get, {"http://localhost:4444", [{"a: b\r\nc", "d\r\ne: f"}]}, [], []). 3. The listener receives three header lines (a: b, c: d, e: f) instead of one. 4. Repeat with [{headersasis, true}] as the fourth argument and an explicit host header. The same three lines arrive.
Impact
An attacker who controls data in a request header can add or override headers such as Authorization, Cookie, Host or X-Forwarded-For, which may affect authentication, routing or caching decisions on the target server or on intermediaries. With an empty line, the attacker can send a second, attacker-chosen request to the target server over the connection that the application opened.
Workarounds
Validate request header names and values before you pass them to httpc:request/4,5. Reject or replace any name or value that contains CR (\r), LF (\n) or NUL (\0), and accept only header names made of RFC 9110 token characters. Where the application forwards headers from another source, use a fixed allowlist of header names.
Summary
Improper Restriction of XML External Entity Reference vulnerability in xmerlscan in Erlang OTP xmerl allows an attacker to exhaust the memory of the Erlang VM via an XML document that names an external DTD.
With default options, xmerlscan:string/1,2 and xmerlscan:file/1,2 fetch and parse the external DTD named in a <!DOCTYPE root SYSTEM "..."> declaration. fetchDTD/2 in lib/xmerl/src/xmerlscan.erl passes every system identifier to the default fetch function, which maps file: and absolute URIs to local paths, and intfiledecl/3 then reads the whole file with file:readfile/1. This happens whether or not validation is enabled, and the allowentities option, which is false by default since OTP 27, only governs <!ENTITY> declarations and does not stop the fetch. A document naming file:///dev/zero makes the node read without bound until the operating system kills it for lack of memory, and the parse never returns.
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 xmerl from 1.3.7 before 2.1.3.4, 2.1.9.1, and 2.2.1. Whether OTP before OTP 17.0, corresponding to xmerl before 1.3.7, is affected is unknown.
Details
1. DOCTYPE handling. scandoctype2/3 and scandoctype3/3 in lib/xmerl/src/xmerlscan.erl call fetchDTD/2 once the <!DOCTYPE> declaration ends. fetchDTD/2 has no clause that skips the fetch when validation is off (that clause is commented out), so every system identifier reaches fetchandparse/3.
2. Default fetch. fetchandparse/3 calls the scanner's fetchfun, which defaults to fetch/2. Its helper fetchURI/2 treats the identifier as a filename: a file: URI or an absolute path resolves to that local path, and a relative name resolves against xmlbase. Only http: identifiers are left unread.
3. Unbounded read. The returned {file, Path} goes to intfiledecl/3, which calls file:readfile/1 on the path and converts the result to a list. file:readfile/1 reads until end of file, so a device such as /dev/zero never returns and the binary heap grows until the operating system kills the VM. The allowentities default of false does not help: it only rejects <!ENTITY> declarations in scanmarkupdecl/2, which runs after the file has been read.
Proof of concept
1. Build an XML document whose DOCTYPE names an unbounded local resource, for example <?xml version="1.0"?><!DOCTYPE root SYSTEM "file:///dev/zero"><root/>. 2. Parse it with xmerlscan:string/1 with default options on a Unix host. 3. The call never returns. The reporter observed binary memory reaching 8, 16, 32 and 64 GB within five seconds on OTP 29.1.2, after which the node was killed for lack of memory.
Impact
An attacker who can supply an XML document to an application that parses it with xmerlscan using default options makes the node read an unbounded local resource such as /dev/zero. The read exhausts memory and takes the node down for every user of the application.
Workarounds
Pass a fetchfun that refuses external resources in the option list of xmerlscan:string/2 or xmerlscan:file/2, for example {fetchfun, fun(ExtSpec, State) -> {ok, notfetched, State} end}. The scanner then continues without reading or parsing the external DTD.
Improper Validation of Consistency within Input vulnerability in Erlang OTP ssl (tlshandshake13, sslhandshake and tlsclientticketstore modules) allows a malicious TLS 1.3 server to cause a denial of service of the ssl application on the client node.
The TLS 1.3 client decodes the extensions of a NewSessionTicket message as if they came from EncryptedExtensions. It therefore accepts a 0-length earlydata extension, a form that is only valid in ClientHello and EncryptedExtensions. With {sessiontickets, auto}, the client stores the ticket in the node-global tlsclientticketstore. On the next automatic resumption, tlshandshake13:getmaxearlydata/1 crashes the store with a caseclause. Repeated crashes can exceed the restart intensity of the ssl supervisors, which use the restforone strategy, and take down ssl for all connections on the node.
This issue affects OTP from OTP 23.3 before OTP 27.3.4.19, OTP 28.5.0.8, and OTP 29.1.2, corresponding to ssl from 10.3 before 11.2.12.14, 11.6.0.7, and 11.7.8.
Summary
Loop with Unreachable Exit Condition ('Infinite Loop') vulnerability in Erlang OTP stdlib (erltar module), hexpm hexcore (hexerltar module), hexpm hex (mixhexerltar module) and erlang rebar3 (r3hexerltar module) allows an attacker who supplies a tar archive to cause a denial of service via a crafted GNU sparse member.
When erltar:extract/1,2 writes a member to disk, erltar:streamtofileloop/3 reads it in chunks of 65536 bytes by default. For a GNU sparse member whose sparse map ends before its real size, erltar:dosparseread/3 matches its trailing-hole clause before its zero-length clause. After the chunk is used up, the trailing-hole clause reads zero bytes, does not advance the position, and recurses forever. A 2048-byte archive keeps the extracting process and one scheduler busy until the process is killed. The {maxsize, N} option prevents this only when N is below the real size of the member. Extraction with the memory option is not affected.
hexcore ships its own copy of erltar as hexerltar, and Hex and rebar3 ship hexcore with prefixed module names (mixhexerltar and r3hexerltar). These copies contain the same code and do not call stdlib's erltar, so they are affected on any OTP version. OTP 28 is not affected, but an application running on OTP 28 is affected if it extracts archives through an affected version of hexcore, Hex or rebar3.
This issue affects OTP from OTP 29.0 before OTP 29.1.2, corresponding to stdlib from 8.0 before 8.1.1, and rebar3 from 3.27.1 before 3.28.0, and hex from 2.4.2 before 2.5.3; hexcore: from 0.14.0 before 0.20.1.
Details
1. Chunked extraction. erltar:extract/2 writes each member to disk through streamtofileloop/3. This function calls doread(Reader, ChunkSize) until the numbytes field of the reader is 0. The default chunk size is 65536 bytes.
2. Clause order in dosparseread/3. For a sparse member, doread/2 calls dosparseread/3. The clause for a trailing hole matches when sparsemap is [] and Pos < Size. It comes before the clause that returns when Len is 0.
3. Unbounded recursion. The member is a GNU sparse member (typeflag S) whose real size is larger than one chunk and whose sparse map ends before the real size. After the data fragments, the trailing-hole clause reads the rest of the chunk and recurses with Len = 0. The same clause matches again, and readsparsehole/3 returns an empty binary and leaves Pos unchanged. The zero-length clause is never reached, so the call never returns.
4. No mitigation from maxsize. For a sparse member, {maxsize, N} is checked against the real size from the header. It stops the loop only when N is below that size. erltar:table/2 lists the member as regular, so a caller cannot skip sparse members by type.
Proof of concept
1. Build a 2048-byte tar that holds one GNU sparse member (typeflag S). Give it a stored size of 4 bytes, one sparse map entry of 4 bytes at offset 0, and a real size of 1048576 bytes. Follow the 512-byte header with a 512-byte block that starts with the 4 data bytes, then 1024 zero bytes. 2. In a separate process, call erltar:extract({binary, Tar}, [{cwd, Dir}]). 3. The call does not return. After 5 seconds the process has used more than 10^9 reductions. On OTP 28 the same call returns ok.
Impact
An attacker who can get an application to extract a tar archive to disk keeps the extracting process and one scheduler busy forever. Each further archive occupies another scheduler, until the node stops responding.
Workarounds
Pass {chunks, N} together with {maxsize, N}, with the same value N, to erltar:extract/2. Extraction then rejects any member larger than N, and reads each remaining member in one call, so the loop cannot occur.
Alternatively, extract with the memory option and write the returned files to disk in the application.
Summary
Improper Validation of Consistency within Input vulnerability in Erlang OTP ssl (tlshandshake13, sslhandshake and tlsclientticketstore modules) allows a malicious TLS 1.3 server to cause a denial of service of the ssl application on the client node.
The TLS 1.3 client decodes the extensions of a NewSessionTicket message as if they came from EncryptedExtensions. It therefore accepts a 0-length earlydata extension, a form that is only valid in ClientHello and EncryptedExtensions. With {sessiontickets, auto}, the client stores the ticket in the node-global tlsclientticketstore. On the next automatic resumption, tlshandshake13:getmaxearlydata/1 crashes the store with a caseclause. Repeated crashes can exceed the restart intensity of the ssl supervisors, which use the restforone strategy, and take down ssl for all connections on the node.
This issue affects OTP from OTP 23.3 before OTP 27.3.4.19, OTP 28.5.0.8, and OTP 29.1.2, corresponding to ssl from 10.3 before 11.2.12.14, 11.6.0.7, and 11.7.8.
Details
1. Decoding. tlshandshake13:decodehandshake/2 decodes the extensions of a NewSessionTicket with the message type encryptedextensions. sslhandshake:decodeextensions/4 does not check the message type for most extensions. A 0-length earlydata extension therefore decodes to #earlydataindication{}, the ClientHello and EncryptedExtensions form, and not to #earlydataindicationnst{}, the 4-byte maxearlydatasize form that RFC 8446 requires in a NewSessionTicket.
2. Storage. In auto mode the client sends the ticket to the node-global tlsclientticketstore genserver, which keeps it for later resumption.
3. Crash. When a later connection resumes automatically, the store calls tlshandshake13:getmaxearlydata/1 on the stored extensions, from maybeuseticket and gettickets. That function only handles undefined and #earlydataindicationnst{}, so the store process crashes with a caseclause.
4. Escalation. The store is a permanent child of ssladminsup. Each restart of the store also restarts the children after it, because the supervisor uses restforone. A server that keeps sending the malformed ticket makes the crashes repeat. When the crashes exceed the supervisor restart intensity, the failure goes up through sslsup and stops the ssl application for the whole node.
The fix makes sslhandshake:decodeextensions/4 accept each extension form only in the handshake messages where it is permitted, and decodes NewSessionTicket extensions with the message type newsessionticket.
Impact
A malicious TLS 1.3 server can crash the client node's session ticket store, and by repeating the attack it can stop the ssl application for all TLS connections on that node. Only clients that use {sessiontickets, auto} are affected.
Workarounds
Do not set {sessiontickets, auto} on TLS 1.3 clients. Use manual ticket handling, or keep the default value disabled.
Configurations
Only TLS 1.3 clients that set the ssl option {sessiontickets, auto} are affected. The default value of sessiontickets is disabled, and clients that use manual ticket handling do not store tickets in the node-global ticket store. The client must also connect to a server that the attacker controls, or that the attacker can impersonate.
Summary
Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') vulnerability in erlang rebar3 allows a malicious package publisher to delete a directory outside the project's build directory and extract package files into it when a developer fetches dependencies.
A package release's dependencies in a Hex registry carry an app field that names the dependency's OTP application. rebar3 uses this field as the dependency's name without validating it (rebarpackages:parsedeps/1) and builds the dependency's directory from that name (rebarapputils:deptoapp/7). rebarfetch:downloadsourceonline/2 deletes that directory with rm -rf and moves the fetched package into it. hex.pm didn't restrict the field to a directory name before 2026-10-12, so a publisher could set it to a value such as ../../../../target. When a project depends on such a release directly or transitively, rebar3 get-deps deletes the directory the name resolves to and writes the dependency's files there. This happens before the dependency's own rebar.config.script is evaluated, and get-deps compiles nothing.
This issue affects rebar3: from 3.7.0-rc1 before 3.27.2.
Details
1. hex.pm's registry record lists each release's dependencies as maps with package, requirement, optional, app and repository. The app value comes from the publisher's package metadata and hex.pm doesn't restrict it to a directory name. The record is signed with the repository's key after the publisher has chosen the value, so the signature doesn't constrain it. 2. r3hexregistry:decodepackage/3 decodes each dependency, including app. 3. rebarpackages:parsedeps/1 sets the dependency's name to the app value, falling back to the package name: {maps:get(app, D, Name), {pkg, Name, Constraint, undefined, undefined}}. The name is stored in #package.dependencies and passed through rebarapputils:updatesource/3 and rebarprvinstalldeps:handledep/6. 4. rebarapputils:deptoapp/7 builds the fetch directory with filename:join([DepsDir, Name]) and no check. 5. rebarfetch:downloadsourceonline/2 runs rebarfileutils:rmrf(filename:absname(FetchDir)) and then rebarfileutils:mv(TmpDir, filename:absname(FetchDir)). filename:absname/1 doesn't collapse .. segments, and on Unix rmrf/1 runs rm -rf through the shell with rebarutils:escapechars/1, which doesn't escape / or ., so the .. segments resolve outside the deps directory. 6. The delete and overwrite happen for the dependency named by app before its own rebar.config.script is consulted (later in rebarfetch:downloadsource/2), and get-deps compiles nothing. rebar3 already runs publisher code during get-deps by evaluating a fetched package's rebar.config.script and installing a dependency's plugins; the app name adds a delete and overwrite outside build for a dependency named by its parent package.
Proof of concept
Reproduced with rebar3 3.27.0 on Erlang/OTP 29 against a local Hex repository, with origin and signature verification left on:
1. Build a signed local Hex repository serving parent 1.0.0, whose dependency is #{package => <<"evildep">>, requirement => <<"1.0.0">>, optional => false, app => <<"../../../../CANARYOUTSIDE">>}, and evildep 1.0.0. 2. Create a project with {deps, [{parent, "1.0.0"}]} that uses the local repository, and a file CANARYOUTSIDE/precious.txt one level above the project root. 3. Run rebar3 get-deps. It prints Fetching parent v1.0.0 and then Fetching ../../../../CANARYOUTSIDE v1.0.0. 4. CANARYOUTSIDE/precious.txt is gone and CANARYOUTSIDE/ holds evildep's extracted files (hexmetadata.config, src/evildep.app.src). No scripts, plugins or hooks are in either package.
Impact
A publisher of a package in a project's dependency tree can make rebar3 get-deps delete a directory outside the project's build directory that the developer's account can write, such as the project directory or its parent, and replace its contents with a dependency package's files. Replacing a directory whose contents are later run or loaded, such as a project directory whose rebar.config.script the next rebar3 command there evaluates, can lead to code execution. It works when the package is a transitive dependency and needs no compilation. Developers, CI jobs and dependency update bots that fetch dependencies with rebar3 are affected.
Configurations
Affects projects whose dependency tree, directly or transitively, contains a package release whose registry metadata gives a dependency a crafted app name, when dependencies are fetched with rebar3 get-deps or another command that fetches dependencies. hex.pm rejects such names when a release is published since 2026-10-12, and every requirement app name in hex.pm's public registry on 2026-10-06 was a letter followed by letters, digits, and -. Packages on other Hex repositories are affected when the repository operator signs such metadata.
Solutions
Upgrade rebar3 to 3.27.2 or later, for example with rebar3 local upgrade. rebar3 then fails with an error when a dependency's name, including the app name a package release gives a dependency, isn't a letter followed by letters, digits, and -.
Summary
Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') vulnerability in erlang rebar3 allows a malicious package publisher to delete a directory outside the project's build directory and extract package files into it when a developer fetches dependencies.
A package release's dependencies in a Hex registry carry an app field that names the dependency's OTP application. rebar3 uses this field as the dependency's name without validating it (rebarpackages:parsedeps/1) and builds the dependency's directory from that name (rebarapputils:deptoapp/7). rebarfetch:downloadsourceonline/2 deletes that directory with rm -rf and moves the fetched package into it. hex.pm didn't restrict the field to a directory name before 2026-10-12, so a publisher could set it to a value such as ../../../../target. When a project depends on such a release directly or transitively, rebar3 get-deps deletes the directory the name resolves to and writes the dependency's files there. This happens before the dependency's own rebar.config.script is evaluated, and get-deps compiles nothing.
This issue affects rebar3: from 3.7.0-rc1 before 3.27.2.
Details
1. hex.pm's registry record lists each release's dependencies as maps with package, requirement, optional, app and repository. The app value comes from the publisher's package metadata and hex.pm doesn't restrict it to a directory name. The record is signed with the repository's key after the publisher has chosen the value, so the signature doesn't constrain it. 2. r3hexregistry:decodepackage/3 decodes each dependency, including app. 3. rebarpackages:parsedeps/1 sets the dependency's name to the app value, falling back to the package name: {maps:get(app, D, Name), {pkg, Name, Constraint, undefined, undefined}}. The name is stored in #package.dependencies and passed through rebarapputils:updatesource/3 and rebarprvinstalldeps:handledep/6. 4. rebarapputils:deptoapp/7 builds the fetch directory with filename:join([DepsDir, Name]) and no check. 5. rebarfetch:downloadsourceonline/2 runs rebarfileutils:rmrf(filename:absname(FetchDir)) and then rebarfileutils:mv(TmpDir, filename:absname(FetchDir)). filename:absname/1 doesn't collapse .. segments, and on Unix rmrf/1 runs rm -rf through the shell with rebarutils:escapechars/1, which doesn't escape / or ., so the .. segments resolve outside the deps directory. 6. The delete and overwrite happen for the dependency named by app before its own rebar.config.script is consulted (later in rebarfetch:downloadsource/2), and get-deps compiles nothing. rebar3 already runs publisher code during get-deps by evaluating a fetched package's rebar.config.script and installing a dependency's plugins; the app name adds a delete and overwrite outside build for a dependency named by its parent package.
Proof of concept
Reproduced with rebar3 3.27.0 on Erlang/OTP 29 against a local Hex repository, with origin and signature verification left on:
1. Build a signed local Hex repository serving parent 1.0.0, whose dependency is #{package => <<"evildep">>, requirement => <<"1.0.0">>, optional => false, app => <<"../../../../CANARYOUTSIDE">>}, and evildep 1.0.0. 2. Create a project with {deps, [{parent, "1.0.0"}]} that uses the local repository, and a file CANARYOUTSIDE/precious.txt one level above the project root. 3. Run rebar3 get-deps. It prints Fetching parent v1.0.0 and then Fetching ../../../../CANARYOUTSIDE v1.0.0. 4. CANARYOUTSIDE/precious.txt is gone and CANARYOUTSIDE/ holds evildep's extracted files (hexmetadata.config, src/evildep.app.src). No scripts, plugins or hooks are in either package.
Impact
A publisher of a package in a project's dependency tree can make rebar3 get-deps delete a directory outside the project's build directory that the developer's account can write, such as the project directory or its parent, and replace its contents with a dependency package's files. Replacing a directory whose contents are later run or loaded, such as a project directory whose rebar.config.script the next rebar3 command there evaluates, can lead to code execution. It works when the package is a transitive dependency and needs no compilation. Developers, CI jobs and dependency update bots that fetch dependencies with rebar3 are affected.
Configurations
Affects projects whose dependency tree, directly or transitively, contains a package release whose registry metadata gives a dependency a crafted app name, when dependencies are fetched with rebar3 get-deps or another command that fetches dependencies. hex.pm rejects such names when a release is published since 2026-10-12, and every requirement app name in hex.pm's public registry on 2026-10-06 was a letter followed by letters, digits, and -. Packages on other Hex repositories are affected when the repository operator signs such metadata.
Solutions
Upgrade rebar3 to 3.27.2 or later, for example with rebar3 local upgrade. rebar3 then fails with an error when a dependency's name, including the app name a package release gives a dependency, isn't a letter followed by letters, digits, and -.
Summary
Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') vulnerability in erlang rebar3 allows a malicious package publisher to delete a directory outside the project's build directory and extract package files into it when a developer fetches dependencies.
A package release's dependencies in a Hex registry carry an app field that names the dependency's OTP application. rebar3 uses this field as the dependency's name without validating it (rebarpackages:parsedeps/1) and builds the dependency's directory from that name (rebarapputils:deptoapp/7). rebarfetch:downloadsourceonline/2 deletes that directory with rm -rf and moves the fetched package into it. hex.pm didn't restrict the field to a directory name before 2026-10-12, so a publisher could set it to a value such as ../../../../target. When a project depends on such a release directly or transitively, rebar3 get-deps deletes the directory the name resolves to and writes the dependency's files there. This happens before the dependency's own rebar.config.script is evaluated, and get-deps compiles nothing.
This issue affects rebar3: from 3.7.0-rc1 before 3.27.2.
Details
1. hex.pm's registry record lists each release's dependencies as maps with package, requirement, optional, app and repository. The app value comes from the publisher's package metadata and hex.pm doesn't restrict it to a directory name. The record is signed with the repository's key after the publisher has chosen the value, so the signature doesn't constrain it. 2. r3hexregistry:decodepackage/3 decodes each dependency, including app. 3. rebarpackages:parsedeps/1 sets the dependency's name to the app value, falling back to the package name: {maps:get(app, D, Name), {pkg, Name, Constraint, undefined, undefined}}. The name is stored in #package.dependencies and passed through rebarapputils:updatesource/3 and rebarprvinstalldeps:handledep/6. 4. rebarapputils:deptoapp/7 builds the fetch directory with filename:join([DepsDir, Name]) and no check. 5. rebarfetch:downloadsourceonline/2 runs rebarfileutils:rmrf(filename:absname(FetchDir)) and then rebarfileutils:mv(TmpDir, filename:absname(FetchDir)). filename:absname/1 doesn't collapse .. segments, and on Unix rmrf/1 runs rm -rf through the shell with rebarutils:escapechars/1, which doesn't escape / or ., so the .. segments resolve outside the deps directory. 6. The delete and overwrite happen for the dependency named by app before its own rebar.config.script is consulted (later in rebarfetch:downloadsource/2), and get-deps compiles nothing. rebar3 already runs publisher code during get-deps by evaluating a fetched package's rebar.config.script and installing a dependency's plugins; the app name adds a delete and overwrite outside build for a dependency named by its parent package.
Proof of concept
Reproduced with rebar3 3.27.0 on Erlang/OTP 29 against a local Hex repository, with origin and signature verification left on:
1. Build a signed local Hex repository serving parent 1.0.0, whose dependency is #{package => <<"evildep">>, requirement => <<"1.0.0">>, optional => false, app => <<"../../../../CANARYOUTSIDE">>}, and evildep 1.0.0. 2. Create a project with {deps, [{parent, "1.0.0"}]} that uses the local repository, and a file CANARYOUTSIDE/precious.txt one level above the project root. 3. Run rebar3 get-deps. It prints Fetching parent v1.0.0 and then Fetching ../../../../CANARYOUTSIDE v1.0.0. 4. CANARYOUTSIDE/precious.txt is gone and CANARYOUTSIDE/ holds evildep's extracted files (hexmetadata.config, src/evildep.app.src). No scripts, plugins or hooks are in either package.
Impact
A publisher of a package in a project's dependency tree can make rebar3 get-deps delete a directory outside the project's build directory that the developer's account can write, such as the project directory or its parent, and replace its contents with a dependency package's files. Replacing a directory whose contents are later run or loaded, such as a project directory whose rebar.config.script the next rebar3 command there evaluates, can lead to code execution. It works when the package is a transitive dependency and needs no compilation. Developers, CI jobs and dependency update bots that fetch dependencies with rebar3 are affected.
Configurations
Affects projects whose dependency tree, directly or transitively, contains a package release whose registry metadata gives a dependency a crafted app name, when dependencies are fetched with rebar3 get-deps or another command that fetches dependencies. hex.pm rejects such names when a release is published since 2026-10-12, and every requirement app name in hex.pm's public registry on 2026-10-06 was a letter followed by letters, digits, and -. Packages on other Hex repositories are affected when the repository operator signs such metadata.
Solutions
Upgrade rebar3 to 3.27.2 or later, for example with rebar3 local upgrade. rebar3 then fails with an error when a dependency's name, including the app name a package release gives a dependency, isn't a letter followed by letters, digits, and -.
Summary
Inefficient algorithmic complexity in the Erlang/OTP asn1 OBJECT IDENTIFIER decoder allows a remote unauthenticated attacker to cause denial of service by sending a crafted OID during the TLS handshake.
The BER OID decoder asn1rttber:decsubidentifiers/3 in lib/asn1/src/asn1rttber.erl and the equivalent PER helper asn1rttpercommon:decsubidentifiers/3 in lib/asn1/src/asn1rttpercommon.erl accumulate a base-128 subidentifier into an unbounded integer using (Av bsl 7) + H per continuation byte. Each shift and addition on the growing accumulator is linear in the number of bits already accumulated, giving quadratic total work in the size of a single subidentifier. The JER helper asn1rttjer:json2oid/1 in lib/asn1/src/asn1rttjer.erl exhibits the same class of unbounded-integer parsing when decoding a dot-separated OID from JSON. A DER-encoded OBJECT IDENTIFIER with one very large arc (approximately 262 KB of continuation bytes) consumes roughly 13 seconds of CPU on typical hardware.
The vulnerable decoder is generated into every ASN.1 module that contains an OBJECT IDENTIFIER, including OTP-PUB-KEY which is reached during X.509 certificate parsing via publickey:pkixdecodecert/2. This decoder runs before any signature or trust chain verification, so any Erlang service that parses peer TLS certificates is exposed: the default for TLS clients (which always parse the server certificate) and for mutual-TLS servers (which parse client certificates).
This vulnerability is associated with program files lib/asn1/src/asn1rttber.erl, lib/asn1/src/asn1rttpercommon.erl and lib/asn1/src/asn1rttjer.erl and program routines asn1rttber:decsubidentifiers/3, asn1rttpercommon:decsubidentifiers/3 and asn1rttjer:json2oid/1.
This issue affects OTP from OTP 17.0 before OTP 27.3.4.18, OTP 28.5.0.7, and OTP 29.1.1, corresponding to asn1 from 3.0 before 5.3.4.3, 5.4.3.1, and 5.5.2. Whether OTP before OTP 17.0, corresponding to asn1 before 3.0, is affected is unknown.
Summary
Allocation of Resources Without Limits or Throttling vulnerability in Erlang/OTP ssh allows an authenticated remote attacker to exhaust node memory by repeatedly opening session channels that are never assigned a handler.
The "session" clause of sshconnection:handlemsg/4 checks only minimalremotemaxpacketsize before calling setupsession/5, which unconditionally builds a #channel{} record and stores it in the ETS channel cache. The maxchannels daemon option is consulted only by sshchannelsup:maxnumchannelsnotexceeded/2, which counts supervisor children, so a channel that never gets a shell, exec, or subsystem handler is invisible to the limit and setting the option to a finite value does not mitigate the attack. RFC 4254 section 5.1 permits many session channels per connection, and each record costs only a few hundred bytes, so a single authenticated connection can accumulate channels until the node runs out of memory and the emulator terminates, affecting every application on it. No file contents, credentials, or write access are obtainable.
This issue affects OTP from OTP 18.1.2 before OTP 27.3.4.18, OTP 28.5.0.7, and OTP 29.1.1, corresponding to ssh from 4.1.1 before 5.2.11.13, 5.5.2.6, and 6.0.6. Whether OTP before OTP 18.1.2, corresponding to ssh before 4.1.1, is affected is unknown.
Workarounds
No option bounds the number of idle session channels, so the following reduce exposure without eliminating the issue.
Restrict network access to the SSH daemon to trusted clients. Exploitation requires a successfully authenticated session, so limiting who can authenticate is the most effective control available. Set the maxsessions daemon option to a finite value to bound the number of concurrent connections. This limits how many connections can mount the attack in parallel, though a single connection still suffices to exhaust memory. Apply operating-system or firewall connection-rate and connection-count limits per source address. Monitor node memory externally and restart the emulator when it exceeds a threshold.
Setting maxchannels is not a workaround: idle session channels bypass that check entirely.
Summary
Allocation of Resources Without Limits or Throttling vulnerability in Erlang/OTP ssh allows an authenticated remote attacker to exhaust node memory by repeatedly opening session channels that are never assigned a handler.
The "session" clause of sshconnection:handlemsg/4 checks only minimalremotemaxpacketsize before calling setupsession/5, which unconditionally builds a #channel{} record and stores it in the ETS channel cache. The maxchannels daemon option is consulted only by sshchannelsup:maxnumchannelsnotexceeded/2, which counts supervisor children, so a channel that never gets a shell, exec, or subsystem handler is invisible to the limit and setting the option to a finite value does not mitigate the attack. RFC 4254 section 5.1 permits many session channels per connection, and each record costs only a few hundred bytes, so a single authenticated connection can accumulate channels until the node runs out of memory and the emulator terminates, affecting every application on it. No file contents, credentials, or write access are obtainable.
This issue affects OTP from OTP 18.1.2 before OTP 27.3.4.18, OTP 28.5.0.7, and OTP 29.1.1, corresponding to ssh from 4.1.1 before 5.2.11.13, 5.5.2.6, and 6.0.6. Whether OTP before OTP 18.1.2, corresponding to ssh before 4.1.1, is affected is unknown.
Workarounds
No option bounds the number of idle session channels, so the following reduce exposure without eliminating the issue.
Restrict network access to the SSH daemon to trusted clients. Exploitation requires a successfully authenticated session, so limiting who can authenticate is the most effective control available. Set the maxsessions daemon option to a finite value to bound the number of concurrent connections. This limits how many connections can mount the attack in parallel, though a single connection still suffices to exhaust memory. Apply operating-system or firewall connection-rate and connection-count limits per source address. Monitor node memory externally and restart the emulator when it exceeds a threshold.
Setting maxchannels is not a workaround: idle session channels bypass that check entirely.
Summary
Key Exchange without Entity Authentication vulnerability in Erlang/OTP ssl allows a peer that answers a TLS 1.3 client connection to impersonate the intended server. A presharedkey extension in the ServerHello that the client never offered causes the client to complete the handshake without validating the server's certificate, so ssl:connect returns {ok, Socket} against a peer holding no certificate, no private key and no prior session.
tlsclientconnection13:handleserverhello/2 passes the received extension to tlsgenconnection13:handleresumption/2, which sets resumption = true on its mere presence without checking that the client offered a PSK. tlshandshake13:getpresharedkey/4 meanwhile falls back to the all-zero "no PSK" value and keys the handshake with the ordinary non-PSK schedule, so the attacker's own ephemeral key suffices. The resumption flag then routes mayberesumption/1 straight to waitfinished, skipping the certificate-handling states, so certificate path validation, verifyfun, hostname verification, partialchain, CRL checking and OCSP stapling are all bypassed. The default client configuration is affected; clients restricted to TLS 1.2 are not.
This issue affects OTP from OTP 22.2 before OTP 27.3.4.18, OTP 28.5.0.7, and OTP 29.1.1, corresponding to ssl from 9.5 before 11.2.12.13, 11.6.0.6, and 11.7.7.
Impact
An attacker that answers a TLS 1.3 client connection, either as the host the client dials or as an on-path attacker, completes the handshake as the intended server and holds all traffic keys. It can read everything the application sends, including credentials, tokens and request bodies, and forge every response. Any consumer of ssl:connect that negotiates TLS 1.3 is affected, including httpc over HTTPS, database and messaging client libraries, and TLS distribution clients.
Workarounds
Restrict affected clients to TLS 1.2 by setting {versions, ['tlsv1.2']} in the client's ssl options. This avoids the vulnerable code path at the cost of losing TLS 1.3.
No configuration both keeps TLS 1.3 and mitigates the issue.
Summary
Key Exchange without Entity Authentication vulnerability in Erlang/OTP ssl allows a peer that answers a TLS 1.3 client connection to impersonate the intended server. A presharedkey extension in the ServerHello that the client never offered causes the client to complete the handshake without validating the server's certificate, so ssl:connect returns {ok, Socket} against a peer holding no certificate, no private key and no prior session.
tlsclientconnection13:handleserverhello/2 passes the received extension to tlsgenconnection13:handleresumption/2, which sets resumption = true on its mere presence without checking that the client offered a PSK. tlshandshake13:getpresharedkey/4 meanwhile falls back to the all-zero "no PSK" value and keys the handshake with the ordinary non-PSK schedule, so the attacker's own ephemeral key suffices. The resumption flag then routes mayberesumption/1 straight to waitfinished, skipping the certificate-handling states, so certificate path validation, verifyfun, hostname verification, partialchain, CRL checking and OCSP stapling are all bypassed. The default client configuration is affected; clients restricted to TLS 1.2 are not.
This issue affects OTP from OTP 22.2 before OTP 27.3.4.18, OTP 28.5.0.7, and OTP 29.1.1, corresponding to ssl from 9.5 before 11.2.12.13, 11.6.0.6, and 11.7.7.
Impact
An attacker that answers a TLS 1.3 client connection, either as the host the client dials or as an on-path attacker, completes the handshake as the intended server and holds all traffic keys. It can read everything the application sends, including credentials, tokens and request bodies, and forge every response. Any consumer of ssl:connect that negotiates TLS 1.3 is affected, including httpc over HTTPS, database and messaging client libraries, and TLS distribution clients.
Workarounds
Restrict affected clients to TLS 1.2 by setting {versions, ['tlsv1.2']} in the client's ssl options. This avoids the vulnerable code path at the cost of losing TLS 1.3.
No configuration both keeps TLS 1.3 and mitigates the issue.
Summary
Improper Validation of Specified Quantity in Input vulnerability in Erlang/OTP eldap allows a malicious or compromised LDAP server to degrade availability by returning a referral URL whose port component is a very long run of digits.
eldap:parseport/2 passes the port substring straight to listtointeger/1 with no length bound. The surrounding try ... catch only rejects a value that fails to parse, so a syntactically valid port of up to roughly 1.26 million digits converts successfully and costs the caller hundreds of milliseconds of arbitrary-precision arithmetic per referral. The conversion function itself is documented to accept integers of any size, so bounding the input is the caller's responsibility. Reaching the flaw requires the application to pass a server-supplied referral to eldap:parseldapurl/1, which eldap never calls itself: referral strings are returned to the caller unparsed.
This issue affects OTP from OTP 17.0 before OTP 27.3.4.17, OTP 28.5.0.6, and OTP 29.0.6, corresponding to eldap from 1.0.3 before 1.2.14.2, 1.2.16.1, and 1.3.1.
Summary
Improper Validation of Specified Quantity in Input vulnerability in Erlang/OTP snmp allows a remote attacker to degrade availability by sending an SNMP message containing a BER INTEGER whose length field is arbitrarily large.
snmppdus:decintegernotag/1 defaults its size limit to infinity, and dodecintegernotag/2 then accumulates the value across every declared byte with a recursive shift and bitwise or. Work grows superlinearly in the declared length because each operation acts on a progressively larger bignum. The size-limited variant decintegernotag/2 exists but is reached from only one call site, decsnmpversion/1, which bounds the version field to ten bytes; the request identifier, error status and index, generic and specific trap fields, engine boots and time, and every varbind value decoded by decvalue/1 all use the unbounded form. The decode runs before the PDU is processed, so no valid request is required beyond what the deployment demands to accept the message at all.
This issue affects OTP from OTP 17.0 before OTP 27.3.4.17, OTP 28.5.0.6, and OTP 29.0.6, corresponding to snmp from 4.25.1 before 5.18.2.1, 5.20.2.2, and 5.20.5. Whether OTP before OTP 17.0, corresponding to snmp before 4.25.1, is affected is unknown.
Summary
An attacker that connects to an open Erlang TCP port that uses the inet driver with {packet,4} mode can use a signed overflow in an incorrect packet length calculation to overflow the receive buffer into the VM allocator area and beyond up to about 2 GB.
This would easily trash the allocated block's allocator metadata footer, and the next block, if any, and most likely cause the BEAM VM to crash. Utilizing this with precision enough to achieve Remote Code Execution would be extremely unfeasible.
This issue affects OTP from OTP 17.0 before OTP 27.3.4.17, OTP 28.5.0.6, and OTP 29.0.6, corresponding to erts from 6.0 before 15.2.7.13, 16.4.0.6, and 17.0.6. Whether OTP before OTP 17.0, corresponding to erts before 6.0, is affected is unknown.
Summary
The modauth module in OTP's inets httpd server, when configured with dets or mnesia authentication backends and multiple directory configuration blocks, collapses all directory blocks into a single shared user/group namespace. A user added to one protected directory is accepted as valid for all other protected directories on the same server instance.
This issue affects OTP from OTP 17.0 before OTP 27.3.4.17, OTP 28.5.0.6, and OTP 29.0.6, corresponding to inets from 5.10 before 9.3.2.7, 9.6.2.3, and 9.7.2. Whether OTP before OTP 17.0, corresponding to inets before 5.10, is affected is unknown.
Summary
The modauth module in OTP's inets httpd server, when configured with dets or mnesia authentication backends and multiple directory configuration blocks, collapses all directory blocks into a single shared user/group namespace. A user added to one protected directory is accepted as valid for all other protected directories on the same server instance.
This issue affects OTP from OTP 17.0 before OTP 27.3.4.17, OTP 28.5.0.6, and OTP 29.0.6, corresponding to inets from 5.10 before 9.3.2.7, 9.6.2.3, and 9.7.2. Whether OTP before OTP 17.0, corresponding to inets before 5.10, is affected is unknown.
Summary
Improper Validation of Specified Quantity in Input vulnerability in Erlang/OTP stdlib allows a remote attacker to degrade availability by supplying a URI whose port component is a very long run of digits.
uristring:getport/1 passes the port substring to binarytointeger/1 with no length bound, catching only error:badarg, so a syntactically valid port of up to roughly 1.26 million digits converts successfully and costs the calling process hundreds of milliseconds of arbitrary-precision arithmetic. The conversion is reached from every authority-parsing path in uristring:parse/1, including the host, registered-name, and IPv4 and IPv6 forms. parse/1 is the documented interface for parsing URIs, so any application that parses an attacker-supplied URI is exposed without further configuration. The conversion function is documented to accept integers of any size, so bounding the input is the caller's responsibility.
This issue affects OTP from OTP 21.0 before OTP 27.3.4.17, OTP 28.5.0.6, and OTP 29.0.6, corresponding to stdlib from 3.5 before 6.2.2.5, 7.3.0.2, and 8.0.4.
Summary
Missing Release of Resource after Effective Lifetime vulnerability in Erlang/OTP inets httpd allows an unauthenticated remote attacker to cause denial of service by sending valid request headers with a large Content-Length and then stalling before the body is complete.
httpdrequesthandler:handleinfo/2 cancels the request timeout as soon as a parse step succeeds, which includes the headers, and the clause that handles a decoder asking for more data re-arms the socket with {active, once} without setting any further timer. httpdrequest:wholebody/2 returns such a continuation whenever the bytes received are fewer than the announced Content-Length, so a well-formed request that stops mid-body leaves the worker waiting indefinitely. The periodic byte-rate check that would reclaim it is armed only when minimumbytespersecond is configured, which it is not by default. Repeating this across connections occupies every worker permitted by maxclients and denies service to legitimate clients at negligible bandwidth cost.
This issue affects OTP from OTP 17.0 before OTP 27.3.4.17, OTP 28.5.0.6, and OTP 29.0.6, corresponding to inets from 5.10 before 9.3.2.7, 9.6.2.3, and 9.7.2. Whether OTP before OTP 17.0, corresponding to inets before 5.10, is affected is unknown.
Workarounds
Set minimumbytespersecond in the httpd configuration, for example {minimumbytespersecond, 200}. This arms a periodic byte-rate check that terminates a connection which has stopped delivering data, reclaiming the parked worker. The check is disabled by default. Place a reverse proxy in front of httpd that enforces its own body-read timeout, such as clientbodytimeout in nginx. Restrict access to the server to trusted clients where the deployment allows it.
Summary
Improper Validation of Specified Quantity in Input vulnerability in Erlang/OTP inets httpc allows a malicious or compromised HTTP server to degrade availability by returning a numeric header whose value is a very long run of digits.
httpchandler.erl converts the server-supplied Content-Length with listtointeger/1 before comparing it against maxbodysize, so the size check cannot protect the conversion, and the option defaults to nolimit in any case. The same unbounded conversion appears in httpcresponse:formatresponse/1 for Content-Length and in httpcresponse:getmsfromretryafter/1 for Retry-After, which is guarded only by a check that the first character is a digit. A value of up to roughly 1.26 million digits converts successfully and costs the requesting process hundreds of milliseconds of arbitrary-precision arithmetic per response. The conversion function is documented to accept integers of any size, so bounding the input is the caller's responsibility.
This issue affects OTP from OTP 17.0 before OTP 27.3.4.17, OTP 28.5.0.6, and OTP 29.0.6, corresponding to inets from 5.10 before 9.3.2.7, 9.6.2.3, and 9.7.2. Whether OTP before OTP 17.0, corresponding to inets before 5.10, is affected is unknown.
Summary
Improper Validation of Specified Quantity in Input vulnerability in Erlang/OTP inets httpc allows a malicious or compromised HTTP server to degrade availability by returning a numeric header whose value is a very long run of digits.
httpchandler.erl converts the server-supplied Content-Length with listtointeger/1 before comparing it against maxbodysize, so the size check cannot protect the conversion, and the option defaults to nolimit in any case. The same unbounded conversion appears in httpcresponse:formatresponse/1 for Content-Length and in httpcresponse:getmsfromretryafter/1 for Retry-After, which is guarded only by a check that the first character is a digit. A value of up to roughly 1.26 million digits converts successfully and costs the requesting process hundreds of milliseconds of arbitrary-precision arithmetic per response. The conversion function is documented to accept integers of any size, so bounding the input is the caller's responsibility.
This issue affects OTP from OTP 17.0 before OTP 27.3.4.17, OTP 28.5.0.6, and OTP 29.0.6, corresponding to inets from 5.10 before 9.3.2.7, 9.6.2.3, and 9.7.2. Whether OTP before OTP 17.0, corresponding to inets before 5.10, is affected is unknown.
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 BITBINARYEXT 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 binarytoterm/2 (which only restricts atom creation and does not perform structural validation of binary encodings).
Any application that decodes ETF from untrusted sources via binarytoterm/1,2 or enifbinarytoterm() 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 29.0.4, OTP 28.5.0.4 and OTP 27.3.4.15, corresponding to erts from 15.0 before 17.0.4, 16.4.0.4 and 15.2.7.11.