More than half a year ago, someone may or may not have used AI to implement this insecure backend.
That is not a very good basis to start complaining about AI producing insecure code.
If you still want to do it, at least check if it actually is the case with reasonably intelligent current models.