Erlang OTP
Distribution-over-TLS LAN allowlist silently bypassed due to sockname/peername confusion in inet_tls_dist
Reliance on IP Address for Authentication vulnerability in Erlang/OTP ssl (inet_tls_dist module) allows unauthenticated bypass of the distribution-over-TLS LAN allowlist. The inet_tls_dist:check_ip/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:load_binary/3. This vulnerability is associated with program file lib/ssl/src/inet_tls_dist.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.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 11.0, < *
Fixed in *, 11.2.12.9, 11.6.0.2, 11.7.2
- >= 26.0, < *
Fixed in *, 27.3.4.13, 28.5.0.2, 29.0.2
- >= 7a08c5507862a7011568506d0c17b1fdef30bee4, < 0209a6df65d605552b378273027b3968b35f26b4
Fixed in 0209a6df65d605552b378273027b3968b35f26b4
Mitigation
Upgrade OTP to * or 11.2.12.9 or 11.6.0.2 or 11.7.2 or later.
Upgrade OTP to * or 27.3.4.13 or 28.5.0.2 or 29.0.2 or later.
Upgrade OTP to 0209a6df65d605552b378273027b3968b35f26b4 or later.
Workaround
Implement a custom verify_fun SSL option that correctly checks the peer IP address using inet:peername/1 on the socket.
References
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.