Skip to main content

SY0-801 practice question · Threats, Vulnerabilities, and Attacks

A payment API calls an authorization service before every refund. If that service times out, the error handler writes a…

A payment API calls an authorization service before every refund. If that service times out, the error handler writes a log entry and lets the refund continue. Which vulnerability does this BEST describe?

  • AUnsafe exception handling that fails open
  • BA time-of-check to time-of-use race condition
  • CA secret hardcoded in the application source
  • DMissing input validation enabling injection
Show the answer and explanation

Correct answer: A) Unsafe exception handling that fails open

Unsafe exception handling includes failing open; security checks that error out should deny the action and avoid leaking details.

Why each option is right or wrong

  • A) Correct. When the check errors out, the code allows the action instead of denying it. Attackers can force timeouts to get unauthorized refunds. Errors in security checks should fail closed.
  • B) Incorrect. A race condition exploits a gap between checking and using a resource. Here the check never completes, and the code proceeds anyway.
  • C) Incorrect. Nothing in the scenario involves an embedded credential or key.
  • D) Incorrect. No untrusted input is being interpreted as code. The flaw is what the code does when an error occurs.
Exam domain
Threats, Vulnerabilities, and Attacks · 24% of SY0-801
Question type
Multiple choice (one answer)

Practise the full SY0-801 exam

This question is one of a small free sample from the CertRidge SY0-801 bank. Full practice exams match the real exam's length, time limit and domain weights, explain every option, and Review Mode re-drills the questions you miss.

Original question written from the official exam guide. Not affiliated with CompTIA; never copied from the real exam.

Worth reading: Security+ passing score (750/900), 750 on a 100–900 scale for SY0-701, SY0-801 and the retired SY0-601, and why it isn't 83%.