CVE-2026-87690 (GCVE-0-2026-87690)
Vulnerability from cvelistv5 – Published: 2026-10-12 04:50 – Updated: 2026-10-12 04:50
VLAI
EPSS
VEX
Title
Metasploit Framework ios_image_gather Path Traversal Leading to Arbitrary File Write and Code Execution
Summary
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.
Severity
8.8 (High)
CWE
- CWE-22 - Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Assigner
References
4 references
| URL | Tags |
|---|---|
| https://github.com/rapid7/metasploit-framework/re… | release-notespatch |
| https://github.com/rapid7/metasploit-framework/pu… | patchissue-tracking |
| https://www.rapid7.com/blog/post/pt-metasploit-wr… | vendor-advisorytechnical-description |
| https://github.com/rapid7/metasploit-framework | product |
Impacted products
1 product
| Vendor | Product | Version | CPE status | |
|---|---|---|---|---|
| Rapid7 | Metasploit Framework |
Affected:
0 , < 6.5.5
(semver)
Unaffected: 6.5.5 (semver) |
guessed |
{
"containers": {
"cna": {
"affected": [
{
"defaultStatus": "unaffected",
"modules": [
"post/apple_ios/gather/ios_image_gather"
],
"platforms": [
"Linux",
"Windows",
"macOS"
],
"product": "Metasploit Framework",
"repo": "https://github.com/rapid7/metasploit-framework",
"vendor": "Rapid7",
"versions": [
{
"lessThan": "6.5.5",
"status": "affected",
"version": "0",
"versionType": "semver"
},
{
"status": "unaffected",
"version": "6.5.5",
"versionType": "semver"
}
]
}
],
"credits": [
{
"lang": "en",
"type": "finder",
"value": "h00die"
}
],
"descriptions": [
{
"lang": "en",
"supportingMedia": [
{
"base64": false,
"type": "text/html",
"value": "\u003cp\u003eThe 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 \u2014 data fully controlled by a hostile or tampered iOS device \u2014 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/\u0026lt;random\u0026gt; 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\u0027s 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.\u003c/p\u003e"
}
],
"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 \u2014 data fully controlled by a hostile or tampered iOS device \u2014 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/\u003crandom\u003e 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\u0027s 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."
}
],
"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\u0027s ~/.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\u0027s workstation and exposure of engagement credentials, keys, loot, and active sessions into the client environment."
}
]
}
],
"metrics": [
{
"cvssV3_1": {
"attackComplexity": "LOW",
"attackVector": "NETWORK",
"availabilityImpact": "HIGH",
"baseScore": 8.8,
"baseSeverity": "HIGH",
"confidentialityImpact": "HIGH",
"integrityImpact": "HIGH",
"privilegesRequired": "NONE",
"scope": "UNCHANGED",
"userInteraction": "REQUIRED",
"vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
"version": "3.1"
},
"format": "CVSS",
"scenarios": [
{
"lang": "en",
"value": "GENERAL"
}
]
}
],
"problemTypes": [
{
"descriptions": [
{
"cweId": "CWE-22",
"description": "CWE-22 Improper Limitation of a Pathname to a Restricted Directory (\u0027Path Traversal\u0027)",
"lang": "en",
"type": "CWE"
}
]
}
],
"providerMetadata": {
"dateUpdated": "2026-10-12T04:50:56.020Z",
"orgId": "9974b330-7714-4307-a722-5648477acda7",
"shortName": "rapid7"
},
"references": [
{
"name": "Metasploit Framework 6.5.5 Release Notes",
"tags": [
"release-notes",
"patch"
],
"url": "https://github.com/rapid7/metasploit-framework/releases/tag/6.5.5"
},
{
"name": "Metasploit Framework PR #21880 (fix for ios_image_gather path traversal)",
"tags": [
"patch",
"issue-tracking"
],
"url": "https://github.com/rapid7/metasploit-framework/pull/21880"
},
{
"name": "Metasploit Wrap-Up: Belgian Waffles, Chocolates, and Modules Frites",
"tags": [
"vendor-advisory",
"technical-description"
],
"url": "https://www.rapid7.com/blog/post/pt-metasploit-wrap-up-belgian-waffles-chocolates-and-modules-frites/"
},
{
"name": "Metasploit Framework source repository",
"tags": [
"product"
],
"url": "https://github.com/rapid7/metasploit-framework"
}
],
"solutions": [
{
"lang": "en",
"supportingMedia": [
{
"base64": false,
"type": "text/html",
"value": "https://github.com/rapid7/metasploit-framework/releases/tag/6.5.5"
}
],
"value": "https://github.com/rapid7/metasploit-framework/releases/tag/6.5.5"
}
],
"source": {
"discovery": "EXTERNAL"
},
"timeline": [
{
"lang": "en",
"time": "2026-08-27T10:45:00.000Z",
"value": "Vulnerability reported to Rapid7"
},
{
"lang": "en",
"time": "2026-09-02T00:54:00.000Z",
"value": "Rapid7 acknowledged receipt and forwarded to the Metasploit team"
},
{
"lang": "en",
"time": "2026-09-10T03:22:00.000Z",
"value": "Vulnerability confirmed legitimate; CVE-2026-87690 reserved"
},
{
"lang": "en",
"time": "2026-09-23T04:42:00.000Z",
"value": "Fix released in Metasploit Framework 6.5.5"
}
],
"title": "Metasploit Framework ios_image_gather Path Traversal Leading to Arbitrary File Write and Code Execution",
"x_generator": {
"engine": "Rapid7 Vulnerability Disclosure Program"
}
}
},
"cveMetadata": {
"assignerOrgId": "9974b330-7714-4307-a722-5648477acda7",
"assignerShortName": "rapid7",
"cveId": "CVE-2026-87690",
"datePublished": "2026-10-12T04:50:56.020Z",
"dateReserved": "2026-09-08T23:15:36.929Z",
"dateUpdated": "2026-10-12T04:50:56.020Z",
"state": "PUBLISHED"
},
"dataType": "CVE_RECORD",
"dataVersion": "5.2",
"vulnerability-lookup:meta": {
"nvd": {
"cve": {
"affected": [
{
"affectedData": [
{
"defaultStatus": "unaffected",
"modules": [
"post/apple_ios/gather/ios_image_gather"
],
"platforms": [
"Linux",
"Windows",
"macOS"
],
"product": "Metasploit Framework",
"repo": "https://github.com/rapid7/metasploit-framework",
"vendor": "Rapid7",
"versions": [
{
"lessThan": "6.5.5",
"status": "affected",
"version": "0",
"versionType": "semver"
},
{
"status": "unaffected",
"version": "6.5.5",
"versionType": "semver"
}
]
}
],
"source": "cve@rapid7.com"
}
],
"cveTags": [],
"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 \u2014 data fully controlled by a hostile or tampered iOS device \u2014 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/\u003crandom\u003e 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\u0027s 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."
}
],
"id": "CVE-2026-87690",
"lastModified": "2026-10-12T05:17:03.250",
"metrics": {
"cvssMetricV31": [
{
"cvssData": {
"attackComplexity": "LOW",
"attackVector": "NETWORK",
"availabilityImpact": "HIGH",
"baseScore": 8.8,
"baseSeverity": "HIGH",
"confidentialityImpact": "HIGH",
"integrityImpact": "HIGH",
"privilegesRequired": "NONE",
"scope": "UNCHANGED",
"userInteraction": "REQUIRED",
"vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
"version": "3.1"
},
"exploitabilityScore": 2.8,
"impactScore": 5.9,
"source": "cve@rapid7.com",
"type": "Secondary"
}
]
},
"published": "2026-10-12T05:17:03.250",
"references": [
{
"source": "cve@rapid7.com",
"url": "https://github.com/rapid7/metasploit-framework"
},
{
"source": "cve@rapid7.com",
"url": "https://github.com/rapid7/metasploit-framework/pull/21880"
},
{
"source": "cve@rapid7.com",
"url": "https://github.com/rapid7/metasploit-framework/releases/tag/6.5.5"
},
{
"source": "cve@rapid7.com",
"url": "https://www.rapid7.com/blog/post/pt-metasploit-wrap-up-belgian-waffles-chocolates-and-modules-frites/"
}
],
"sourceIdentifier": "cve@rapid7.com",
"vulnStatus": "Received",
"weaknesses": [
{
"description": [
{
"lang": "en",
"value": "CWE-22"
}
],
"source": "cve@rapid7.com",
"type": "Secondary"
}
]
}
}
}
}
Loading…
Loading…
Experimental. This forecast is provided for visualization only and may change without notice. Do not use it for operational decisions.
Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Loading…
Loading…
The MITRE ATT&CK techniques below are AI-generated suggestions, inferred from the description of the
vulnerability by the CIRCL/vulnerability-attack-technique-classification-roberta-base
model, served locally by ML-Gateway.
They have not been verified by an analyst and are provided for guidance only.
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Loading…
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.
Loading…