What Are Two Targets in Cross-Site Scripting Attacks?

Answer Correct answer: B, C — in XSS the attacker's two targets are the user's session cookie and the application's input, which enable session theft and script injection.

What are two targets in cross-site scripting attacks? (Choose two.)

  1. footer
  2. cookie Correct Answer
  3. input Correct Answer
  4. header
  5. image

Community Votes

BC
75%
CE
25%

75% of anonymous learners picked answer BC. Votes are pick records left by other test-takers — they are not the verified answer.

Community Insight

This item tests whether you can separate an XSS target (the asset of value — the session cookie or application input) from an XSS vector (image, header, or footer markup), the exact trap that pulls candidates toward option E.

Cross-site scripting attacks in Cisco 350-701 aim at two specific targets: the victim's browser cookie and the application's input. This page confirms options B and C as the correct pair and explains why image, header, and footer are delivery paths rather than targets.

The most common wrong pick is E (image), because img tags and image-upload fields are popular XSS delivery mechanisms — learners confuse the vector with the thing the injected script actually reaches.

Community Discussion (5 comments)

Surfside92 👍 1 Selected: BC
https://www.cloudflare.com/learning/security/threats/cross-site-scripting/
kloug 👍 1
Answer b,c
luismg 👍 1 Selected: CE
C and E it can be caused due to poor input validation or through non image validation
Premium_Pils 👍 2 Selected: BC
As well as I understand, the targets are the cookie or a user input. This is what a hacker aims to get. The methods (to get the cookie or input) can be modifying the image type input, or modifying the header of an http request.
d357f61 👍 1
I think it should be C and E

Comments & Corrections

No comments yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Submitted for moderation before publishing. Keep it helpful and respectful.

Expert Analysis

Why the Answer Is Correct

In Cisco's SCOR 350-701 treatment of cross-site scripting, the attacker's objective is stated in terms of what gets compromised inside the victim's browser session, and the two assets repeatedly named are the user's cookie and the application's input. The cookie is the prize because it holds the session identifier; a script such as document.cookie read-out lets the attacker ride an authenticated session without ever cracking a password. Input is the second target because form fields, search boxes, comment forms, and URL parameters are the untrusted data that the application reflects or stores, and controlling that input is what lets the injected script execute in other users' browsers. Both options fit the question's wording "targets" — the things the attacker is trying to reach and abuse — and no other option describes an asset a script can read or manipulate. That is why B and C form the expected pair.

Why the Other Options Are Wrong

A footer (A) is static page markup with no session value and no trust boundary; stealing or altering a footer gains an attacker nothing, which is why it never appears in the XSS target list. A header (D) can occasionally carry a reflected payload, for example in a User-Agent or Referer field echoed back into the response, but in that scenario the header is a transport path for the payload, not the asset the script is trying to obtain. An image (E) is likewise a vector: a malicious img tag, an onerror handler, or a poor image-upload validation routine can deliver or hide a script, but the image itself is not what the attacker wants. This vector-versus-target distinction is precisely what the distractors here are built to test.

Community Comment Notes

Premium_Pils captured the intended logic plainly, writing that "the targets are the cookie or a user input" and adding that the methods of getting them — modifying an image-type input or an HTTP request header — are separate from the targets themselves. That is the strongest signal in the thread, and Surfside92 reinforced it by pointing to the Cloudflare learning article on cross-site scripting rather than to any image- or header-based argument. The CE voters, including luismg and d357f61, argued that XSS "can be caused due to poor input validation or through non image validation," which is a fair statement about injection vectors but answers a different question than "what are the targets." kloug simply confirmed "Answer b,c." The vote split (BC 75, CE 25) reflects exactly that confusion between vector and target, not a genuine dispute over the Cisco answer.

Official Reference

Exam Strategy

When a Cisco question asks for "targets," list what the attacker walks away with — session cookies, input data, credentials — and discard anything that merely describes how the payload arrives. Options like image, header, and footer are classic vector distractors that reappear in SCOR XSS items, so read the verb in the stem before matching keywords.

Frequently Asked Questions

Why is an image not counted as a target in cross-site scripting?

An image is a delivery vector — a malicious img tag or a poorly validated image upload — but the target is what the injected script reaches: the victim's cookie or the application's input.

Why is the HTTP header not one of the two XSS targets here?

A header can carry a reflected payload in edge cases, but Cisco's two canonical targets are the user cookie and application input; a header is a transport path, not the stolen asset.

Related Analysis

← Back to 350-701 Study Guide