See how erlang compares to other vendors in security performance
Summary
Uncontrolled Resource Consumption, Deserialization of Untrusted Data vulnerability in hexpm hexcore (hexapi modules), hexpm hex (mixhexapi modules), erlang rebar3 (r3hexapi modules) allows Object Injection, Excessive Allocation.
This vulnerability is associated with program files src/hexapi.erl, src/mixhexapi.erl, apps/rebar/src/vendored/r3hexapi.erl and program routines hexcore:request/4, mixhexapi:request/4, r3hexapi:request/4.
This issue affects rebar3: from 3.9.1 before 3.27.0; hex: from 2.3.0 before 2.3.2; hexcore: from 0.1.0 before 0.12.1.
Summary
XML External Entity (XXE) vulnerability in esaml (and its forks) allows an attacker to cause the system to read local files and incorporate their contents into processed SAML documents, and potentially perform SSRF via crafted SAML messages.
esaml parses attacker-controlled SAML messages using xmerlscan:string/2 before signature verification without disabling XML entity expansion. On Erlang/OTP versions before 27, Xmerl allows entities by default, enabling pre-signature XXE attacks. An attacker can cause the host to read local files (e.g., Kubernetes-mounted secrets) into the SAML document. If the attacker is not a trusted SAML SP, signature verification will fail and the document is discarded, but file contents may still be exposed through logs or error messages.
This issue affects all versions of esaml, including forks by arekinath, handnot2, and dropbox. Users running on Erlang/OTP 27 or later are not affected due to Xmerl defaulting to entities disabled.
This issue affects esaml: all versions.
Workarounds
Upgrade to Erlang/OTP 27 or later. Starting with OTP 27, xmerlscan disables entity expansion by default, which mitigates this vulnerability without changes to esaml.
Configurations
The application must use esaml to process SAML messages and run on Erlang/OTP versions before 27. Starting with OTP 27, xmerlscan disables entity expansion by default, which mitigates this vulnerability.
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
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 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
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
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.
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
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
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 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
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
The Erlang/OTP ssl application does not detect cycles when reconstructing an incomplete peer certificate chain during a TLS or DTLS handshake. In sslcertificate:handleincompletechain/5, the received chain is passed to sslcertificate:buildcertificatechain/5, which walks issuer relationships via sslcertificate:docertificatechain/7 with no cycle detection and no depth limit. When the peer supplies two mutually cross-signed certificates in unordered form (A issues B, B issues A), the issuer lookup alternates between the two certificates and the pair of functions recurses indefinitely, growing the call stack and chain accumulator without bound.
An unauthenticated remote attacker can send a crafted certificate chain in a TLS or DTLS Certificate handshake message to exhaust available memory and crash the BEAM node. Only a TCP connection and a partial handshake are required; no authentication or completed handshake is needed, and both TLS/DTLS servers and clients are affected when processing peer certificate messages.
This issue affects OTP from OTP 23.2 before OTP 27.3.4.15, OTP 28.5.0.4, and OTP 29.0.4, corresponding to ssl from 10.2 before 11.2.12.11, 11.6.0.4, and 11.7.4.
Summary
Allocation of resources without limits in Erlang/OTP publickey certificate path validation allows a remote unauthenticated attacker to cause denial of service by sending a crafted X.509 certificate chain during the TLS handshake.
During RFC 5280 policy processing in publickey:pkixpathvalidation/3, the certificate policy tree maintained by pubkeypolicytree grows without an upper bound. When a certificate chain contains M policies per certificate and K certificates, the tree grows on the order of M^K nodes because pubkeypolicytree:addleaves/2 and pubkeypolicytree:addleafsiblings/2 extend the tree per policy per certificate. A modest chain with many policies per certificate is enough to pin BEAM schedulers and exhaust the node's memory, taking down the entire VM. The attacker only needs to be able to present a certificate chain to the victim, which is the normal precondition for a TLS handshake, so exploitation succeeds against any incoming or outgoing TLS connection that validates the peer's chain (the default for SSL/TLS clients and mutual-TLS servers).
This is the same vulnerability class as OpenSSL's X509verifycert policy tree DoS.
This vulnerability is associated with program files lib/publickey/src/pubkeypolicytree.erl and program routines pubkeypolicytree:addleaves/2 and pubkeypolicytree:addleafsiblings/2.
This issue affects OTP from OTP 26.2 before OTP 27.3.4.15, OTP 28.5.0.4, and OTP 29.0.4, corresponding to publickey from 1.15 before 1.17.1.5, 1.20.3.4, and 1.21.4.
Summary
Server-Side Request Forgery (SSRF) vulnerability in Erlang/OTP ftp (ftpinternal module) allows FTP bounce attacks and SSRF via an unvalidated PASV response IP address.
The ftpinternal:handlectrlresult/2 PASV handler (mode=passive, ipfamily=inet, ftpextension=false) extracts the IP address from the server's 227 response and passes it directly to gentcp:connect/4 without validating it against the control connection peer address. The adjacent EPSV handlers correctly call peername(CSock) to derive the IP from the control connection, but the PASV handler does not. A malicious or compromised FTP server can redirect the client's data connection to an arbitrary internal host and port. On read operations (ftp:ls/1,2, ftp:nlist/1,2, ftp:recv/2,3), data from the redirected target is returned to the caller. On write operations (ftp:send/2,3, ftp:append/2,3), file content is sent to the redirected target. This enables SSRF against internal hosts, cloud metadata endpoints, and FTP bounce attacks against third-party hosts.
The vulnerable path is the default configuration (mode=passive, ipfamily=inet, ftpextension=false). RFC 2577 section 3 explicitly recommends validating the PASV response IP against the control connection peer.
The ftp application is deprecated and scheduled for removal in OTP-30.
This vulnerability is associated with program files lib/inets/src/ftp/ftpinternal.erl (inets 5.10.4 through 6.5, OTP 17.4 through 20.3) and lib/ftp/src/ftpinternal.erl (ftp 1.0 and later, OTP 21.0 and later).
This issue affects OTP from OTP 17.4 before OTP 27.3.4.13, OTP 28.5.0.2, and OTP 29.0.2, corresponding to ftp from 1.0 before 1.2.3.1, 1.2.4.1, and 1.2.6, and inets from 5.10.4 before 7.0.
Workarounds
Pass {ftpextension, true} to ftp:open/2 to use EPSV instead of PASV. Alternatively, pass {mode, active} to use active mode, or pass {ipfamily, inet6} to force IPv6, both of which bypass the vulnerable PASV path.
Configurations
The vulnerable path is active under the default configuration: mode=passive, ipfamily=inet, and ftpextension=false are all defaults for ftp:open/2.
Summary
Use of Default Cryptographic Key vulnerability in Erlang/OTP ssl (DTLS server) allows predictable DTLS cookie computation during the startup window, enabling source address verification bypass.
On DTLS server startup, dtlsserverconnection:initialhello/3 initializes previouscookiesecret to the empty binary (<<>>) instead of a random value. Because HMAC with an empty key is deterministic, anyone who observes the plaintext ClientHello can compute dtlshandshake:cookie(<<>>, IP, Port, Hello) and forge a valid DTLS cookie before the first rotation of the cookie secret. The DTLS cookie (RFC 6347 §4.2.1) is a denial-of-service mitigation that prevents spoofed source IPs from forcing the server to allocate state and perform expensive cryptographic operations; it is not an authentication mechanism. During the window from server startup until the first secret rotation (0 to 15 seconds), an attacker who can observe the plaintext ClientHello can bypass the source address verification, enabling DTLS handshake amplification with spoofed source addresses.
This vulnerability is associated with program file lib/ssl/src/dtlsserverconnection.erl and program routine dtlsserverconnection:initialhello/3.
This issue affects OTP from OTP 20.0 before OTP 27.3.4.14, OTP 28.5.0.3, and OTP 29.0.3, corresponding to ssl from 8.2 before 11.2.12.10, 11.6.0.3, and 11.7.3.
Summary
Exposure of Sensitive Information to an Unauthorized Actor vulnerability in Erlang OTP ssh (sshsftpd module) allows File Discovery.
The SSHFXPREADLINK handler in sshsftpd sends the raw result of file:readlink/2 to the client without calling chrootfilename/2 to strip the backend root prefix. An authenticated SFTP client can create a symlink inside the chroot pointing to /; sshsftpd resolves the target to the absolute backend root and stores it on disk. Reading the symlink back via SSHFXPREADLINK returns that absolute path, for example /data/sftp, instead of the chrooted value /.
The information disclosed is the absolute filesystem path of the SFTP root directory and of any symlink targets within it. No file contents, credentials, or access to paths outside the root directory are obtainable through this issue alone.
This vulnerability is associated with program files lib/ssh/src/sshsftpd.erl.
This issue affects OTP from OTP 17.0 before OTP 27.3.4.13, OTP 28.5.0.2, and OTP 29.0.2, corresponding to ssh from 3.0.1 before 5.2.11.8, 5.5.2.1, and 6.0.1. Whether OTP before OTP 17.0, corresponding to ssh before 3.0.1, is affected is unknown.
Workarounds
Use OS-level chroot to run the Erlang VM/SFTP server process in an isolated filesystem environment, eliminating reliance on the application-level root option. Ensure that the SFTP server port is not reachable from untrusted machines. Ensure that no sensitive information (usernames, project names, mount topology) is inferrable from the absolute path of the configured root directory.
Configurations
The SFTP subsystem must be enabled on the SSH server and the root option must be configured in the sshsftpd:subsystemspec/1 call. Deployments without the root option are not affected.
Summary
Stack-based Buffer Overflow vulnerability in Erlang OTP erts (inetdrv) allows an unauthenticated remote attacker to crash the BEAM VM by sending a crafted SCTP ERROR chunk.
The sctpparseerrorchunk function in erts/emulator/drivers/common/inetdrv.c parses SCTP ERROR chunks and writes cause codes into a fixed-size stack-allocated ErlDrvTermData spec[] array without checking bounds. A remote attacker who has established an SCTP association to a listening port can send a single crafted SCTP ERROR chunk containing enough cause codes to overflow the stack buffer, crashing the VM. The attacker can only write 16-bit values interleaved with a fixed tag, so the overflow does not provide a controlled return address, limiting exploitation to Denial of Service.
A crafted SCTP ERROR chunk may also leak bits and pieces of Erlang VM memory into the received error packet observed by the Erlang process. Such data is already readable by the user running the Erlang VM, so the disclosure scope is limited.
This issue affects OTP from OTP 17.0 before OTP 27.3.4.13, OTP 28.5.0.2, and OTP 29.0.2, corresponding to erts from 6.0 before 15.2.7.9, 16.4.0.2, and 17.0.2. Whether OTP before OTP 17.0, corresponding to erts before 6.0, is affected is unknown.
Configurations
SCTP support must be compiled into OTP. A listening SCTP socket must be opened via gensctp with the default inet backend and must be reachable from the attacker's network. Windows builds are unaffected as SCTP is not supported on Windows.
Summary
Stack-based Buffer Overflow vulnerability in Erlang OTP (erlinterface) allows Stack-based Buffer Overflow.
This vulnerability is associated with program file lib/erlinterface/src/misc/eiprintterm.c and program routine eisprintterm.
The C function eisprintterm uses an internal 2000-character stack buffer to format terms. When called with an encoded Erlang term containing a very large integer (encoded representation exceeding 2000 characters), the buffer overflows. The overflow bytes are restricted to the ASCII values of 0-9 and A-F, which limits exploitation to Denial of Service.
The companion function eiprintterm, which prints directly to a FILE instead of a memory buffer, does not contain this bug.
This issue affects OTP from OTP 17.0 before OTP 27.3.4.13, OTP 28.5.0.2, and OTP 29.0.2, corresponding to erlinterface from 3.7.16 before 5.5.2.1, 5.7.0.1, and 5.8.1. Whether OTP before OTP 17.0, corresponding to erlinterface before 3.7.16, is affected is unknown.
Workarounds
Avoid calling eisprintterm with untrusted data whose encoded integer representation could exceed 2000 characters.
Summary
Reliance on IP Address for Authentication vulnerability in Erlang/OTP ssl (inettlsdist module) allows unauthenticated bypass of the distribution-over-TLS LAN allowlist.
The inettlsdist:checkip/1 function, which enforces a LAN allowlist for Erlang distribution over TLS, calls inet:sockname/1 instead of inet:peername/1 to obtain the peer's IP address. Because inet:sockname/1 returns the local socket address, both the local IP and the supposed peer IP resolve to the same value, causing the subnet mask comparison to always succeed regardless of the actual remote address. Any holder of a CA-signed TLS certificate can therefore bypass the LAN restriction and gain full Erlang distribution access to the node, including rpc:call/4 and code:loadbinary/3.
This vulnerability is associated with program file lib/ssl/src/inettlsdist.erl.
This issue affects OTP from OTP 26.0 before OTP 27.3.4.13, OTP 28.5.0.2, and OTP 29.0.2, corresponding to ssl from 11.0 before 11.2.12.9, 11.6.0.2, and 11.7.2.
Workarounds
Implement a custom verifyfun SSL option that correctly checks the peer IP address using inet:peername/1 on the socket.
Configurations
The Erlang distribution must be configured to use TLS (inettlsdist) with the checkip option enabled. The default Erlang distribution configuration does not use TLS and is not affected.
Summary
Sensitive Data Exposure vulnerability in Erlang OTP inets (httpcresponse module) allows Retrieve Embedded Sensitive Data.
The httpc client forwards the Authorization and Proxy-Authorization request headers to redirect targets without checking whether the redirect crosses an origin boundary. httpcresponse:redirect/2 constructs the redirected request by updating only the host field of the header record; all other fields (including authorization and proxyauthorization) are copied verbatim. The redirect target host is never compared against the original host.
autoredirect defaults to true, so this affects all httpc callers that do not explicitly disable automatic redirects.
An attacker who controls a server that the victim contacts via httpc can issue a cross-origin 3xx redirect to a server they also control. The Authorization header (including Basic credentials derived from URL userinfo via httpcrequest:handleuserinfo/2) is forwarded to the redirect target, allowing credential theft. The same applies to the Proxy-Authorization header.
This vulnerability is associated with program files lib/inets/src/httpclient/httpcresponse.erl.
This issue affects OTP from OTP 17.0 before OTP 27.3.4.19, OTP 28.5.0.8, and OTP 29.1.2, corresponding to inets from 5.10 before 9.3.2.8, 9.6.2.4, and 9.8.1. Whether OTP before OTP 17.0, corresponding to inets before 5.10, is affected is unknown.
Workarounds
Set {autoredirect, false} in the httpc:request/4 options and handle redirects manually, stripping the Authorization header when the redirect crosses an origin boundary. Ensure that httpc is only used to contact trusted servers that will not issue cross-origin redirects.
Summary
Observable Timing Discrepancy vulnerability in Erlang/OTP ssh (sshauth, sshoptions modules) allows unauthenticated remote username enumeration via timing side-channel in password authentication.
When the SSH daemon is configured with the userpasswords or password option, sshauth:checkpassword/3 performs a PBKDF2-SHA256 computation with 600,000 iterations (~300ms) for valid usernames, but returns immediately (~0ms) for invalid usernames via the sshoptions:getpasswordoption/2 path. This timing difference is detectable in a single authentication attempt and allows an unauthenticated attacker to distinguish valid from invalid usernames.
The userpasswords and password options are documented as intended for test purposes; the recommended alternative is pwdfun, which is not affected by this vulnerability.
This vulnerability is associated with program files lib/ssh/src/sshauth.erl and lib/ssh/src/sshoptions.erl.
This issue affects OTP from OTP 29.0 before OTP 29.0.2, corresponding to ssh from 6.0 before 6.0.1.
Workarounds
Use the pwdfun option instead of userpasswords for password authentication. The pwdfun callback gives full control over timing behavior and is not affected by this vulnerability. Implementations should take care to execute in approximately constant time regardless of username validity. Restrict SSH port access to trusted networks only via firewall rules, reducing the set of potential attackers who can perform timing measurements.
Configurations
The SSH daemon must be configured with the userpasswords or password option for password authentication. Systems using the pwdfun option instead are not affected.
Summary
Loop with Unreachable Exit Condition ('Infinite Loop') vulnerability in Erlang OTP ssh (sshsftpd module) allows an authenticated SFTP user to render an SFTP channel permanently unresponsive.
The handledata/4 function in sshsftpd contains a catch-all clause that accepts channel data of any type. When channel data with a non-zero type code (SSHMSGCHANNELEXTENDEDDATA) arrives with an empty pending buffer and a payload at or below the SFTP packet size limit, the clause tail-calls itself with identical arguments, creating an infinite loop.
The SFTP protocol operates exclusively on normal channel data (type 0). Extended data (non-zero type) is meaningless for SFTP and is never sent by conforming clients. However, the SSH protocol permits any channel participant to send extended data on an open channel, so an authenticated SFTP client can trigger the loop by sending SSHMSGCHANNELEXTENDEDDATA with any datatypecode and any non-empty payload at or below the size limit.
The targeted sshsftpd process enters an infinite tail-recursive loop. It never processes another message, its message queue grows without bound, and it can only be stopped by killing the process. BEAM's reduction-based scheduler preemption continues to function, so other processes on the node are not starved, but each stuck channel process consumes its full CPU time share continuously and accumulates unbounded message queue memory. Opening many channels amplifies the CPU and memory impact.
Erlang/OTP SSH configurations using the default maxchannels setting (infinity) allow an authenticated user to open unlimited channels per connection, amplifying the attack without requiring multiple TCP connections or authentications.
No file contents, credentials, or write access are obtainable through this issue. The impact is limited to denial of service on targeted SFTP channels, with secondary CPU degradation and memory growth.
This vulnerability is associated with program file lib/ssh/src/sshsftpd.erl and program routine sshsftpd:handledata/4.
This issue affects OTP from OTP 17.0 before OTP 27.3.4.14, OTP 28.5.0.3, and OTP 29.0.3, corresponding to ssh from 3.0.1 before 5.2.11.9, 5.5.2.2, and 6.0.2. Whether OTP before OTP 17.0, corresponding to ssh before 3.0.1, is affected is unknown.
Workarounds
Set the maxchannels daemon option to a finite value (e.g., {maxchannels, 10}) to limit the number of channels an attacker can open per connection. Set the maxsessions daemon option to limit total concurrent SSH connections to the daemon. Use external process monitoring to detect and kill sshsftpd processes with abnormally high reduction counts and growing message queues. Ensure that the SFTP server port is not reachable from untrusted machines.
Summary
Loop with Unreachable Exit Condition ('Infinite Loop') vulnerability in Erlang OTP ssh (sshsftpd module) allows an authenticated SFTP user to render an SFTP channel permanently unresponsive.
The handledata/4 function in sshsftpd contains a catch-all clause that accepts channel data of any type. When channel data with a non-zero type code (SSHMSGCHANNELEXTENDEDDATA) arrives with an empty pending buffer and a payload at or below the SFTP packet size limit, the clause tail-calls itself with identical arguments, creating an infinite loop.
The SFTP protocol operates exclusively on normal channel data (type 0). Extended data (non-zero type) is meaningless for SFTP and is never sent by conforming clients. However, the SSH protocol permits any channel participant to send extended data on an open channel, so an authenticated SFTP client can trigger the loop by sending SSHMSGCHANNELEXTENDEDDATA with any datatypecode and any non-empty payload at or below the size limit.
The targeted sshsftpd process enters an infinite tail-recursive loop. It never processes another message, its message queue grows without bound, and it can only be stopped by killing the process. BEAM's reduction-based scheduler preemption continues to function, so other processes on the node are not starved, but each stuck channel process consumes its full CPU time share continuously and accumulates unbounded message queue memory. Opening many channels amplifies the CPU and memory impact.
Erlang/OTP SSH configurations using the default maxchannels setting (infinity) allow an authenticated user to open unlimited channels per connection, amplifying the attack without requiring multiple TCP connections or authentications.
No file contents, credentials, or write access are obtainable through this issue. The impact is limited to denial of service on targeted SFTP channels, with secondary CPU degradation and memory growth.
This vulnerability is associated with program file lib/ssh/src/sshsftpd.erl and program routine sshsftpd:handledata/4.
This issue affects OTP from OTP 17.0 before OTP 27.3.4.14, OTP 28.5.0.3, and OTP 29.0.3, corresponding to ssh from 3.0.1 before 5.2.11.9, 5.5.2.2, and 6.0.2. Whether OTP before OTP 17.0, corresponding to ssh before 3.0.1, is affected is unknown.
Workarounds
Set the maxchannels daemon option to a finite value (e.g., {maxchannels, 10}) to limit the number of channels an attacker can open per connection. Set the maxsessions daemon option to limit total concurrent SSH connections to the daemon. Use external process monitoring to detect and kill sshsftpd processes with abnormally high reduction counts and growing message queues. Ensure that the SFTP server port is not reachable from untrusted machines.
Summary
Reliance on IP Address for Authentication vulnerability in Erlang/OTP ssl (inettlsdist module) allows unauthenticated bypass of the distribution-over-TLS LAN allowlist.
The inettlsdist:checkip/1 function, which enforces a LAN allowlist for Erlang distribution over TLS, calls inet:sockname/1 instead of inet:peername/1 to obtain the peer's IP address. Because inet:sockname/1 returns the local socket address, both the local IP and the supposed peer IP resolve to the same value, causing the subnet mask comparison to always succeed regardless of the actual remote address. Any holder of a CA-signed TLS certificate can therefore bypass the LAN restriction and gain full Erlang distribution access to the node, including rpc:call/4 and code:loadbinary/3.
This vulnerability is associated with program file lib/ssl/src/inettlsdist.erl.
This issue affects OTP from OTP 26.0 before OTP 27.3.4.13, OTP 28.5.0.2, and OTP 29.0.2, corresponding to ssl from 11.0 before 11.2.12.9, 11.6.0.2, and 11.7.2.
Workarounds
Implement a custom verifyfun SSL option that correctly checks the peer IP address using inet:peername/1 on the socket.
Configurations
The Erlang distribution must be configured to use TLS (inettlsdist) with the checkip option enabled. The default Erlang distribution configuration does not use TLS and is not affected.
Summary
Sensitive Data Exposure vulnerability in Erlang OTP inets (httpcresponse module) allows Retrieve Embedded Sensitive Data.
The httpc client forwards the Authorization and Proxy-Authorization request headers to redirect targets without checking whether the redirect crosses an origin boundary. httpcresponse:redirect/2 constructs the redirected request by updating only the host field of the header record; all other fields (including authorization and proxyauthorization) are copied verbatim. The redirect target host is never compared against the original host.
autoredirect defaults to true, so this affects all httpc callers that do not explicitly disable automatic redirects.
An attacker who controls a server that the victim contacts via httpc can issue a cross-origin 3xx redirect to a server they also control. The Authorization header (including Basic credentials derived from URL userinfo via httpcrequest:handleuserinfo/2) is forwarded to the redirect target, allowing credential theft. The same applies to the Proxy-Authorization header.
This vulnerability is associated with program files lib/inets/src/httpclient/httpcresponse.erl.
This issue affects OTP from OTP 17.0 before OTP 27.3.4.19, OTP 28.5.0.8, and OTP 29.1.2, corresponding to inets from 5.10 before 9.3.2.8, 9.6.2.4, and 9.8.1. Whether OTP before OTP 17.0, corresponding to inets before 5.10, is affected is unknown.
Workarounds
Set {autoredirect, false} in the httpc:request/4 options and handle redirects manually, stripping the Authorization header when the redirect crosses an origin boundary. Ensure that httpc is only used to contact trusted servers that will not issue cross-origin redirects.