Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In this case the trust boundary exists between the untrusted data and the CGI script, whereas the trusted domain is the web browser; or rather the HTML parsing and rendering engine within the web browser.

Noncompliant Code Example (Taint Mode)

Using Taint mode will not detect or prevent the XSS. Taint mode does not prevent tainted data from being printed to standard output.

Compliant Solution (XSS)

To prevent injection of HTML, Javascript, or malicious images, any untrusted input must be sanitized. This compliant solution sanitizes the input using the escapeHTML() subroutine from the CGI library.

...

Tool

Diagnostic

Notes

Taint Mode

Insecure dependency in parameter \d* of DBI::db=.* method call

Catches SQL injection.

Requires TaintIn attribute

...

Related Guidelines

...