The pilots have the ability to pop the oxy masks and depressurize the airplane.
Why not?
They have their own (independent) supplemental oxygen, so there's no air safety implications. Of course this depends on having a door that gives at least a few moments' time delay; or somebody else giving them a few moments.
It doesn't take long -- 2-3 minutes in my experience -- for anoxia to put just about anybody down. People sitting in the seats would have their masks; but anybody wandering about the aisles would be in deep trouble. They could, of course, grab a mask from somebody, whereupon they're tethered.
Not perfect -- the terrorists could carry supplemental oxygen of their own. Of course, the cylinder would be moderately prominent, even on the current security x-ray machines, and might cause Questions To Be Asked.
And of course there's a danger to emphysemics, heart patients, etc., but if the alternative is that everybody dies for sure, why not try it?