Vulnerability Management

A scan finds SQL injection in an in-house web application whose developers can change the code. Which action fixes the root cause?

Show the answer

Correct answerA. Switch queries to parameterized statements

AWhy this is right: Parameterized queries keep user input from being executed as SQL, fixing the flaw in the code the team controls.

BWhy not this: A WAF filters requests but leaves the vulnerable code unchanged, so it is a compensating control, not a root-cause fix.

CWhy not this: There is no vendor patch for custom code; this fits third-party software, not an in-house application.

DWhy not this: An exception accepts the risk and leaves the flaw in place; it does not remediate it.

Parameterized statements separate code from data in the application itself, which removes the injection flaw. A WAF rule only filters traffic in front of the flaw, so it is a compensating control and leaves the vulnerable code in place.