Is there a real threat of so called ">50% attack"? According to Bitcoin Wiki attacked who has majority of computing power of the bitcoin network can successfully do some nasty things such as potentially book double-spending or prevent transactions from gaining confirmations or block other minders mining valid blocks.

Today the vast majority of computational power is controlled by mining pools. According to blockchain.info GHash.IO is 30%, BTC Guild is 23% and Eligius is 12% (as of today 15/12/13).

Is there a threat for the network if pools would pair up to get more than 50%? Alternatively two major pools could get compromised simultaneously in order to get more than 50%. I was wondering how real is such scenario?

References mentioned:


https://en.bitcoin.it/wiki/Weaknesses#Attacker_has_a_lot_of_computing_power
https://blockchain.info/pools?timespan=4days
Well, the answer is two-fold: what's the chance of a 51%-attack to happen and what are the consequences if it does. 

What's the chance of it happening?

You mention correctly that the major parties via which such an attack can be achieved, are miners. The chance that a 51%-attack is performed by a 3th party is neglectable, since the cost to achieve a mining output to achieve such as enormous. Only maybe if a large government would decide to assign a large budget to it, it may happen, but still ASIC hardware is scarce and difficult to manufacture.

So basically the real threat is in the miners. However, the chance that a miner would obtain >50% hashrate share is minimal. The miners themselves would not benefit from their pool having such power, on the contrary. So what would happen is miners leaving for another pool, pulling the pool's share back under 50%. 

The only real threat that remains is the possibility that multiple pools are compromised simultaneously. In such a case, however, I believe the pool owners will notify users as soon as possible, resulting in miners leaving. Also, from the moment the party in power of the compromised miners starts manipulating the block chain, the community will notice. I believe it won't take long before people will be warning each other and miners will stop operating at the compromised pools. 

So let's conclude that in the worst case, an attacker will can perform an attack and hold it for a few hours max until it will lose its position. 

What are the consequences in such a case?

A party that is in control of the network can't really manipulate the blockchain very drastically. Here are the main actions one would be able to perform:


Decide what transactions are included in the chain. Essentially it can halt all payments, but than they would be noticed very quickly. Probably the attacker will only manipulate transactions of his own concern. 
Receive all block rewards. But that is no more than an extrapolation of a miner's situation with a &lt;50% hashrate. 
As a result of nr 1, an attacker can easily perform double-spend attacks. This will be the main threat. Since the attacker decides what transactions make it to the blockchain, he can very easily make a transaction, perhaps even give it one confirmation, and then revert it with another. When he receives fiat or goods for his first transaction, he can make profit by reverting the transaction. 


It is clear that the consequences are quite minimal. It is difficult to maintain such a situation, it will require extensive planning in order to make real profit from the attack since the only way to actually make profit is through exchanging things for bitcoins and double-spending the transaction you made.

EDIT: There might actually be a scenario in which an attacker may be able to make good profit from the attack, like David Schwartz mentions in the comments. Even with the fore-mentioned assumption that the network will react after the first time the attacker messes with the block chain, a well-prepared attack can do damage with one backfork*. The attack would look as follows:


The attacker deposits bitcoins in an account on an exchange. (Probably he will have multiple accounts on multiple exchanges to make as much profit as possible at once.)
As soon as the exchange recognises the transaction as being confirmed, the user withdraws the bitcoins again. Most exchanges use different wallets for sending and receiving, so the withdrawn coins will most probably come from a different address. (Making the withdrawal independent from the deposit.)
As soon as the attacker receives the transactions that represent his withdrawals through the bitcoin network, he will hardfork* the chain to undo his deposit transaction and doublespending it in his new chain, as well as including the withdrawal transactions in the new chain.
This way the attacker will have both the deposit amount as the withdrawal amount in his wallet.


Although this scenario is possible, it would require extensive planning. Also, most exchanges require more than one confirmations and the more confirmations are required, the harder the attack becomes. To successfully hardfork* multiple blocks in a feasible time, the attacker will need more than just 51% of the network hashrate.

* I'm not sure if this is an established term, but I think of a backfork as a fork of the chain a few blocks before the latest to revert the history of those blocks.

(Wrote this from my mobile phone, typos may occur.)