#3619·juice-shop

[] Challenge counter decreases unexpectedly after re-login, resolves after re-triggering the payload

Author: Nikolic21Created Sep 14, 2026Updated Sep 14, 2026
Labelsbug

Description

After solving several challenges (including "Error Handling" via a SQL error triggered through the product search endpoint), the "Challenges Solved" counter on the Score Board unexpectedly decreased from 17 to 16, even though I had not reset or undone any solved challenge.

Steps to Reproduce

  1. Log in as admin and solve multiple challenges, including "Error Handling" (triggered via a malformed SQL query through /rest/products/search).
  2. Confirm the Score Board shows the challenge as solved (green) and the counter reflects the correct total (17 in my case).
  3. Log out and log back in (or the session/token changes in some way).
  4. Check the Score Board again — the counter drops by 1 (16 instead of 17), and "Error Handling" may appear unsolved despite previously showing as solved.
  5. Re-open a browser tab that still had the original SQL injection payload active/triggered (i.e., re-trigger the same request that originally solved "Error Handling").
  6. The counter returns to the correct value (17) and the challenge is marked solved again.

Expected Behavior

Once a challenge is marked as solved, it should remain solved and the counter should not decrease unless the challenge is explicitly reset (e.g., via API or admin action).

Actual Behavior

The solved-challenge count decreases after a login/session change, and only gets restored by re-triggering the original exploit for the affected challenge.

Environment

  • Juice Shop version: 20.2.0
  • Deployed via: docker run -d -p 3000:3000 bkimminich/juice-shop
  • Browser: Firefox (Kali Linux)
  • Reproduced twice

Additional Notes

This looks like it might be related to how challenge-solved status is tracked/cached server-side versus session state, possibly a race condition or stale cache tied to the auth token rather than a persistent database flag. Happy to provide more details, screenshots, or network logs if useful.