Google News
logo
Java Hibernates - Interview Questions
Is hibernate prone to SQL injection attack?
SQL injection attack is a serious vulnerability in terms of web security wherein an attacker can interfere with the queries made by an application/website to its database thereby allowing the attacker to view sensitive data which are generally irretrievable. It can also give the attacker to modify/ remove the data resulting in damages to the application behavior.
 
Hibernate does not provide immunity to SQL Injection. However, following good practices avoids SQL injection attacks. It is always advisable to follow any of the below options :
 
* Incorporate Prepared Statements that use Parameterized Queries.
* Use Stored Procedures.
* Ensure data sanity by doing input validation.
Advertisement