ISC2 Certified Secure Software Lifecycle Professional (CSSLP) Practice Question
During a peer review of a new RESTful service, you notice that input validation occurs only in browser-side JavaScript, which blacklists the characters < and >. According to secure coding best practices, which single modification would most directly strengthen this control against injection attacks?
Surround any incoming data with HTML entity encoding before storing it in the database.
Move the existing blacklist logic into a shared client-side library used by all pages.
Keep the blacklist but also use prepared statements for all database operations.
Validate every parameter on the server using an allow-list that enforces expected type, length, and format.
Client-side filtering is easily bypassed because an attacker can send requests directly to the server. Moreover, blocking only a few dangerous characters is fragile; malicious input can avoid or encode around the blacklist. Implementing allow-list validation on the server ensures every request is checked after transport, confirming that each parameter matches an expected type, length, and format. This addresses the specific weakness described. Output encoding, shared client-side libraries, or prepared statements help in other areas but do not directly fix the identified gap as effectively as server-side allow-list validation.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is input validation?
Open an interactive chat with Bash
Why is client-side filtering inadequate for security?
Open an interactive chat with Bash
What is an allow-list in the context of input validation?
Open an interactive chat with Bash
ISC2 Certified Secure Software Lifecycle Professional (CSSLP)
Secure Software Implementation
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .