Runtime Agent Injects Context-Sensitive Validation to Prevent XSS

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Web applications are vulnerable to attacks like cross-site scripting (XSS), and traditional protection methods are inadequate, particularly in the production stage, as they often require significant time to implement and may not effectively safeguard against complex enterprise web application vulnerabilities.

Innovation Solution

A runtime agent is introduced to intercept and modify web application code, injecting context-sensitive validation and security policies at strategic points to protect output, using identifiers to determine context and enforce security measures such as Content Security Policy (CSP) without modifying the entire application.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If traditional protection methods are used, then web applications can have some security measures, but they require significant time to implement and are inadequate in the production stage

Engineering Contradiction:
Improvesecurity protection effectivenessVSAvoidimplementation time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The runtime agent performs preliminary actions by intercepting web page generation processes before they reach production environments. It proactively injects context-sensitive validation code and security policies (such as Content Security Policy headers) into web pages during the development or staging phase, so that security measures are already in place before deployment. This eliminates the need for time-consuming post-deployment security implementations.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The runtime agent acts as an intermediary between the web application and the browser. It sits in the execution path, intercepting web page generation processes and modifying output before it reaches the user's browser. This intermediary layer enables security protection without requiring modifications to the core application codebase, significantly reducing implementation time while maintaining effectiveness.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If traditional protection methods are used, then some security can be provided, but they do not effectively safeguard against complex enterprise web application vulnerabilities

Engineering Contradiction:
Improvesecurity protection effectivenessVSAvoidprotection against complex vulnerabilities
Core Design Contradiction:
ReliabilityVSAdaptability or versatility

Solution Approach 1:

The runtime agent applies local quality by implementing context-sensitive validation that adapts to different output contexts (HTML attributes, JavaScript strings, URLs, etc.). Each context receives tailored validation rules appropriate to its specific requirements, enabling effective protection against complex vulnerabilities in different areas of the web application without applying a one-size-fits-all approach.

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

The runtime agent provides dynamic protection by continuously monitoring and adapting security measures based on the execution context. It dynamically determines which validation rules apply to each output based on identifiers in the source code, and can adjust security policies in real-time without requiring application recompilation or updates, thereby effectively safeguarding against evolving vulnerability patterns.

Inventive Principle:
Principle #15Dynamics

3Reliability

If code is modified to protect output, then security is enhanced, but the entire application would need to be modified and recompiled

Engineering Contradiction:
Improvesecurity protectionVSAvoidcode modification complexity
Core Design Contradiction:
ReliabilityVSEase of manufacture

Solution Approach 1:

The runtime agent extracts the security protection functionality from the main application codebase and implements it as a separate, independent runtime layer. This allows security measures to be added without modifying the core application code, eliminating the need for recompilation while still providing comprehensive protection through intercepted and modified web page output.

Inventive Principle:
Principle #2Taking out (Extraction)

Data Source

PatentUS10678910B2Modifying web page code to include code to protect output
Publication Date: 2020.06.09 MICRO FOCUS LLC
  • US10678910B2 patent drawing
  • US10678910B2 patent drawing
  • US10678910B2 patent drawing

AI summary

Examples disclosed herein relate to modifying a web page. In one example, in response to beginning execution of a process initiating generation of a web page of a web application at a server, a runtime agent is executed. In this example, the runtime agent modifies code of the web page to inject code to protect output of the web page. In the example, the process can be executed using the modified code to generate a modified web page.