Open In App

JSON Hijacking

JSON(JavaScript Object Notation)  denotes standard text-based-data format . It is widely used to provide a support mechanism between the server and the web application for the transmission of data. JSON Hijacking is a kind of network security attack. In this attack, an attacker targets a system that has access to cross-domain-sensitive JSON data. This attack is similar to Cross-Site Request Forgery holding some differences. In Cross-Site Request Forgery, the attacker forces the user to execute unwanted actions whereas in JSON Hijacking the user is manipulated to access a crafted link that will read the user’s data and pass it to the attacker.

Note: Older Browsers were more vulnerable to JSON Hijacking. As of now, this vulnerability has been fixed in modern Browsers. The users using modern browsers are almost safe.



Detection Methods:

<script src=”http://<jsonsite>/abc.php”></script>

This code will run by the browser requesting a GET Request to abc.php and the sensitive data will be sent along with the request.



 

JSON Hijacking Prevention:

Vulnerable :

[{ “object” : ” ” }]  // Not inside an object, inside an array

Not Vulnerable :

{ “object” : ” ” }   // Inside an object

{ “object” :  [{ “object”:” “}]  //Inside an object

Article Tags :