exam questions

Exam CS0-002 All Questions

View all questions & answers for the CS0-002 exam

Exam CS0-002 topic 1 question 263 discussion

Actual exam question from CompTIA's CS0-002
Question #: 263
Topic #: 1
[All CS0-002 Questions]

A security analyst discovers the company’s website is vulnerable to cross-site scripting. Which of the following solutions will BEST remedy the vulnerability?

  • A. Prepared statements
  • B. Server-side input validation
  • C. Client-side input encoding
  • D. Disabled JavaScript filtering
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
CatoFong
Highly Voted 2 years, 2 months ago
Selected Answer: B
Server-side input validation
upvoted 5 times
...
Tricee
Most Recent 1 year, 12 months ago
Selected Answer: C
The answer is C. Client-Side Input encoding is done using JavaScript and provides an additional layer of security to prevent XSS on the client side before reaching the server. Whereas, Server-Side Input Validation deals with SQL injections that are used to manipulate server-side databases.
upvoted 1 times
...
Stiobhan
2 years, 1 month ago
Selected Answer: B
Defo B and here is why - https://www.packetlabs.net/posts/input-validation/#:~:text=Server%2Dside%20input%20validation%20will,vulnerable%20to%20Cross%2DSite%20Scripting.
upvoted 1 times
...
encxorblood
2 years, 2 months ago
Selected Answer: B
The BEST solution to remedy the cross-site scripting vulnerability on the company's website is option B, server-side input validation. Server-side input validation involves checking user input on the server side to ensure that it meets expected criteria before it is processed or stored. This can prevent malicious code from being injected into the website and reduce the risk of cross-site scripting attacks.
upvoted 4 times
2Fish
2 years, 1 month ago
Agreed. Server side input validation is best here, to validate and sanitize input data.
upvoted 2 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago