Security hot Spot issue in Sonar Qube 7.6

Im using SonarBe 7.2 . In my scan I got a critical issue for security hotspot “Make sure that using a regular expression is safe here”
The code is like , Mystring=Mystring.replaceAll(“ABC”,“XYZ”);
How this is a security issue . Im replacing a hard coded string with another hard coded string


Welcome to the community!

Next to the issue message (where it says “Make sure…”) you should see either an ellipses (...) or “See Rule”. Click on it to see the rule description. It should answer your questions.