0

We are facing some record duplication issue which has been claimed as CSRF attack.

The Scenario is that an admin user is logged in to the application and adding a record, the data is getting saved in database. The corresponding POST request is getting captured and replayed which ends up adding a duplicate records in to the database. This vulnerability allows the attacker to add 'n' number of duplicate records in to database on replay.

Can this be called a CSRF attack?

Gumbo
  • 643,351
  • 109
  • 780
  • 844

1 Answers1

2

No, not really.

If the POST is being captured, you are looking at a replay attack, wherein a legitimate request is replayed again.

You can defeat replay attacks by adding a nonce (random value) to the form, and requiring that the random value be present when the POST is done, then invalidating the nonce. This is the same technique used to foil CSRF attacks.

However, if an attacker can read your POST data, you may have bigger problems. For example, they would be capable of capturing the admin authentication step, which can reveal passwords or other sensitive information.


It's also possible that you aren't under attack, and that the duplicates are caused by the use of either the Back button or page reloads. In any case, it would be safest to use some kind of defense to prevent repeated transactions.

nneonneo
  • 171,345
  • 36
  • 312
  • 383