Fix path traversal in FileDirectory.getDataColumn (CVE-2026-58460) - #192
Fix path traversal in FileDirectory.getDataColumn (CVE-2026-58460)#192actuator wants to merge 1 commit into
Conversation
_display_name from a shared content:// URI was used verbatim as the destination filename under cacheDir, letting a co-resident app write attacker-controlled bytes outside cache/ (e.g. "../evil.txt"). Route it through sanitizedCacheFile(): basename strip + canonical-path containment in cacheDir; empty/traversal-only names fall back to a generated name. CVE-2026-58460 VulnCheck: 63ff6452-8dbb-4088-ba4f-681412401c4f
Path Traversal in FileDirectory.getDataColumn Leading to Arbitrary File WritePackage: ajith-ab/react-native-receive-sharing-intent (npm: react-native-receive-sharing-intent) Affected Files
Root CauseIn val fileName = cursor.getString(columnIndex)
targetFile = File(context.cacheDir, fileName)The taint path is: PoC
<provider android:name=".EvilProvider"
android:authorities="com.attacker.evil"
android:exported="true"
android:grantUriPermissions="true"/>
Intent(Intent.ACTION_SEND).apply {
setClassName("<consumer.pkg>", "<consumer.activity>")
type = "*/*"
putExtra(Intent.EXTRA_STREAM, Uri.parse("content://com.attacker.evil/payload"))
addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
}
Marker file present outside ImpactA co-resident app with no permissions and no user interaction can write attacker-controlled bytes to an attacker-chosen path inside the consuming app's private storage, defeating Android inter-app isolation. Consumer-dependent escalation includes integrity compromise (overwriting databases, shared preferences, cached HTML or config), stored XSS if a written file is later rendered in a WebView, DoS by corrupting required files, and code execution on consumers that load executable content from a reachable writable path. The library-level defect is the unsanitized write primitive, making every consuming app independently vulnerable. Suggested RemediationStrip to basename before constructing the path ( |
_display_name from a shared content:// URI was used verbatim as the destination filename under cacheDir, letting a co-resident app write attacker-controlled bytes outside cache/ (e.g. "../evil.txt"). Route it through sanitizedCacheFile(): basename strip + canonical-path containment in cacheDir; empty/traversal-only names fall back to a generated name.
CVE-2026-58460
VulnCheck: 63ff6452-8dbb-4088-ba4f-681412401c4f