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 29.0.2, 28.5.0.2 and 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 arises because the ftp_internal:handle_ctrl_result/2 PASV handler extracts the IP address from the FTP server's 227 response and uses it directly in gen_tcp:connect/4 without validating it against the control connection's peer address, violating RFC 2577 recommendations. This allows a malicious or compromised FTP server to redirect the client's data connection to arbitrary internal hosts and ports. The adjacent EPSV handlers correctly validate the IP, but the PASV handler does not. This flaw enables SSRF attacks and FTP bounce attacks via the vulnerable ftp module in Erlang/OTP. Affected versions include OTP 17.4 through versions before 29.0.2, 28.5.0.2, and 27.3.4.13, inets 5.10.4 through before 7.0, and ftp 1.0 and later before 1.2.6, 1.2.4.1, and 1.2.3.1. No official remediation or patch information is provided, and 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 perform SSRF attacks by redirecting the client's data connection to arbitrary internal hosts or cloud metadata endpoints. This can lead to unauthorized data access or interaction with internal network services. Additionally, FTP bounce attacks against third-party hosts are possible, potentially enabling indirect attacks on other systems. The vulnerability affects default passive mode FTP client configurations in Erlang/OTP, impacting data read and write operations.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Since the ftp application is deprecated and scheduled for removal in OTP-30, consider migrating away from it. Until an official fix is available, avoid using the vulnerable ftp module in passive mode with untrusted FTP servers or restrict FTP usage to trusted environments. Monitor vendor communications for updates on patches or official mitigations.
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 29.0.2, 28.5.0.2 and 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 arises because the ftp_internal:handle_ctrl_result/2 PASV handler extracts the IP address from the FTP server's 227 response and uses it directly in gen_tcp:connect/4 without validating it against the control connection's peer address, violating RFC 2577 recommendations. This allows a malicious or compromised FTP server to redirect the client's data connection to arbitrary internal hosts and ports. The adjacent EPSV handlers correctly validate the IP, but the PASV handler does not. This flaw enables SSRF attacks and FTP bounce attacks via the vulnerable ftp module in Erlang/OTP. Affected versions include OTP 17.4 through versions before 29.0.2, 28.5.0.2, and 27.3.4.13, inets 5.10.4 through before 7.0, and ftp 1.0 and later before 1.2.6, 1.2.4.1, and 1.2.3.1. No official remediation or patch information is provided, and 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 perform SSRF attacks by redirecting the client's data connection to arbitrary internal hosts or cloud metadata endpoints. This can lead to unauthorized data access or interaction with internal network services. Additionally, FTP bounce attacks against third-party hosts are possible, potentially enabling indirect attacks on other systems. The vulnerability affects default passive mode FTP client configurations in Erlang/OTP, impacting data read and write operations.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Since the ftp application is deprecated and scheduled for removal in OTP-30, consider migrating away from it. Until an official fix is available, avoid using the vulnerable ftp module in passive mode with untrusted FTP servers or restrict FTP usage to trusted environments. Monitor vendor communications for updates on patches or official mitigations.
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: 6/10/2026, 4:03:35 PM
Last enriched: 6/10/2026, 4:19:22 PM
Last updated: 6/10/2026, 5:49:23 PM
Views: 5
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.