Metasploit Framework ios_image_gather Path Traversal Leading to Arbitrary File Write and Code Execution
CVE-2026-87690Published 12 Oct 2026, 04:50 UTC
Real-world risk
6.0/ 10Medium
Schedule in the normal cycle
PreliminaryFrom the CVSS vector only · confidence low
CVSS
8.8
scored by the vendor (CNA), CVSS 3.1
In plain words
No plain-language summary yet. The original description is below.
Original description (from rapid7)
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.
Am I affected?
| Product | Affected versions (from the sources) | Fixed in |
|---|---|---|
| Metasploit FrameworkNiche | < 6.5.5 | 6.5.5 |
What to do
Update to a fixed version: 6.5.5.
Why this score
| Factor | Value | Evidence | × |
|---|---|---|---|
| Impact | Full compromiseCode execution or full control of the system or application | From the CVSS vector | 1.00 |
| Attacker position | InternetAnyone on the Internet can reach a typical deployment | From the CVSS vector | 1.00 |
| Privileges needed | NoneNo account | From the CVSS vector | 1.00 |
| Victim interaction | RoutineA normal action: open a file, visit a page, click a link | From the CVSS vector | 0.70 |
| Configuration | DefaultOut-of-the-box installs are vulnerable | From the CVSS vector | 1.00 |
| Reliability | ReliableDeterministic: injection, logic bug, path traversal | From the CVSS vector | 1.00 |
Threat level T1: Nothing known (× 0.85)
The default for a new disclosure
EPSS 0.4% chance of exploitation in 30 days (percentile 37), as of 2026-12-03.
The arithmetic
- Prerequisites multiplied together0.700
- Threat T1: Nothing known0.850
- 10 × impact 1 × prerequisites 0.7 × threat 0.855.950
- Rounded to one decimal between 0.1 and 106.0
Exploitation and evidence timeline
- 12 Oct 2026 Published
- 3 Dec 2026 Risk 6.0 (cvss fallback)
Weakness
CWE-22
References
- https://github.com/rapid7/metasploit-framework/releases/tag/6.5.5patch, release-notes
- https://github.com/rapid7/metasploit-framework/pull/21880issue-tracking, patch
- https://www.rapid7.com/blog/post/pt-metasploit-wrap-up-belgian-waffles-chocolates-and-modules-frites/technical-description, vendor-advisory
- https://github.com/rapid7/metasploit-frameworkproduct
- CVE-2026-87690 on CVE.org