Question 220
A website allows a cross-site form to change an authenticated user's email without an anti-CSRF check. Which result shows the selected action was suitable and effective?
Explanation
Correct Answer
A cross-origin synthetic update fails without the required valid token. This answer directly addresses the described constraint. An authenticated browser can carry session cookies for unintended state-changing requests. Successful validation requires: A cross-origin synthetic update fails without the required valid token.
Incorrect Answers
That approach concerns a different situation: an OAuth API lets a read-only token change a different user's account settings. A valid token is insufficient when it lacks the required action or object access. The required result is that a cross-origin synthetic update fails without the required valid token. The relevant evidence is: A cross-origin synthetic update fails without the required valid token.
That relates to a different issue: An app downloads files based on a path parameter that accepts parent-directory components. Path normalization and authorization must prevent escaping a file root. That is not a direct remedy for the requested outcome: A cross-origin synthetic update fails without the required valid token. The relevant evidence is: A cross-origin synthetic update fails without the required valid token.
It would address a login system sends session cookies without Secure on an HTTPS-only site. The relevant reason in that case is: Cookie attributes reduce exposure to transport and script risks. Here the required success condition is a cross-origin synthetic update fails without the required valid token. The relevant evidence is: A cross-origin synthetic update fails without the required valid token.