Title: Security Issues&#8230;?
Last modified: December 17, 2017

---

# Security Issues…?

 *  Resolved [eatandbemerry](https://wordpress.org/support/users/eatandbemerry/)
 * (@eatandbemerry)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/security-issues-33/)
 * Hi. I just read on a forum that SVGs have issues — security issues. That an attacker
   could exploit.
 * What I’m wondering: if that attacker has to be the one to *upload* the file with
   malicious code to a server………or if security risks associated with SVGs are possible
   when a site is being attacked from the outside (and not from an uploading user
   of the site itself).
 * And when I say “from the outside” I mean that a hacker could exploit a weakness
   inside an SVG that is displayed on a WordPress site.
 * If it’s the latter…then…do I need to worry about this plugin being insecure?
 * Is this plugin a possible security risk with SVGs?
 * There are other plugins I’m stumbling across that claim to make your site safer
   with their use, but it appears they are concerned with limiting uploads by users
   that could be malicious.
 * That’s not my concern.
 * I’m concerned only with my own site having SVGs on it that could be used as an
   entry by a hacker stumbling across my site from the outside…and trying to hack
   it that way. I am *not* concerned with internal users abusing/neglecting security
   protocols. I’m just concerned with hackers trying to get at my site from the 
   outside.
 * So….is this plugin somehow, in any way whatsoever…allowing for inherently (if
   they are all inherently) insecure SVGs to be displayed on sites without any security
   measures? If all SVGs are security risks — naturally, without being intentionally
   corrupted by people who put malicious code in them before uploading them — then
   what can be done to make sure SVGs are not a security risk to display on any 
   site?
 * And if that is the case……..what does your plugin do to offset any security risks?
 * Please note: if SVGs are not inherent security risks — again, just by themselves,
   without being corrupted by an uploader — please let me know that too.
 * Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Benbodhi](https://wordpress.org/support/users/benbodhi/)
 * (@benbodhi)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/security-issues-33/#post-9790598)
 * The security issues could lie within the SVG itself. SVG is actually XML code.
   So a standard image SVG that you have created will not pose any risks whatsoever.
   The issue is malicious code being added to the SVG file so that it looks like
   an image but has “behind the scenes” XML code built into it.
 * There is no issue with outside attackers provided you trust the SVG file.
 * So it is perfectly safe to use a pre-screened/vetted SVG file.
 * I would dare say there is some SVG files floating around the internet with malicious
   code in them, so blindly downloading them and then uploading to your site could
   be a disaster. It if you open it in a code editor and look at the code, you can
   see what it contains. You could also run them through a sanitization library 
   to help avoid nasty code.
 * Making your own SVG files is the best and safest bet.
 * My plugin has an option to restrict upload to admin role only, which in most 
   cases is ok as you trust them not to place malicious code in any way. It doesn’t
   avoid lack of security checks on the SVG before uploading though, if an admin
   is lazy or uninformed, they may upload a compromised file.
 * In saying that, I personally have not come across any malicious SVG files and
   I have downloaded a lot over the years. But to not check would be risky nonetheless.
 * I have been considering writing in some sanitization features. might be a future
   feature.
 * I hope this answers your questions.
 * Learn more here:
    [https://bjornjohansen.no/svg-in-wordpress](https://bjornjohansen.no/svg-in-wordpress)
    -  This reply was modified 8 years, 5 months ago by [Benbodhi](https://wordpress.org/support/users/benbodhi/).
    -  This reply was modified 8 years, 5 months ago by [Benbodhi](https://wordpress.org/support/users/benbodhi/).
 *  Thread Starter [eatandbemerry](https://wordpress.org/support/users/eatandbemerry/)
 * (@eatandbemerry)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/security-issues-33/#post-9791212)
 * Thank you so much!!! I feel much better now. See, I thought that was it, but 
   I needed to hear that was the case from someone who knows this stuff. Your plugin
   is a lifesaver…would hate to not be able to use it!!
 * Have a great day. 😀
 *  Plugin Author [Benbodhi](https://wordpress.org/support/users/benbodhi/)
 * (@benbodhi)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/security-issues-33/#post-9791241)
 * My pleasure! Glad you like the plugin 😃

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Security Issues…?’ is closed to new replies.

 * ![](https://ps.w.org/svg-support/assets/icon.svg?rev=3554681)
 * [SVG Support](https://wordpress.org/plugins/svg-support/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/svg-support/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/svg-support/)
 * [Active Topics](https://wordpress.org/support/plugin/svg-support/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/svg-support/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/svg-support/reviews/)

## Tags

 * [code](https://wordpress.org/support/topic-tag/code/)
 * [Hackers](https://wordpress.org/support/topic-tag/hackers/)
 * [hacking](https://wordpress.org/support/topic-tag/hacking/)
 * [malicious](https://wordpress.org/support/topic-tag/malicious/)
 * [malicious file](https://wordpress.org/support/topic-tag/malicious-file/)
 * [svg](https://wordpress.org/support/topic-tag/svg/)
 * [SVGs](https://wordpress.org/support/topic-tag/svgs/)
 * [upload](https://wordpress.org/support/topic-tag/upload/)

 * 3 replies
 * 2 participants
 * Last reply from: [Benbodhi](https://wordpress.org/support/users/benbodhi/)
 * Last activity: [8 years, 5 months ago](https://wordpress.org/support/topic/security-issues-33/#post-9791241)
 * Status: resolved