Is your refrigerator spying on you? Probably not. But online-security experts caution that homes with “smart” technology—thermostats, security cameras, lights and appliances that connect to the Internet—are vulnerable to being hacked.

In a recent survey of 4,065 adults in the U.S., real-estate brokerage Coldwell Banker Real Estate found that 45% of respondents own smart-home technology or plan to invest in it this year. Yet only recently has security become a priority. While there have been few reported incidents, online-security...