A support portal lets users upload files and name them manually. During review, a tester submits a filename containing path traversal sequences, and logs later show the application trying to access files outside the intended upload folder. Which two changes best address the flaw? Select two.
Answer choices
Why each option matters
Good practice is not just finding the correct option. The wrong answers often show the exact trap the exam wants you to fall into.
Best answer
Validate and canonicalize the filename on the server, then allow only approved name patterns.
Server-side canonicalization and allowlisting stop attackers from escaping the expected directory structure. Client-side checks are not enough because attackers can modify requests directly. This is the most direct way to prevent traversal sequences from being interpreted as filesystem paths.
Best answer
Store uploads outside the web root and deny execution permissions on the upload directory.
Keeping uploads outside the web-accessible path reduces the risk that a file can be executed or directly fetched. Denying execution helps prevent an attacker from turning an upload feature into code execution. This is a strong defense-in-depth control for untrusted files.
Distractor review
Increase the maximum upload size so the application can handle more files.
Larger file limits do not stop path traversal or malicious filename manipulation. That change addresses capacity, not input validation. In some cases it could even make abuse worse by allowing larger malicious payloads to be uploaded.
Distractor review
Add browser-side JavaScript validation to reject suspicious filenames.
Client-side validation improves user experience, but it is easily bypassed by modifying the request. Attackers do not rely on the browser interface, so server-side validation is still required. This control helps usability, not real security enforcement.
Distractor review
Hide detailed error messages from end users only.
Reducing error detail can limit information leakage, but it does not stop traversal attempts. The application would still be vulnerable if it accepts and processes unsafe paths. Error handling is useful, but it is not the main fix for the flaw shown.
Common exam trap
Common exam trap: OSPF can fail even when IP connectivity looks correct
OSPF neighbour formation depends on matching areas, timers, network type, authentication and passive-interface behaviour. Do not choose an answer only because the devices can ping.
Technical deep dive
How to think about this question
OSPF questions usually test the details that control adjacency and route selection. Read the neighbour state, area, router ID and interface configuration before deciding what is wrong.
KKey Concepts to Remember
- OSPF neighbours must agree on key parameters.
- Router ID selection can affect neighbour relationships and LSDB output.
- OSPF cost influences the preferred path.
- A route can appear in OSPF information but not become the installed route.
TExam Day Tips
- Check area mismatch first when OSPF adjacency fails.
- Review passive interfaces when a network is advertised but no neighbour forms.
- Use show ip ospf neighbor and show ip route clues carefully.
Related practice questions
Related SY0-701 practice-question pages
Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.
Security+ social engineering questions
Practise SY0-701 questions linked to Security+ social engineering questions.
Security+ cryptography practice questions
Practise SY0-701 questions linked to Security+ cryptography.
Security+ IAM questions
Practise SY0-701 questions linked to Security+ IAM questions.
Security+ risk management questions
Practise SY0-701 questions linked to Security+ risk management questions.
Security+ incident response questions
Practise SY0-701 questions linked to Security+ incident response questions.
Security+ malware questions
Practise SY0-701 questions linked to Security+ malware questions.
Security+ vulnerability management questions
Practise SY0-701 questions linked to Security+ vulnerability management questions.
Security+ security operations questions
Practise SY0-701 questions linked to Security+ security operations questions.
Security+ zero trust questions
Practise SY0-701 questions linked to Security+ zero trust questions.
Security+ authentication factors questions
Practise SY0-701 questions linked to Security+ authentication factors questions.
More questions from this exam
Keep practising from the same exam bank, or move into a focused topic page if this question exposed a weak area.
Question 1
A laptop is suspected of being used in a malware incident. It is still powered on and connected to Wi-Fi. What should the responder do before shutting it down?
Question 2
An employee reports a ransomware note on a file server. The server is still powered on, shares are still being accessed, and management wants service restored as quickly as possible. What should the incident response team do first?
Question 3
An employee reports a ransomware note on a finance laptop. The laptop is still powered on, connected to Wi-Fi, and the user says they were just working in a spreadsheet. Management wants the fastest safe response that also preserves evidence. What should the responder do first?
Question 4
You are handed a company laptop suspected in an insider theft case. Legal says the evidence may be needed in court. Which action best preserves admissibility?
Question 5
A developer wants to reduce the risk of SQL injection in a new customer search form. Which two changes are the best mitigations? Select two.
Question 6
A branch office uses a flat LAN, and a compromise on one user workstation could spread quickly to finance systems. Management wants finance workstations isolated from general users, but finance staff still need access to a central finance application and network printer. What is the best design change?
FAQ
Questions learners often ask
What does this SY0-701 question test?
OSPF neighbours must agree on key parameters.
What is the correct answer to this question?
The correct answer is: Validate and canonicalize the filename on the server, then allow only approved name patterns. — The right fixes are server-side filename validation and keeping uploaded files outside the executable web directory. Canonicalization and allowlisting prevent traversal strings from being treated as real paths, while a non-web-accessible upload area reduces the chance that an attacker can execute or directly retrieve a malicious file. Together, these controls address both the unsafe input and the risky file placement. Why others are wrong: Bigger upload limits, browser-side checks, and hiding error messages do not remove the core weakness. Those controls may improve usability or reduce noise, but they do not stop an attacker from supplying dangerous path values. The attack succeeds because the server trusts unvalidated input and stores files in a risky location.
What should I do if I get this SY0-701 question wrong?
Then try more questions from the same exam bank and focus on understanding why the wrong options are tempting.
Discussion
Sign in to join the discussion.