OWASP Vulnerabilities · interview question
Why is it risky to use string concatenation to build SQL queries?
Multiple choiceEasychapter-17-curatedpremiumowasp-vulnerabilitiessql-injection
Answer and explanation
Correct answer
A. It allows SQL Injection attacks
Why
Using string concatenation for building SQL queries is risky because it opens the door to SQL Injection attacks, where attackers can manipulate the query by injecting malicious input.
Test yourself on OWASP Vulnerabilities
A free test with instant, explained results. No account needed.
More OWASP Vulnerabilities questions
- In a Spring Security filter chain, what is the purpose of filters?
- What role does the 'Signature' play in a JWT?
- Why does the 'signature' in a JWT matter in this design?
- How would you explain a key strategy Java web applications use to protect against Stored XSS attacks in an interview?
- Which of the following best describes a CSRF attack?
- How does Spring Security validate that a CSRF token is legitimate upon receiving a form submission?