Token Parsing Whitelist for User Content Security

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current methods for preventing user-generated content attacks, such as XSS and SQL injection, rely on blacklist filters that are reactive, inefficient, and prone to missing nested attacks or removing legitimate content, and are quickly outdated by new attack variants.

Innovation Solution

Implementing a system that tokenizes user-generated content and uses whitelists to parse and filter out malicious elements, including HTML tags, CSS selectors, and media tags, ensuring only safe content is allowed through, thereby preventing XSS and SQL injection attacks.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If blacklist filters are used to remove malicious content, then some attacks are blocked, but nested attacks are missed and legitimate content is removed

Engineering Contradiction:
Improveattack blocking effectivenessVSAvoidattack detection accuracy
Core Design Contradiction:
ReliabilityVSMeasurement precision

Solution Approach 1:

The patent segments user-generated content into discrete tokens (HTML tags, attributes, text nodes, CSS selectors, media tags) and processes each token individually through a whitelist validation system. This segmentation allows the system to evaluate each element's safety independently, preventing both nested attacks that blend malicious and legitimate content, and false removal of safe content that resembles attack patterns.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

Instead of using a blacklist approach that tries to identify and remove known malicious patterns, the patent inverts the logic by using a whitelist that explicitly defines safe content. The system allows only content that matches the whitelist through, automatically blocking everything else. This inversion eliminates the need to continuously update blacklist rules and prevents false positives while maintaining high attack blocking effectiveness.

Inventive Principle:
Principle #13The other way round (Inversion)

2Adaptability or versatility

If blacklist filters are updated to cover new attack variants, then detection improves, but system complexity and maintenance increase

Engineering Contradiction:
Improveresponse to new attacksVSAvoidfilter configuration complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent replaces the traditional blacklist model with a whitelist model that defines safe content patterns once. New attack variants are automatically blocked without requiring configuration updates because the whitelist explicitly specifies what is allowed. This inversion makes the system inherently adaptable to new threats while minimizing maintenance complexity, as the whitelist structure remains stable even as attack methods evolve.

Inventive Principle:
Principle #13The other way round (Inversion)

Solution Approach 2:

The whitelist-based system provides self-service adaptability by automatically rejecting any content that does not match predefined safe patterns. The system does not require manual updates or reconfiguration when facing new attacks; the whitelist structure inherently handles novel threats by their very nature of not matching approved patterns, eliminating the need for continuous human intervention.

Inventive Principle:
Principle #25Self-service

3Reliability

If iterative blacklist filtering is applied, then first-level attacks are removed, but processing time increases and nested attacks are missed

Engineering Contradiction:
Improveattack removal capabilityVSAvoidcontent processing speed
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent segments content into tokens and validates each token against the whitelist in a single pass through the content. This eliminates the need for multiple iterative filtering passes required by blacklist systems, thereby maintaining high attack removal capability while significantly improving processing speed and productivity.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The whitelist is pre-configured with all safe content patterns before processing begins. During content validation, each token is simply checked against this pre-established whitelist, eliminating the need for iterative analysis and complex pattern matching that characterizes blacklist systems. This preliminary preparation enables fast, single-pass filtering that maintains security effectiveness while boosting processing efficiency.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS9098722B2Systems and methods for parsing user-generated content to prevent attacks
Publication Date: 2015.08.04 IMPERVA INC
  • US9098722B2 patent drawing
  • US9098722B2 patent drawing
  • US9098722B2 patent drawing

AI summary

The present invention relates to systems and methods for parsing of a token stream for user generated content in order to prevent attacks on the user generated content. The systems and methods include a database which stores one or more whitelists, and a parser. The parser removes tokens from the token stream by comparing the tokens against the whitelist. Next, the parser validates CSS property values, encodes data within attribute values and text nodes, reconciles closing HTML tags, and coerces media tags into safe variants. The tokens removed may be any of HTML tags, HTML attributes, HTML protocols, CSS selectors and CSS properties.