cbcvebase.
CVE-2018-4386
published 2019-04-03

CVE-2018-4386: Multiple memory corruption issues were addressed with improved memory handling. This issue affected versions prior to iOS 12.1, tvOS 12.1, watchOS 5.1, Safari…

PriorityP178high8.8CVSS 3.0
AVNACLPRNUIRSUCHIHAH
ITWEXPLOITVulnCheck KEV
Exploited in the wild
EPSS
6.46%
93.0th percentile
Multiple memory corruption issues were addressed with improved memory handling. This issue affected versions prior to iOS 12.1, tvOS 12.1, watchOS 5.1, Safari 12.0.1, iTunes 12.9.1, iCloud for Windows 7.8.

Affected

13 ranges
VendorProductVersion rangeFixed in
appleicloud< 7.87.8
appleicloud_for_windows
appleios
appleiphone_os< 12.112.1
appleitunes< 12.9.112.9.1
appleitunes_12.9.1_for_windows
applesafari< 12.0.112.0.1
applesafari
appletvos< 12.112.1
appletvos
applewatchos< 5.15.1
applewatchos
debianwebkit2gtk< webkit2gtk 2.22.3-1 (bookworm)webkit2gtk 2.22.3-1 (bookworm)

Detection & IOCsextracted from sources · hover to see the quote

commandfunction trigger() { let o = {a: 1}; for (var k in o) { { k = 0x1234; function k() { } } o[k]; } } trigger();
otherSTRUCTURE_SPRAY_SIZE = 0x1800
  • The vulnerability is triggered by hoisting a sloppy-mode function over a for-in loop iteration variable (k), causing the ForInContext to not be invalidated. Detect JavaScript containing a for-in loop where the iteration variable is reassigned to a non-string object and a same-named function declaration exists in the same block scope.
  • The PS4 exploit targets WebKit on firmware versions below 6.72 (fixed in 7.00). Detections should focus on WebKit JSC engine behaviour; the bug was fixed in PS4 firmware 7.00 and Apple platforms iOS 12.1, tvOS 12.1, watchOS 5.1, Safari 12.0.1, iTunes 12.9.1, iCloud for Windows 7.8.
  • The exploit uses a structure spray of 0x1800 Uint32Array objects with unique property names ('p' + i) to groom the JSC heap. Monitoring for large numbers of Uint32Array allocations with sequentially-named properties in a single JS execution context may indicate exploitation.
  • The exploit crafts a fake Float64Array JSCell header with m_type=0x27 and m_flags=0x18 to achieve type confusion. Detection of crafted JSCell headers with these specific byte values in heap memory may indicate active exploitation.
  • The exploit achieves addrof/fakeobj primitives and arbitrary read/write via a confused Uint32Array (g_confuse_obj['0a']) that overlaps with a fake container object. Look for WebKit crash telemetry or JIT anomalies involving op_get_direct_pname with a non-string property operand.
  • ·The PS4 exploit PoC hardcodes m_structureID as a 'current guess' (0x0008 in little-endian), meaning the byte signature for the fake JSCell header is environment-specific and may not match across different WebKit builds or firmware versions.
  • ·The exploit is confirmed for PS4 firmware 6.XX but may also work on older firmware versions; reliability on non-PS4 WebKit targets (iOS, Safari, iTunes) is not confirmed by the PoC author.

CVSS provenance

nvdv3.08.8HIGHCVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
nvdv2.06.8MEDIUMAV:N/AC:M/Au:N/C:P/I:P/A:P
osv8.8HIGH
vulncheck8.8HIGH
vendor_debian8.8LOW
CVEs like this are exactly what “Exploited This Week” covers.

Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.