What can I do about it?
If your site uses one of these extensions then you would be wise to check whether it contains the spam-generating code. Not all versions of the extensions do: the versions submitted to the Joomla extensions directory were clean, and it is likely that these were originally legitimate extensions. There are also other versions in circulation which seem to have had some of the bad code removed.
If you do have a problem, simply unpublishing or uninstalling the extension will solve the problem for you. If you would prefer not to do this then finding and deleting the bad code will work equally well. Remember that it is the PHP code that you need to remove. Doing a simple text search in the extension files using your favourite html or text editor for 'file_get_contents' should pick this up very quickly. (Note that the PHP file_get_contents function can have legitimate uses, such as fetching an RSS feed, so finding it in an extension does not necessarily mean you have a problem).