Threats, Vulnerabilities, and Mitigations
The same signed payment request, unmodified, reaches the server twice, minutes apart, and both are processed. Which control best prevents the second from being accepted?
Show the answer
Correct answerA. Single-use nonces
AWhy this is right: A nonce makes each message unique, so the server rejects any message it has already seen.
BWhy not this: Canonicalization blocks directory traversal in file paths and has no effect on repeated messages.
CWhy not this: Parameterized queries separate code from data to stop injection; they do not detect repeated requests.
DWhy not this: Stack canaries detect stack buffer overflows, which are not involved when a valid request is resent.
The signature is valid both times, so the fix is making each message usable once. A single-use nonce, often with a timestamp, lets the server reject a repeated request. Parameterized queries only stop SQL injection.