This is likely to be server related rather than a problem with Moodle. I’ve had this in the past myself with overly aggressive modsec rules. Contact your hosting provider. They will probably want to know what the url and time that you were trying to add the image so that they can identify the rule/s that are kicking in.
Blocks
HTML Block - Error when insert an image
This discussion has been locked so you can no longer reply to it.