My site has a form allowing signed in users to upload photos to their account. At some point recently form submissions started triggering Managed Challenge actions based on “Inbound Anomaly Score Exceeded”. After the “Verifying you are human” interstitial the user is returned to the upload photo page without the photos being posted.
Country: United States
IP Address: xxx
Service: Managed rules
Action taken: Managed Challenge
Ruleset: Cloudflare OWASP Core Ruleset …c25d2f1f
Rule: 949110: Inbound Anomaly Score Exceeded …843b323c
OWASP score: 63
Additional logs (13)
920270: Invalid character in request (null character) …bd22c723 Cloudflare OWASP Core Ruleset Score (+5)
920271: Invalid character in request (non printable characters) …1d8cf992 Cloudflare OWASP Core Ruleset Score (+5)
932200: RCE Bypass Technique …c91b7247 Cloudflare OWASP Core Ruleset Score (+5)
941310: US-ASCII Malformed Encoding XSS Filter - Attack Detected …cbc01671 Cloudflare OWASP Core Ruleset Score (+5)
941320: Possible XSS Attack Detected - HTML Tag Handler …346650ed Cloudflare OWASP Core Ruleset Score (+5)
941340: IE XSS Filters - Attack Detected …7fbedd30 Cloudflare OWASP Core Ruleset Score (+5)
942120: SQL Injection Attack: SQL Operator Detected …d732161b Cloudflare OWASP Core Ruleset Score (+5)
942200: Detects MySQL comment-/space-obfuscated injections and backtick termination …58ecf7e7 Cloudflare OWASP Core Ruleset Score (+5)
942260: Detects basic SQL authentication bypass attempts 2/3 …55395a78 Cloudflare OWASP Core Ruleset Score (+5)
942330: Detects classic SQL injection probings 1/3 …18a93bb2 Cloudflare OWASP Core Ruleset Score (+5)
942370: Detects classic SQL injection probings 2/3 …7cdec0c8 Cloudflare OWASP Core Ruleset Score (+5)
942430: Restricted SQL Character Anomaly Detection (args): # of special characters exceeded (12) …3297003f Cloudflare OWASP Core Ruleset Score (+3)
942440: SQL Comment Sequence Detected …682bb405 Cloudflare OWASP Core Ruleset Score (+5)
The form is quite basic:
<form action="/uploadphotos" method="post" name="uploadphoto" enctype="multipart/form-data">
<input id="upload_filename" name="upload_filename" type="file">
<input id="submit_upload" name="submit_upload" type="submit" value="Add photo">
</form>
Is there a way to mark form inputs as being image uploads so the data is not misinterpreted as being, for example, an SQL injection?