a non existing subdomain is added to image urls I have some images in my home page and from time to time the URL of these images get changed somehow and a subdomain is appended to it automatically. 

For example: 
www.mysite.com/sites/default/files/image.png becomes abc.mysite.com/sites/default/files/image.png. 

Here are some other facts that might have something to do with this issue:


The site supports two languages (english and arabic which is the default language) and this issue only appears in English Site.
We had a very old drupal 6 site before that was using Subdomains extensively (using the subdomain module) and I noticed that any subdomain appended to the image url is usually a randomly selected one of these old subdomains. So these domains used to exist. But the weirdest thing is that we actually moved to a completely new server a year ago and we created this new site from scratch using Drupal 7. We have not imported any content or modules from the old site and we don't use subdomains any longer. The old server is no longer active. Also we have removed all subdomains from DNS in cPanel.
The issue goes away sometimes after clearing the cache.


What could be causing this weird issue?
This is rather big guess, but I think you have everything configured so that your virtual host is responding to all subdomains for your primary domain.  In Apache terms this would be something like

ServerName mysite.com
ServerAlais *.mysite.com


And, you have old links that are getting crawled from the old subdomains, and the net result are some bad URLs are being cached.

My suggestion would be to add something like this to your .htaccess

RewriteCond %{HTTP_HOST} !www\.mysite\.com [NC]
RewriteRule ^(.*)$ http://www.mysite.com/$1 [R=301,L]


Make sure this goes right after the RewriteEngine on in the stock Drupal version.  I don't think the two example rules in the file will work, as they assume just adding/removing the www and don't take subdomains into account (though I am not 100% sure about this; I haven't looked at these closely in a while).  Make sure you clear Drupal cache, too.

Also make sure you back up the file after you change it, so you have the additions the next time you upgrade core.