Path traversal in Metasploit ios_image_gather allows file overwrite
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- —
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA.
Summary
Metasploit Framework versions from 0 before 6.5.5 have a path traversal flaw (CWE-22) in the ios_image_gather post module. The module uses file names from a device directory listing as local destination paths without sanitizing them. An attacker who controls an iOS device and lures an operator into running the module can overwrite files and gain code execution as that operator.
Written with Claude Haiku 5.5 from the sources below · 2026-10-29
Description from the CNA
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
Remediation
Update Metasploit Framework to version 6.5.5.
Written with Claude Haiku 5.5 from the sources below · 2026-10-29
- Fix · CNA Metasploit Framework (Rapid7) Fixed in 6.5.5
Timeline
- 2026-10-12 Threatist record created from CVE-2026-87690
- 2026-10-12 Alias added: GHSA-663p-9fgr-v7m7
- 2026-10-12 Priority changed: MEDIUM → LOW
- 2026-10-14 CISA SSVC decision points changed
- 2026-10-14 Priority changed: LOW → MEDIUM
- 2026-10-14 CISA SSVC decision points changed
References
More Rapid7 vulnerabilities
- TI-2023-01233 Rapid7 InsightCloudSec resource.db() method access CVSS 3.1HIGH 8.8
- TI-2023-01231 Rapid7 InsightCloudSec getattr() method access CVSS 3.1HIGH 8.8
- TI-2023-01232 Rapid7 InsightCloudSec box object access CVSS 3.1HIGH 8.1
- TI-2024-00358 Rapid7 Minerva Armor Privilege Escalation CVSS 3.1HIGH 7.8
- TI-2024-02985 Rapid7 Insight Agent Sensitive Key Exposed To Local Users CVSS 3.1MEDIUM 6.8
- TI-2019-04008 Rapid7 Metasploit HTTP Handler Denial of Service CVSS 3.1HIGH 7.5
Sources
- CVE-2026-87690 · CVE Program
- CVE-2026-87690 · NVD
- FIRST EPSS
- GHSA-663p-9fgr-v7m7 · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences