A company’s Web development team has become aware of a certain type of security
vulnerability in their Web software. To mitigate the possibility of this vulnerability being
exploited, the team wants to modify the software requirements to disallow users from
entering HTML as input into their Web application.
What kind of Web application vulnerability likely exists in their software?
Show answerHide answer
Correct answer: A
Cross-site scripting vulnerability
Explanation
Explanation: There is no single, standardized classification of cross-site scripting flaws,
but most experts distinguish between at least two primary flavors of XSS flaws: nonpersistent
and persistent. In this issue, we consider the non-persistent cross-site scripting
vulnerability.
The non-persistent (or reflected) cross-site scripting vulnerability is by far the most basic
type of web vulnerability. These holes show up when the data provided by a web client,
most commonly in HTTP query parameters (e.g. HTML form submission), is used
immediately by server-side scripts to parse and display a page of results for and to that
user, without properly sanitizing the content.
Because HTML documents have a flat, serial structure that mixes control statements,
formatting, and the actual content, any non-validated user-supplied data included in the
resulting page without proper HTML encoding, may lead to markup injection. A classic
example of a potential vector is a site search engine: if one searches for a string, the
search string will typically be redisplayed verbatim on the result page to indicate what was
searched for. If this response does not properly escape or reject HTML control characters,
a cross-site scripting flaw will ensue.