Base64 on My WordPress Theme

If you use WordPress and found a base64 string on your theme you may be right to be alarmed but only if it’s found on .php files as this string might be a code to manipulate data on your site. However, a base64 string found on the style.css or any stylesheet file is usually just an embedded image using the URI format. This is normally done to lessen http requests and make the theme load faster.

The Asteroid Theme for WordPress actually has a couple of these images embedded on the style.css. So don’t be alarmed as these are only images.

Here’s a sample that you may see on the Asteroid Theme:

background-image: url(“data:image/png;base64,iVBORw0KGgoAAAAN…

Copy the full string below and use this site to decode the string. Then rename the resulting file with a .png to see the complete image.


You should see that the equivalent of the string above is nothing more than this image below.

Search Icon

Base64 on Stylesheet = Harmless, No worries. Normally just embedded images.
Base64 on PHP Files = Possibly malicious. Could be hidden backlinks.

Like I said on the the Asteroid Theme page, only download themes on reputable and trusted sources like the theme repository.

Share This Post


Add a Comment
  1. Hey Ron, my Antivirus plugin detected a suspicious line in the theme-options.php starting with “BEGIN PKCS7”, is that a false positive or should I take countermeasures?

    1. Yes that’s a false positive. That line is for the paypal donate button on the theme’s option page. What plugin is detecting it?

Leave a Reply to Ron Cancel reply

Please write your comments in english. I delete anything that even remotely resembles spam.

Note: When posting code, enclose it in pre and code tags.
e.g. Add code here