{"id":"CVE-2026-48858","state":"PUBLISHED","title":"ftp client PASV response IP not validated against control peer, enabling SSRF and FTP bounce attacks","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.\n\nThe 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.\n\nThe 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.\n\nThe ftp application is deprecated and scheduled for removal in OTP-30.\n\nThis 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).\n\nThis 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.","publishedAt":"2026-06-10T14:35:45.466Z","updatedAt":"2026-07-24T14:16:02.204Z","severity":{"score":6.3,"label":"Medium","version":"4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N","source":"EEF"},"assigner":"EEF","products":["Erlang OTP"],"affected":[{"vendor":"Erlang","product":"OTP","packageName":"inets","packageURL":"pkg:otp/inets?repository_url=https:%2F%2Fgithub.com%2Ferlang%2Fotp&vcs_url=git%20https:%2F%2Fgithub.com%2Ferlang%2Fotp.git","defaultStatus":"unknown","versions":[{"version":"5.10.4","status":"affected","lessThan":"7.0","versionType":"otp"}],"cpes":["cpe:2.3:a:erlang:erlang\\/otp:*:*:*:*:*:*:*:*"],"modules":["ftp_internal"],"programFiles":["src/ftp/ftp_internal.erl"],"programRoutines":[{"name":"ftp_internal:handle_ctrl_result/2"}],"repo":"https://github.com/erlang/otp"},{"vendor":"Erlang","product":"OTP","packageName":"ftp","packageURL":"pkg:otp/ftp?repository_url=https:%2F%2Fgithub.com%2Ferlang%2Fotp&vcs_url=git%20https:%2F%2Fgithub.com%2Ferlang%2Fotp.git","defaultStatus":"unknown","versions":[{"version":"1.0","status":"affected","lessThan":"*","changes":[{"at":"1.2.6","status":"unaffected"},{"at":"1.2.4.1","status":"unaffected"},{"at":"1.2.3.1","status":"unaffected"}],"versionType":"otp"}],"cpes":["cpe:2.3:a:erlang:erlang\\/otp:*:*:*:*:*:*:*:*"],"modules":["ftp_internal"],"programFiles":["src/ftp_internal.erl"],"programRoutines":[{"name":"ftp_internal:handle_ctrl_result/2"}],"repo":"https://github.com/erlang/otp"},{"vendor":"Erlang","product":"OTP","packageName":"erlang/otp","packageURL":"pkg:github/erlang/otp","defaultStatus":"unknown","versions":[{"version":"17.4","status":"affected","lessThan":"*","changes":[{"at":"29.0.2","status":"unaffected"},{"at":"28.5.0.2","status":"unaffected"},{"at":"27.3.4.13","status":"unaffected"}],"versionType":"otp"},{"version":"be95772ee1fcfe71045ef070130bea7a910b81e3","status":"affected","lessThan":"*","changes":[{"at":"2691a806231ffd0490a8a9e20500dec0c7e73727","status":"unaffected"},{"at":"521bcfa24407ee8cb5614823cf905c37ea3aa605","status":"unaffected"}],"versionType":"git"}],"collectionURL":"https://github.com","cpes":["cpe:2.3:a:erlang:erlang\\/otp:*:*:*:*:*:*:*:*"],"modules":["ftp_internal"],"programFiles":["lib/inets/src/ftp/ftp_internal.erl","lib/ftp/src/ftp_internal.erl"],"programRoutines":[{"name":"ftp_internal:handle_ctrl_result/2"}],"repo":"https://github.com/erlang/otp"}],"references":["https://github.com/erlang/otp/security/advisories/GHSA-24cv-hwgr-37fq","https://cna.erlef.org/cves/CVE-2026-48858.html","https://osv.dev/vulnerability/EEF-CVE-2026-48858","https://www.erlang.org/doc/system/versions.html#order-of-versions","https://github.com/erlang/otp/commit/2691a806231ffd0490a8a9e20500dec0c7e73727","https://github.com/erlang/otp/commit/521bcfa24407ee8cb5614823cf905c37ea3aa605"],"weaknesses":["CWE-918"],"ingestedAt":"2026-10-29T20:12:07.131Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/48xxx/CVE-2026-48858.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-48858","state":"PUBLISHED","datePublished":"2026-06-10T14:35:45.466Z","dateUpdated":"2026-07-24T14:16:02.204Z","assignerShortName":"EEF","assignerOrgId":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","dateReserved":"2026-05-25T20:44:10.697Z"},"containers":{"cna":{"title":"ftp client PASV response IP not validated against control peer, enabling SSRF and FTP bounce attacks","descriptions":[{"lang":"en","value":"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.\n\nThe 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.\n\nThe 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.\n\nThe ftp application is deprecated and scheduled for removal in OTP-30.\n\nThis 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).\n\nThis 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."}],"affected":[{"vendor":"Erlang","product":"OTP","packageName":"inets","packageURL":"pkg:otp/inets?repository_url=https:%2F%2Fgithub.com%2Ferlang%2Fotp&vcs_url=git%20https:%2F%2Fgithub.com%2Ferlang%2Fotp.git","defaultStatus":"unknown","versions":[{"version":"5.10.4","status":"affected","lessThan":"7.0","versionType":"otp"}],"cpes":["cpe:2.3:a:erlang:erlang\\/otp:*:*:*:*:*:*:*:*"],"modules":["ftp_internal"],"programFiles":["src/ftp/ftp_internal.erl"],"programRoutines":[{"name":"ftp_internal:handle_ctrl_result/2"}],"repo":"https://github.com/erlang/otp"},{"vendor":"Erlang","product":"OTP","packageName":"ftp","packageURL":"pkg:otp/ftp?repository_url=https:%2F%2Fgithub.com%2Ferlang%2Fotp&vcs_url=git%20https:%2F%2Fgithub.com%2Ferlang%2Fotp.git","defaultStatus":"unknown","versions":[{"version":"1.0","status":"affected","lessThan":"*","changes":[{"at":"1.2.6","status":"unaffected"},{"at":"1.2.4.1","status":"unaffected"},{"at":"1.2.3.1","status":"unaffected"}],"versionType":"otp"}],"cpes":["cpe:2.3:a:erlang:erlang\\/otp:*:*:*:*:*:*:*:*"],"modules":["ftp_internal"],"programFiles":["src/ftp_internal.erl"],"programRoutines":[{"name":"ftp_internal:handle_ctrl_result/2"}],"repo":"https://github.com/erlang/otp"},{"vendor":"Erlang","product":"OTP","packageName":"erlang/otp","packageURL":"pkg:github/erlang/otp","defaultStatus":"unknown","versions":[{"version":"17.4","status":"affected","lessThan":"*","changes":[{"at":"29.0.2","status":"unaffected"},{"at":"28.5.0.2","status":"unaffected"},{"at":"27.3.4.13","status":"unaffected"}],"versionType":"otp"},{"version":"be95772ee1fcfe71045ef070130bea7a910b81e3","status":"affected","lessThan":"*","changes":[{"at":"2691a806231ffd0490a8a9e20500dec0c7e73727","status":"unaffected"},{"at":"521bcfa24407ee8cb5614823cf905c37ea3aa605","status":"unaffected"}],"versionType":"git"}],"collectionURL":"https://github.com","cpes":["cpe:2.3:a:erlang:erlang\\/otp:*:*:*:*:*:*:*:*"],"modules":["ftp_internal"],"programFiles":["lib/inets/src/ftp/ftp_internal.erl","lib/ftp/src/ftp_internal.erl"],"programRoutines":[{"name":"ftp_internal:handle_ctrl_result/2"}],"repo":"https://github.com/erlang/otp"}],"references":[{"url":"https://github.com/erlang/otp/security/advisories/GHSA-24cv-hwgr-37fq","tags":["vendor-advisory","related"]},{"url":"https://cna.erlef.org/cves/CVE-2026-48858.html","tags":["related"]},{"url":"https://osv.dev/vulnerability/EEF-CVE-2026-48858","tags":["related"]},{"url":"https://www.erlang.org/doc/system/versions.html#order-of-versions","tags":["x_version-scheme"]},{"url":"https://github.com/erlang/otp/commit/2691a806231ffd0490a8a9e20500dec0c7e73727","tags":["patch"]},{"url":"https://github.com/erlang/otp/commit/521bcfa24407ee8cb5614823cf905c37ea3aa605","tags":["patch"]}],"metrics":[{"cvssV4_0":{"attackComplexity":"LOW","attackRequirements":"PRESENT","attackVector":"NETWORK","baseScore":6.3,"baseSeverity":"MEDIUM","privilegesRequired":"NONE","subAvailabilityImpact":"NONE","subConfidentialityImpact":"LOW","subIntegrityImpact":"LOW","userInteraction":"NONE","vectorString":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N","version":"4.0","vulnAvailabilityImpact":"NONE","vulnConfidentialityImpact":"LOW","vulnIntegrityImpact":"LOW"},"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}]}],"problemTypes":[{"descriptions":[{"cweId":"CWE-918","description":"CWE-918 Server-Side Request Forgery (SSRF)","lang":"en","type":"CWE"}]}],"providerMetadata":{"shortName":"EEF","orgId":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","dateUpdated":"2026-07-24T14:16:02.204Z"},"configurations":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"The vulnerable path is active under the default configuration: <tt>mode=passive</tt>, <tt>ipfamily=inet</tt>, and <tt>ftp_extension=false</tt> are all defaults for <tt>ftp:open/2</tt>."}],"value":"The vulnerable path is active under the default configuration: mode=passive, ipfamily=inet, and ftp_extension=false are all defaults for ftp:open/2."}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:a:erlang:erlang\\/otp:*:*:*:*:*:*:*:*","versionEndExcluding":"27.3.4.13","versionStartIncluding":"17.4","vulnerable":true},{"criteria":"cpe:2.3:a:erlang:erlang\\/otp:*:*:*:*:*:*:*:*","versionEndExcluding":"28.5.0.2","versionStartIncluding":"28.0","vulnerable":true},{"criteria":"cpe:2.3:a:erlang:erlang\\/otp:*:*:*:*:*:*:*:*","versionEndExcluding":"29.0.2","versionStartIncluding":"29.0","vulnerable":true}],"negate":false,"operator":"OR"}]}],"credits":[{"lang":"en","type":"finder","value":"Jonatan Männchen / EEF"},{"lang":"en","type":"remediation developer","value":"Jonatan Männchen / EEF"},{"lang":"en","type":"remediation reviewer","value":"Ingela Anderton Andin"}],"impacts":[{"capecId":"CAPEC-664","descriptions":[{"lang":"en","value":"CAPEC-664 Server Side Request Forgery"}]}],"source":{"discovery":"INTERNAL"},"workarounds":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"Pass <tt>{ftp_extension, true}</tt> to <tt>ftp:open/2</tt> to use EPSV instead of PASV. Alternatively, pass <tt>{mode, active}</tt> to use active mode, or pass <tt>{ipfamily, inet6}</tt> to force IPv6, both of which bypass the vulnerable PASV path."}],"value":"Pass {ftp_extension, 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."}],"x_generator":{"engine":"cvelib 1.8.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-06-10T16:20:57.662713Z","id":"CVE-2026-48858","options":[{"Exploitation":"none"},{"Automatable":"yes"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-06-10T16:21:08.893Z"}}]}}}