Question 370
At fictional Dunlin Civic Platform, a software-security team is conducting a quarterly architecture change assessment while preserving independent evidence of control effectiveness. The case observation is: A download endpoint combines a user-provided relative path with a server directory without canonical path containment checks. The team must select a defensible control or assessment. Which repeatable engineering safeguard would most directly reduce recurrence?
Explanation
Writer-proposed answer: B (UNVERIFIED)
Preliminary individual option explanations — NOT expert validated
Correct Answer
Filesystem paths represent powerful authority and must not be derived directly from untrusted navigation fragments. Traversal variants cannot access files outside the approved storage root, while authorized document retrieval still succeeds.
Incorrect Answers
This response concerns template injection isolation. Here, a download endpoint combines a user-provided relative path with a server directory without canonical path containment checks. The confirming evidence is: Traversal variants cannot access files outside the approved storage root, while authorized document retrieval still succeeds.
Focusing on parameterized database queries would leave this problem unresolved: A download endpoint combines a user-provided relative path with a server directory without canonical path containment checks.
Output encoding for html concerns another aspect of the problem. Filesystem paths represent powerful authority and must not be derived directly from untrusted navigation fragments.