I recently discovered that my website's captcha security system can be easily bypassed using Javascript injection. I found this interesting article that explains how it can be done:
var res=document.querySelector(".targetWrapper .target").style["background- position"].match(/\d+/);
[].map.call(document.querySelectorAll(".draggable"),function(a){
if(a.style["background-position"].match(/\d+/)[0]==res){
return document.querySelector(".captchaAnswer").value=a.id
}
});
I am now looking for ways to enhance the security of my captcha feature to prevent such vulnerabilities. Any suggestions on how I can achieve this?