https://labs.bishopfox.com/tech-blog/lexss-bypassing-lexical-parsing-security-controls * Return to BishopFox.com FOLLOW US * * * * BishopFox Labs Logo BishopFox Labs Logo * Home * Research & Tools * Tech Blog * Industry Blog * Advisories * About * Other + Articles + GitHub Repositories + Presentations + Research Papers & Guides + Slides + Videos [ ] Search BishopFox Labs Logo [ ] Search * Home * Research & Tools * Tech Blog * Industry Blog * Advisories * About * Other + Articles + GitHub Repositories + Presentations + Research Papers & Guides + Slides + Videos * Return to BishopFox.com FOLLOW US * * * * BACK TO LIST LEXSS: Bypassing Lexical Parsing Security Controls Chris Davis on Jun 22, 2021 5:00:00 AM TL;DR By using special HTML tags that leverage HTML parsing logic, it is possible to achieve cross-site scripting (XSS) even in instances where lexical parsers are used to nullify dangerous content. The primary goal in exploiting these types of XSS vulnerabilities is to get the sanitizing lexical parser to view the data as text data and not computer instructions (e.g., JavaScript instructions). This type of attack is possible when the HTML parser and the sanitizing lexical parsing do not parse the data in the same manner. Introduction to Key Concepts Note: this blog post assumes some previous knowledge of XSS (better described as JavaScript injection) and a basic understanding of HTML. For a high-level primer, head over to our XSS overview writeup. Cross-site Scripting (XSS) Protections XSS protections come in many forms. In the early days of preventing XSS and occasionally still today, regular expressions (regex) were used to examine user input for "dangerous" strings. A simplified example is that if a user provided input containing