South Korea based Samsung’s S3 smartphone can be attacked by malicious hackers through a hidden web code that will activate a full factory reset of the device, erasing contacts, photographs, music, apps and other important data, according to a German security researcher.

German security researcher revealed the functionality of the code comprising 11 digits and symbols, which can be implanted in the HTML of a web page that will further restore factory settings.

According to Technische Universität Berlin researcher, Ravi Borgaonkar Samsung Galaxy S3 users visiting to such a page would lead to restoring of their device to factory settings with no permission or any input from users.

The researchers have also found other codes that would be used in other hackings including a code that would even destroy the SIM card.

The lone way to secure the android run Samsung devices against the attacks is to disconnect ‘service loading’ in settings, and immobilise quick response (QR) code and near field communication (NFC) apps, the researcher said.

The move calls Samsung to issue an instant software update to address the ‘major security vulnerability’.

Samsung had unveiled the new Galaxy S3 in May 2012 and it is the chief rival to US based Apple’s iPhone.