How to block the upload of specific / malignant files?

Hello,

Is there a script or Wordpress / Buddypress plugin that blocks the upload of specific files?

For example: I want to block that users upload files that are not JPG, GIF or PNG => .exe, doc, mpg, tiff, etc, etc.

Thank You!