Metasploit Framework ios_image_gather Path Traversal Leading to Arbitrary File Write and Code Execution

Summary

CVECVE-2026-87690
StatePUBLISHED
Assignerrapid7
Source PriorityCVE Program / NVD first with legacy fallback
Published2026-10-12 05:17:03 UTC
Updated2026-10-14 11:17:06 UTC
DescriptionThe 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.

Risk And Classification

Primary CVSS: v3.1 8.8 HIGH from [email protected]

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

EPSS: 0.004110000 probability, percentile 0.334620000 (date 2026-10-12)

Problem Types: CWE-22 | CWE-22 CWE-22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')


VersionSourceTypeScoreSeverityVector
3.1[email protected]Secondary8.8HIGHCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
3.1CNACVSS8.8HIGHCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

CVSS v3.1 Breakdown

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA Rapid7 Metasploit Framework affected 6.5.5 semver Linux, Windows, macOS
CNA Rapid7 Metasploit Framework unaffected 6.5.5 semver Linux, Windows, macOS

References

ReferenceSourceLinkTags
github.com/rapid7/metasploit-framework/pull/21880 [email protected] github.com
github.com/rapid7/metasploit-framework [email protected] github.com
github.com/rapid7/metasploit-framework/releases/tag/6.5.5 [email protected] github.com
www.rapid7.com/blog/post/pt-metasploit-wrap-up-belgian-waffles-chocolates-an... [email protected] www.rapid7.com
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

Vendor Comments And Credit

Discovery Credit

CNA: h00die (en)

Additional Advisory Data

SourceTimeEvent
CNA2026-08-27T10:45:00.000ZVulnerability reported to Rapid7
CNA2026-09-02T00:54:00.000ZRapid7 acknowledged receipt and forwarded to the Metasploit team
CNA2026-09-10T03:22:00.000ZVulnerability confirmed legitimate; CVE-2026-87690 reserved
CNA2026-09-23T04:42:00.000ZFix released in Metasploit Framework 6.5.5

Solutions

CNA: https://github.com/rapid7/metasploit-framework/releases/tag/6.5.5

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report