(new) Adobe Flash Player security hole found, flXHR’s response
Where are we now?
The most recent release of flXHR (v0.6) contains a significant update of its security model, in relation to the cross-domain policy checking for allowing cross-domain communication. All authors should upgrade their copy of flXHR to this new release immediately, to take advantage of this enhanced security model. Any version of flXHR prior to 0.6-alpha1 should be considered insecure and unsuitable for production usage.
Recently, a security ‘hole’ was discovered in Adobe’s cross-domain server policy model. The behavior observed by testing the Flash Player model not only deviated from security white papers that Adobe themselves released, but has what is considered to be a fairly important and detrimental shortcoming in relation to its application of cross-domain policies to cross-domain communication attempts by a SWF file. I contacted Adobe through a number of different channels and reported these findings. I’ve received word from their engineers that they consider it a reputable and credible report that they are discussing internally.
However, they have yet to make any further official response (positive or negative) on the report or on what (if anything) they plan to do to address it, after several weeks of patient and quiet waiting on my part. I no longer feel it’s prudent to keep quiet and continue to allow authors and users of flXHR to be susceptible to this security hole. The update to flXHR addresses this hole and makes flXHR safe from the vulnerability, and this post serves as a public statement to bring attention to the matter and to encourage all flash content developers to take note and to address the concerns in their own assets.
You definitely raised an interesting point regarding Flash security. I wouldn’t call this a security hole though, but rather a missing security feature.
It’s always up to developer to develop secure application according to the platform capabilities and limitation. A “good” developer can break the toughest security model in a sec
Comment by guya — August 28, 2008 @ 10:47 am
@guya- I think the reason I chose to use “hole” instead of “gap” or “missing feature” is because of point #2 in the page-1 summary — that the behavior is contrary to Adobe’s own security white paper (bottom of page 28) on the topic.
But yes, I agree wholeheartedly that developers/authors need to be more diligent. That’s why I spent an entire month writing and testing (some fairly complex) code to “plug” the hole in the flXHR project so that flXHR can’t be abused (purposely or inadvertently).
But, clearly, my code is not nearly as efficient as if Adobe would address the hole/feature with their native code. And my code doesn’t do much to help all the other flash .swf assets out there which may be vulnerable to such a thing (although the code I wrote *is* in its own class so it *could* be adapted to other projects somewhat straightforwardly).
I guess that’s mostly what I am hoping will come of all this, so that eventually my code won’t be necessary, and other flash content developers won’t have to worry (as much) about this kind of feature-gap.
Comment by Shade — August 28, 2008 @ 12:56 pm
The problem is your underlying assumption is incorrect. You said:
“The domain of the URL of the hosting HTML page is *not* considered, even though the SWF’s executable code (similar to any remotely loaded Javascript files) will in reality execute in the context of that page.”
However, SWF is executed in the context of the SWF’s origin, not of the surrounding page and does not have access to the surrounding page (unless both SWF and HTML are from the same origin OR you enable cross-domain scripting explicitly with allowScriptAccess=always). So it is not the same as importing JavaScript via the SCRIPT tag.
Comment by LDA — October 9, 2008 @ 3:29 pm
I understand that the SWF logically operates in the originating domain security context. And I understand how SWF differs from JS, in that SWF provides this special ability to self-contain its execution to a remote security context (*unless* that barrier is intentionally taken down by the author).
But physically, the SWF is operating inside of an HTML page on perhaps a different domain, and moreover, may be interacting with the javascript of that page on the different domain (if the author allowed it).
In my opinion, what matters most here is the practical security context, which for flash on a webpage, can look a lot more like a mix between the page’s domain and the SWF domain, than *just* the SWF domain.
I know there are access controls (‘allowscriptaccess’ and ‘allowdomain’) which are generally in place to help prevent (or allow) the swf from stepping out of its security context bounds when on a page from a different domain. However, there are plenty of times when a flash file (like flXHR for instance) must be granted permission to talk with the surrounding page regardless of the domain, to accomplish its tasks or goals.
A stand-alone, totally security-sandboxed flash is fine for say a flash ad, but real interactive RIA type flash often needs to step outside it’s walls from time-to-time, and so authors must sometimes breach this defense.
So, if you have such a flash file, which, internally published *and* through the HTML it’s hosted in, has granted this cross-domain access, then practically speaking, that SWF is now operating in a hybrid security context, a mixture of both the page domain and the originating domain.
It is *this* use case which leads me to assert that both the page domain and the swf-domain would be proper to check in resolving cross-domain policies from a server.
Think about it this way… if Adobe’s flash *did* do as I suggest, in most cases (where the page-domain and swf-domain are the same), the behavior wouldn’t be any different than it is right now. But in the set of cases where a SWF is operating in the hybrid context, the cross-domain policies *would be* more secure than they are now, assuming that only the swf-domain need be considered.
I’m simply suggesting that giving developers the ability to breach the strict originating domain security context (ie, the “AllowDomain” actionscript call) but not having the policy file model also support this hybrid context is where the “hole” comes from. And try as I may, the implementation I put in place to protect flXHR from being exploited while in the hybrid zone is limited in its effectiveness — only a native solution from Adobe would fully plug this hole.
Comment by Shade — October 9, 2008 @ 4:52 pm
[...] was the class added to flXHR.swf in a previous alpha release to address the needs discussed in this blog on security model holes. However, it was discovered through further testing that IP addresses, single-word domains (like [...]
Pingback by Changes and new features in flensed 1.0 | the Fresh! — December 5, 2008 @ 7:32 pm