CVE-2012-3748

medium
Published 2012-11-03 ยท Modified 2026-04-29
CVSS v3
โ€”
CVSS v4 NEW
โ€”
not yet in upstream
VIR risk
6.1

Description

Race condition in WebKit in Apple iOS before 6.0.1 and Safari before 6.0.2 allows remote attackers to execute arbitrary code or cause a denial of service (application crash) via vectors involving JavaScript arrays.

Predictions

Exploit likelihood
55%
Patch ETA
โ€”

Heuristic predictions, AS-IS, for prioritization only.

Mitigations

No mitigations published for this CVE yet.

The vendor-content worker queues fetches as references arrive (check back in a few minutes). Or โ€” if you've already worked around this in production โ€” publish your fix to the community-verified tier.

โœš Propose a mitigation on Community โ†’ Mitigations published via the community go through AI scoring + 2 human reviewers + 7-day silent objection window before landing here with source_tier=community-verified.

Exploits

Public proof-of-concept code below. AS-IS, for defenders and authorised testing only.

Exploit-DB

EDB-28081 remote ios text ยท 4 KB
Vitaliy Toropov ยท 2013-09-04

Apple Safari 6.0.1 for iOS 6.0 / Apple Mac OSX 10.7/8 - Heap Buffer Overflow

text exploit Source: Exploit-DB
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

+------------------------------------------------------------------------------+
| Packet Storm Advisory 2013-0903-1                                            |
| http://packetstormsecurity.com/                                              |
+------------------------------------------------------------------------------+
| Title: Apple Safari Heap Buffer Overflow                                     |
+--------------------+---------------------------------------------------------+
| Release Date       | 2013/09/03                                              |
| Advisory Contact   | Packet Storm (advisories@packetstormsecurity.com)       |
| Researcher         | Vitaliy Toropov                                         |
+--------------------+---------------------------------------------------------+
| System Affected    | Apple Safari                                            |
| Versions Affected  | 6.0.1 for iOS 6.0 and OS X 10.7/8, possibly earlier     |
| Related Advisory   | APPLE-SA-2012-11-01-2                                   |
| Related CVE Number | CVE-2012-3748                                           |
| Vendor Patched     | 2012/11/01                                              |
| Classification     | 1-day                                                   |
+--------------------+---------------------------------------------------------+

+----------+
| OVERVIEW |
+----------+

The release of this advisory provides exploitation details in relation to a 
known patched vulnerability in Apple Safari.   These details were obtained 
through the Packet Storm Bug Bounty program and are being released to the 
community.

+------------------------------------------------------------------------------+

+---------+
| DETAILS |
+---------+

The heap memory buffer overflow vulnerability exists within the WebKit's 
JavaScriptCore JSArray::sort(...) method.  This method accepts the user-defined 
JavaScript function and calls it from the native code to compare array items. 
If this compare function reduces array length, then the trailing array items 
will be written outside the "m_storage->m_vector[]" buffer, which leads to the 
heap memory corruption.

The exploit for this vulnerability is a JavaScript code which shows how to 
use it for memory corruption of internal JS objects (Unit32Array and etc.) 
and subsequent arbitrary code execution (custom ARM/x64 payloads can be pasted 
into the JS code).

+------------------------------------------------------------------------------+

+------------------+
| PROOF OF CONCEPT |
+------------------+

The full exploit code is available here:
http://packetstormsecurity.com/files/123088/
https://gitlab.com/exploit-database/exploitdb-bin-sploits/-/raw/main/bin-sploits/28081.tgz

+------------------------------------------------------------------------------+

+---------------+
| RELATED LINKS |
+---------------+

http://lists.apple.com/archives/security-announce/2012/Nov/msg00001.html
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2012-3748

+------------------------------------------------------------------------------+


+----------------+
| SHAMELESS PLUG |
+----------------+

The Packet Storm Bug Bounty program gives researchers the ability to profit 
from their discoveries.  You can get paid thousands of dollars for one day 
and zero day exploits.  Get involved by contacting us at 
getpaid@packetstormsecurity.com or visit the bug bounty page at: 

http://packetstormsecurity.com/bugbounty/


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (GNU/Linux)

