Barts Health NHS Trust is warning patients and staff after hackers exploited a software vulnerability to steal personal information.