Impact
The vulnerability originates from a relative path traversal flaw in the Metasploit Framework module post/apple_ios/gather/ios_image_gather (CWE‑22). The module incorporates file names retrieved from a Meterpreter directory listing, which an attacker can fully control by using a compromised or malicious iOS device. These names are interpolated directly into the local destination path passed to client.fs.file.download_file() without any sanitization. As a result, a crafted entry such as ../../msfconsole.rc can escape the intended ~/.msf4/loot/<random> folder and overwrite the system‑wide resource file ~/.msf4/msfconsole.rc. Upon the next launch of msfconsole, the overwritten resource file is executed, allowing the attacker to load a malicious Ruby plugin and gain persistent code execution as the operator, who is often root on the pentester’s workstation.
Affected Systems
The affected product is Rapid7’s Metasploit Framework, specifically the post module post/apple_ios/gather/ios_image_gather. The vulnerability exists in versions of the framework released before the 6.5.5 update, which introduced input sanitization to the module. No specific sub‑component or product version list is supplied; operators using earlier releases are considered at risk until upgrading to 6.5.5 or later. The CNA solution repository points to the release tag 6.5.5 as the fix.
Risk and Exploitability
The CVSS score of 8.8 classifies this flaw as high severity, reflecting the high impact of arbitrary file write leading to persistent code execution. EPSS data is not available, so the probability of exploitation cannot be quantified but the exploitability is high on environments where an attacker can supply a malicious iOS device and trick an operator into running the vulnerable module. The vulnerability is not listed in the CISA KEV catalog, yet the attack path requires active engagement from the operator, making it a "risk on the operator's side." The path traversal is potentially bypassed by any listing entry containing relative references, and because the underlying stdapi sink writes to any supplied path, the flaw remains exploitable until the sanitization fix is applied.
OpenCVE Enrichment