{ "dataType": "CVE_RECORD", "dataVersion": "5.2", "cveMetadata": { "cveId": "CVE-2026-87690", "assignerOrgId": "9974b330-7714-4307-a722-5648477acda7", "state": "PUBLISHED", "assignerShortName": "rapid7", "dateReserved": "2026-09-08T23:15:36.929Z", "datePublished": "2026-10-12T04:50:56.020Z", "dateUpdated": "2026-10-12T04:50:56.020Z" }, "containers": { "cna": { "providerMetadata": { "orgId": "9974b330-7714-4307-a722-5648477acda7", "shortName": "rapid7", "dateUpdated": "2026-10-12T04:50:56.020Z" }, "title": "Metasploit Framework ios_image_gather Path Traversal Leading to Arbitrary File Write and Code Execution", "problemTypes": [ { "descriptions": [ { "lang": "en", "cweId": "CWE-22", "description": "CWE-22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')", "type": "CWE" } ] } ], "impacts": [ { "descriptions": [ { "lang": "en", "value": "A device under attacker control serves a crafted Meterpreter directory listing that causes the ios_image_gather module to write files outside the intended loot directory, overwriting the operator's ~/.msf4/msfconsole.rc. On the next msfconsole launch the planted resource file and Ruby plugin execute as the operator (frequently root), yielding persistent code execution on the pentester's workstation and exposure of engagement credentials, keys, loot, and active sessions into the client environment." } ] } ], "affected": [ { "vendor": "Rapid7", "product": "Metasploit Framework", "platforms": [ "Linux", "Windows", "macOS" ], "repo": "https://github.com/rapid7/metasploit-framework", "modules": [ "post/apple_ios/gather/ios_image_gather" ], "versions": [ { "status": "affected", "version": "0", "lessThan": "6.5.5", "versionType": "semver" }, { "status": "unaffected", "version": "6.5.5", "versionType": "semver" } ], "defaultStatus": "unaffected" } ], "descriptions": [ { "lang": "en", "value": "The Metasploit Framework post module post/apple_ios/gather/ios_image_gather is affected by a relative path traversal vulnerability (CWE-22). The module interpolates file names taken from a Meterpreter directory listing — data fully controlled by a hostile or tampered iOS device — directly into the local destination path passed to client.fs.file.download_file(), with no sanitization. The underlying stdapi sink (lib/rex/post/meterpreter/extensions/stdapi/fs/file.rb) writes to whatever path is supplied, so a listing entry such as ../../msfconsole.rc escapes the intended ~/.msf4/loot/ directory and overwrites ~/.msf4/msfconsole.rc, a resource file that every msfconsole invocation automatically executes at startup (lib/msf/ui/console/driver.rb:196). An attacker-controlled device that lures an operator into running this gather module achieves an arbitrary file write as the operator; because the written msfconsole.rc can load a second written file (a Ruby plugin whose top-level code runs on require), this converts into persistent code execution and an interactive shell as the operator (frequently root) on the pentester's workstation at the next console launch. The same traversal was previously fixed upstream in the recursive downloader (stdapi/fs/dir.rb scrubs separators); this module omitted the equivalent scrub. The fix applies the same separator scrub (or File.basename) to listing entries before building the local path.", "supportingMedia": [ { "type": "text/html", "base64": false, "value": "

The Metasploit Framework post module post/apple_ios/gather/ios_image_gather is affected by a relative path traversal vulnerability (CWE-22). The module interpolates file names taken from a Meterpreter directory listing — data fully controlled by a hostile or tampered iOS device — directly into the local destination path passed to client.fs.file.download_file(), with no sanitization. The underlying stdapi sink (lib/rex/post/meterpreter/extensions/stdapi/fs/file.rb) writes to whatever path is supplied, so a listing entry such as ../../msfconsole.rc escapes the intended ~/.msf4/loot/<random> directory and overwrites ~/.msf4/msfconsole.rc, a resource file that every msfconsole invocation automatically executes at startup (lib/msf/ui/console/driver.rb:196). An attacker-controlled device that lures an operator into running this gather module achieves an arbitrary file write as the operator; because the written msfconsole.rc can load a second written file (a Ruby plugin whose top-level code runs on require), this converts into persistent code execution and an interactive shell as the operator (frequently root) on the pentester's workstation at the next console launch. The same traversal was previously fixed upstream in the recursive downloader (stdapi/fs/dir.rb scrubs separators); this module omitted the equivalent scrub. The fix applies the same separator scrub (or File.basename) to listing entries before building the local path.

" } ] } ], "references": [ { "url": "https://github.com/rapid7/metasploit-framework/releases/tag/6.5.5", "name": "Metasploit Framework 6.5.5 Release Notes", "tags": [ "release-notes", "patch" ] }, { "url": "https://github.com/rapid7/metasploit-framework/pull/21880", "name": "Metasploit Framework PR #21880 (fix for ios_image_gather path traversal)", "tags": [ "patch", "issue-tracking" ] }, { "url": "https://www.rapid7.com/blog/post/pt-metasploit-wrap-up-belgian-waffles-chocolates-and-modules-frites/", "name": "Metasploit Wrap-Up: Belgian Waffles, Chocolates, and Modules Frites", "tags": [ "vendor-advisory", "technical-description" ] }, { "url": "https://github.com/rapid7/metasploit-framework", "name": "Metasploit Framework source repository", "tags": [ "product" ] } ], "metrics": [ { "format": "CVSS", "scenarios": [ { "lang": "en", "value": "GENERAL" } ], "cvssV3_1": { "version": "3.1", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "REQUIRED", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH", "baseSeverity": "HIGH", "baseScore": 8.8, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H" } } ], "solutions": [ { "lang": "en", "value": "https://github.com/rapid7/metasploit-framework/releases/tag/6.5.5", "supportingMedia": [ { "type": "text/html", "base64": false, "value": "https://github.com/rapid7/metasploit-framework/releases/tag/6.5.5" } ] } ], "timeline": [ { "time": "2026-08-27T10:45:00.000Z", "lang": "en", "value": "Vulnerability reported to Rapid7" }, { "time": "2026-09-02T00:54:00.000Z", "lang": "en", "value": "Rapid7 acknowledged receipt and forwarded to the Metasploit team" }, { "time": "2026-09-10T03:22:00.000Z", "lang": "en", "value": "Vulnerability confirmed legitimate; CVE-2026-87690 reserved" }, { "time": "2026-09-23T04:42:00.000Z", "lang": "en", "value": "Fix released in Metasploit Framework 6.5.5" } ], "credits": [ { "lang": "en", "value": "h00die", "type": "finder" } ], "source": { "discovery": "EXTERNAL" }, "x_generator": { "engine": "Rapid7 Vulnerability Disclosure Program" } } } }