×

Automatic context-sensitive sanitization

  • US 8,898,776 B2
  • Filed: 12/28/2010
  • Issued: 11/25/2014
  • Est. Priority Date: 12/28/2010
  • Status: Active Grant
First Claim
Patent Images

1. A computer-implemented method for sanitizing data in a web application, the method comprising:

  • providing at least one execution trace of the web application, the execution trace including a path through the web application taken by an untrusted input that leads to rendering the untrusted input in an output stream, the execution trace associated with a correct sanitizer sequence that sanitizes the untrusted input;

    tracking a runtime execution of the web application during execution of the web application;

    discovering, during the runtime execution of the web application, a mismatch of a first sanitizer sequence with a browser parsing context of the untrusted input, the browser parsing context corresponding to a portion of the output stream that contains the untrusted input;

    determining that the correct sanitizer sequence is to be applied to the untrusted input during the runtime execution of the web application, the correct sanitizer sequence based on the browser parsing context; and

    applying the correct sanitizer sequence to the untrusted input when the runtime execution follows the execution trace.

View all claims
  • 2 Assignments
Timeline View
Assignment View
    ×
    ×