Shares of Internet security firm FireEye Inc. soared on their first day of trading Friday, benefiting from investor interest in the security sector following some high-profile hacks at companies and government agencies in recent years.

The successful initial public offering comes even as some question whether the market can support so many...