CSSLP Secure Software Implementation Practice Question
You are reviewing a Node.js web application. Which secure coding practice directly mitigates Cross-Site Scripting (XSS) when rendering user-supplied data in an EJS template?
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Using <%= %> tags for user data
Escaping output is the primary defense against XSS; EJS uses the <%= %> tag for escaped output, which handles special characters.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Using <%- %> tags for all variables
Why it's wrong here
The <%- tag renders unescaped HTML, which is a major XSS risk.
- ✗
Disabling the template engine
Why it's wrong here
Disabling the engine makes the application non-functional.
- ✓
Using <%= %> tags for user data
Why this is correct
The <%= tag performs HTML entity escaping on the rendered content.
- ✗
Implementing a global regex filter
Why it's wrong here
Regex filtering for XSS is prone to bypasses and is not a best practice.
About these practice questions
One of 198 original CSSLP practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed August 2026 · checked against the official (ISC)² exam blueprint
This CSSLP practice question is part of Courseiva's free (ISC)² certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CSSLP exam.