CVE-2026-48858: CWE-918 Server-Side Request Forgery (SSRF) in Erlang OTP
Server-Side Request Forgery (SSRF) vulnerability in Erlang/OTP ftp (ftp_internal module) allows FTP bounce attacks and SSRF via an unvalidated PASV response IP address. The ftp_internal:handle_ctrl_result/2 PASV handler (mode=passive, ipfamily=inet, ftp_extension=false) extracts the IP address from the server's 227 response and passes it directly to gen_tcp: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, ftp_extension=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/ftp_internal.erl (inets 5.10.4 through 6.5, OTP 17.4 through 20.3) and lib/ftp/src/ftp_internal.erl (ftp 1.0 and later, OTP 21.0 and later). This issue affects OTP from OTP 17.4 before OTP 29.0.2, OTP 28.5.0.2 and OTP 27.3.4.13, corresponding to inets from 5.10.4 before 7.0 and ftp from 1.0 before 1.2.6, 1.2.4.1 and 1.2.3.1.
AI Analysis
Technical Summary
The vulnerability exists in the ftp_internal:handle_ctrl_result/2 PASV handler of Erlang/OTP's ftp module, where the IP address extracted from the server's 227 PASV response is used directly in gen_tcp:connect/4 without validation against the control connection's peer address. Unlike the EPSV handlers, the PASV handler does not verify the IP, enabling a malicious FTP server to redirect data connections to arbitrary hosts and ports. This can be exploited to perform SSRF attacks against internal hosts, cloud metadata endpoints, or third-party hosts via FTP bounce attacks. The affected code spans inets versions 5.10.4 through before 7.0 and ftp versions 1.0 through before 1.2.6, 1.2.4.1, and 1.2.3.1, corresponding to OTP versions from 17.4 before 29.0.2, including 28.5.0.2 and 27.3.4.13. The ftp application is deprecated and planned for removal in OTP-30.
Potential Impact
An attacker controlling or compromising an FTP server can exploit this vulnerability to redirect the client's data connection to arbitrary internal or external hosts and ports. This enables SSRF attacks, potentially exposing internal network resources or cloud metadata endpoints. Additionally, FTP bounce attacks against third-party hosts are possible. The vulnerability affects read and write FTP operations, allowing data exfiltration or injection via the redirected connections.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. The ftp application is deprecated and scheduled for removal in OTP-30, which may mitigate future risk. Until an official fix is available, avoid using the vulnerable ftp module in passive mode with inet IP family and ftp_extension set to false, or restrict FTP server connections to trusted hosts. Monitor vendor advisories for updates and patches.
CVE-2026-48858: CWE-918 Server-Side Request Forgery (SSRF) in Erlang OTP
Description
Server-Side Request Forgery (SSRF) vulnerability in Erlang/OTP ftp (ftp_internal module) allows FTP bounce attacks and SSRF via an unvalidated PASV response IP address. The ftp_internal:handle_ctrl_result/2 PASV handler (mode=passive, ipfamily=inet, ftp_extension=false) extracts the IP address from the server's 227 response and passes it directly to gen_tcp: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, ftp_extension=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/ftp_internal.erl (inets 5.10.4 through 6.5, OTP 17.4 through 20.3) and lib/ftp/src/ftp_internal.erl (ftp 1.0 and later, OTP 21.0 and later). This issue affects OTP from OTP 17.4 before OTP 29.0.2, OTP 28.5.0.2 and OTP 27.3.4.13, corresponding to inets from 5.10.4 before 7.0 and ftp from 1.0 before 1.2.6, 1.2.4.1 and 1.2.3.1.
CVSS v4.0
Score 6.3medium
Affected software
pkg:github/erlang/otpcpe:2.3:a:erlang:erlang\/otp:*:*:*:*:*:*:*:*Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability exists in the ftp_internal:handle_ctrl_result/2 PASV handler of Erlang/OTP's ftp module, where the IP address extracted from the server's 227 PASV response is used directly in gen_tcp:connect/4 without validation against the control connection's peer address. Unlike the EPSV handlers, the PASV handler does not verify the IP, enabling a malicious FTP server to redirect data connections to arbitrary hosts and ports. This can be exploited to perform SSRF attacks against internal hosts, cloud metadata endpoints, or third-party hosts via FTP bounce attacks. The affected code spans inets versions 5.10.4 through before 7.0 and ftp versions 1.0 through before 1.2.6, 1.2.4.1, and 1.2.3.1, corresponding to OTP versions from 17.4 before 29.0.2, including 28.5.0.2 and 27.3.4.13. The ftp application is deprecated and planned for removal in OTP-30.
Potential Impact
An attacker controlling or compromising an FTP server can exploit this vulnerability to redirect the client's data connection to arbitrary internal or external hosts and ports. This enables SSRF attacks, potentially exposing internal network resources or cloud metadata endpoints. Additionally, FTP bounce attacks against third-party hosts are possible. The vulnerability affects read and write FTP operations, allowing data exfiltration or injection via the redirected connections.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. The ftp application is deprecated and scheduled for removal in OTP-30, which may mitigate future risk. Until an official fix is available, avoid using the vulnerable ftp module in passive mode with inet IP family and ftp_extension set to false, or restrict FTP server connections to trusted hosts. Monitor vendor advisories for updates and patches.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- EEF
- Date Reserved
- 2026-05-25T20:44:10.697Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a298ad7c9170919df36743a
Added to database: 06/10/2026, 16:03:35 UTC
Last enriched: 07/24/2026, 21:35:45 UTC
Last updated: 07/31/2026, 19:22:59 UTC
Views: 105
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.