New York (CNN Business) A vast collection of data on Facebook users was exposed to the public until recently on Amazon's cloud computing servers, researchers have found.

Two third-party Facebook app developers were found to have stored user data on Amazon's servers in a way that allowed it to be downloaded by the public, according to a report from UpGuard, a cybersecurity firm.

One of the companies stored 146 gigabytes of data containing more than 540 million records, including comments, likes, reactions and account names, on the Amazon servers, according to UpGuard. The number of users whose data was included is not yet clear.

Another app is said to have stored unprotected Facebook passwords for 22,000 users.

Chris Vickery, the director of cyber risk research at UpGuard, told CNN Business that the find "highlights a problem that is intrinsic with mass data collection."

Read More