There are obviously some risks here, as the door is opened briefly twice, but there are a number of steps taken to minimize this risk.
The biggest realized risk seems to have been Germanwings Flight 9525. A suicidal co-pilot waited until the Captain left the cockpit. Then he locked the door and flew the plane into the side of a mountain.
An attack can be designed against any vulnerability. Whether that attack becomes practically executable remains to be seen.
Protocols to ensure two crew members in the cockpit at all times are now being considered.
There was an exceptionally good essay on implications of this incident, with computer/systems security implications, though I cannot locate it. James Fallows' Atlantic piece was good, though not quite what I was looking for.
http://www.theatlantic.com/international/archive/2015/03/ger...