Call it the "Jennifer Lawrence stock rally".
As hackers try to steal credit card data from Home Depot (HD)and naked pictures from Hollywood celebrities, cybersecurity companies are seeing big gains.
Shares of both Palo Alto Networks (PANW) and FireEye (FEYE) -- two of the hottest stocks in the security world -- are on fire. On Tuesday, Palo Alto rallied 5.6%, and FireEye popped nearly 9%.
The companies were trending on StockTwits, a social media discussion platform for traders.
"Cyber security stocks are ripping on news of a possible security breach at Home Depot," @StockTwits wrote on Twitter.
Related: Cybersecurity: How safe are you?
Home Depot confirmed on Tuesday it has teamed up with banks and law enforcement to look into some "unusual activities" tied to its customers.
This comes mere hours after private photos of Lawrence and other celebrities were leaked all over the Internet this weekend due to an apparent breach in their Apple (AAPL) iCloud accounts. The iPhone maker said hackers forced their way into the private photo collections by repeatedly guessing passwords or answers to their security questions.
Related: How celebrities' nude photos get leaked
The gains didn't last long though. Both stocks pulled back on Wednesday.
This isn't the first time a major hack caused a security firm to rally. Earlier this year FireEye stock jumped after Target (TGT) grappled with a gigantic breach that impacted some 40 million customers.
Seizing on the dramatic increase in cyber attacks, both companies went public in recent years. Palo Alto raised $260 million in June 2012 when it starting trading on the New York Stock Exchange, while FireEye raised $304 million from its 2013 IPO on the Nasdaq.
The two cyber stocks have moved in different directions this year. Despite Tuesday's rally, FireEye is down 23% in 2014. Investors have shown far more love for Palo Alto, which is now up 56% so far this year.