nerdexam
CompTIA

CAS-005 · Question #487

A security analyst collects the logs from the web server that is associated with a security incident. The analyst finds the following entry in the logs: SELECT user FROM Customers WHERE userID =…

The correct answer is B. Query parameterization. Query parameterization ensures that user input is treated strictly as data, not as executable SQL code. This prevents SQL injection attacks like the one shown in the log entry, thereby eliminating the vulnerability that led to the incident.

Submitted by priya_blr· Mar 6, 2026Security Engineering

Question

A security analyst collects the logs from the web server that is associated with a security incident. The analyst finds the following entry in the logs:

SELECT user FROM Customers WHERE userID = "SRequest(userID)" Which of the following will prevent this incident from reoccurring?

Options

  • AURL encoding
  • BQuery parameterization
  • CData sanitization
  • DSQL output encoding

How the community answered

(28 responses)
  • A
    4% (1)
  • B
    82% (23)
  • C
    11% (3)
  • D
    4% (1)

Explanation

Query parameterization ensures that user input is treated strictly as data, not as executable SQL code. This prevents SQL injection attacks like the one shown in the log entry, thereby eliminating the vulnerability that led to the incident.

Community Discussion

No community discussion yet for this question.

Full CAS-005 Practice