When a software program or website employs SQL databases such as Oracle, SQL Server, or MySQL, a SQL injection attack is possible. Phishers utilize SQL injection attacks to infiltrate confidential corporate and personal information, increasing the risk of compromise. If a SQL injection exploit is successful, it can be used to read and alter database data (e.g., insert, update, or delete), perform database administration operations, retrieve the data of a database management system file, also issue commands to the operating system in some cases. In comparison to basic recurrent architectures, LSTM networks have been demonstrated to learn long-term dependencies more quickly and reduce gradient disappearance and explosion. Preventing SQL injection with the usage of LSTMs is the subject of the proposed research. The LSTM model has been suggested as a training method for tracing or filtering requests from an unauthentic user. The dataset trained is looking at records that include the sender and recipient information, as well as the success or failure of the transmission. If this transaction has repeatedly failed due to an on-going assault on the system, then this is a red flag. Then, this system will flag the transaction and block the user from accessing any of the system's resources. This model has been trained to increase security by creating a system that allows the user to authenticate a transaction.