iEYEARECAAYFAlImrisACgkQrM7A8W0gTbHnIwCfR6vCe/+YjbxYoeHaErbHYDsN
bC0An34R0Am9RemKiIDnoa+hD3pT+M0y
=VXyD
-----END PGP SIGNATURE-----

OS impact

macos macOS Affected 41 releases
VersionStatusFixed in
5.1.1 Affected โ€”
5.0.1 Affected โ€”
5.0 Affected โ€”
4.3.5 Affected โ€”
4.3.3 Affected โ€”
4.3.2 Affected โ€”
4.3.1 Affected โ€”
4.3.0 Affected โ€”
4.2.8 Affected โ€”
4.2.5 Affected โ€”
4.2.1 Affected โ€”
4.1 Affected โ€”
4.0.2 Affected โ€”
4.0.1 Affected โ€”
4.0 Affected โ€”
3.2.2 Affected โ€”
3.2.1 Affected โ€”
3.2 Affected โ€”
3.1.3 Affected โ€”
3.1.2 Affected โ€”
3.1 Affected โ€”
3.0.1 Affected โ€”
3.0 Affected โ€”
2.2.1 Affected โ€”
2.2 Affected โ€”
2.1.1 Affected โ€”
2.1 Affected โ€”
2.0.2 Affected โ€”
2.0.1 Affected โ€”
2.0.0 Affected โ€”
2.0 Affected โ€”
1.1.5 Affected โ€”
1.1.4 Affected โ€”
1.1.3 Affected โ€”
1.1.2 Affected โ€”
1.1.1 Affected โ€”
1.1.0 Affected โ€”
1.0.2 Affected โ€”
1.0.1 Affected โ€”
1.0.0 Affected โ€”
โ€” Affected โ€”
suse SUSE Affected 1 release
VersionStatusFixed in
โ€” Affected โ€”

Application impact

VendorProductVersionsFixed
macos applesafari5.1.4
macos applesafari{"endIncluding":"6.0.1"}
macos applesafari1.0
macos applesafari1.0.0
macos applesafari1.0.0b1
macos applesafari1.0.0b2
macos applesafari1.0.1
macos applesafari1.0.2
macos applesafari1.0.3
macos applesafari1.1.0
macos applesafari1.1.1
macos applesafari1.2.0
macos applesafari1.2.1
macos applesafari1.2.2
macos applesafari1.2.3
macos applesafari1.2.4
macos applesafari1.2.5
macos applesafari1.3
macos applesafari1.3.0
macos applesafari1.3.1
macos applesafari1.3.2
macos applesafari2.0.0
macos applesafari2.0.1
macos applesafari2.0.2
macos applesafari2.0.3
macos applesafari2.0.4
macos applesafari3.0.0
macos applesafari3.0.0b
macos applesafari3.0.1
macos applesafari3.0.1b
macos applesafari3.0.2
macos applesafari3.0.2b
macos applesafari3.0.3
macos applesafari3.0.3b
macos applesafari3.0.4
macos applesafari3.0.4b
macos applesafari3.1.0
macos applesafari3.1.0b
macos applesafari3.1.1
macos applesafari3.1.2
macos applesafari3.2.0
macos applesafari3.2.1
macos applesafari3.2.2
macos applesafari4.0
macos applesafari4.0.0b
macos applesafari4.0.1
macos applesafari4.0.2
macos applesafari4.0.3
macos applesafari4.0.4
macos applesafari4.0.5
macos applesafari4.1
macos applesafari4.1.1
macos applesafari4.1.2
macos applesafari5.0
macos applesafari5.0.1
macos applesafari5.0.2
macos applesafari5.0.4
macos applesafari5.0.5
macos applesafari5.0.6
macos applesafari5.1
macos applesafari5.1.1
macos applesafari5.1.2
macos applesafari5.1.3
macos applesafari5.1.5
macos applesafari5.1.6
macos applesafari5.1.7
macos applesafari6.0

References

CWEs

CWE-362

Community-verified mitigations for this CVE will appear above when contributors publish them.

Verify integrity in audit chain (admin only). AS-IS.