How to meet it
OWASP AISVS v1.01
Input Validation · Prompt Injection Defenses
Allow-list the characters you accept
Verify that the system implements a character set restriction for all inputs. The restriction must use an allow-list approach derived from the languages and use cases the system supports, permitting only characters that are explicitly required.
OWASP AISVS v1.01, requirement 2.1.5
In plain English
Allow only the characters your use case needs. If your users write in English and French, there is no reason to accept control characters or scripts that only an attacker would send.
What good looks like
- The allowed character set is based on the languages and features you support.
- Characters outside the set are rejected or removed, with a log entry.
- The list is reviewed when you add a language.
How teams usually do it
- Unicode script and category checks in the input layer.
- Separate allow-lists for free text and structured fields.
Evidence an auditor would accept
- The allow-list and the reason for each script or category.
- Tests showing disallowed characters are blocked.
Common mistakes
- A deny-list of known bad characters, which always misses something.
- Blocking characters your real users need, which pushes teams to switch the check off.
Not sure which requirements apply to your system? Take the assessment.
Requirement text from the OWASP AI Security Verification Standard, licensed under CC BY-SA 4.0. This guidance is shared under the same licence.
