Take the 2-minute tour ×
Information Security Stack Exchange is a question and answer site for Information security professionals. It's 100% free, no registration required.

Situation:

  • Consider the site: example.com, hosted at web server A.
  • A WordPress blog is to be installed on a different web server, B.
  • In order to route a WordPress installation to a subdirectory on the main site, e.g. example.com/blog/, most suggestions on StackOverflow recommend to use the Apache mod_proxy module, to set up a reverse proxy.

Question:

Is there any security threat to server A (holding customer, credit card, etc. information), or are the usual issues commonly attributed to WordPress mitigated by being on a separate server B?

share|improve this question
    
For something this simple, it may be advisable to just create a subdomain. If a subdomain isn't available just have the url example.com/blog/ issue a browser redirect header to wherever it's hosted. You could also use an IFRAME. –  Daisetsu Feb 7 at 2:02

2 Answers 2

up vote 3 down vote accepted

Yes, there are possible issues. For instance, consider the Same-Origin Policy: this is one of the foundations of how Web sites are contained and don't attack each other. For instance, Javascript from a site can talk (send "POST" requests) only to the originating site. This prevents some evil Javascript from some site from siphoning your bank account by sending hidden request to your bank Web site. However, when server A reverse-proxies B, then everything seems to come from A, from the browser point of view. If B is hacked into, then it may send hostile Javascript which will run in the client browser as if it came from A, thus being able to send arbitrary commands to the rest of the site on A.

However, yes, some issues associated with WordPress are mitigated by the separation; namely, that if the machine B is hijacked, then A is not hijacked right away. As explained above, you are still in deep trouble, but not as deep as you would be if both machines had been the same. "Mitigation" might not be the right term; let's call it "partial damage reduction".

If you want a separation which is effective in the security model as implemented by browsers, then you should separate servers under two distinct domains. For instance, there is security.stackexchange.com and security.blogoverflow.com: that's what you should aim at. Reverse-proxying a vulnerable site is really looking for trouble.

share|improve this answer
    
Thanks, great answer. One question, you suggest using separate TLDs as a whole. Don't know if this should be a whole new question, but is there a security risk when using a subdomain on the same TLD? –  Baumr Feb 7 at 10:02
1  
Theoretically, the SOP is based on the exact host name, so a subdomain should be sufficient to ensure separation. But this is relative to what browser developers come up with; they are known to be creative at times. –  Tom Leek Feb 7 at 12:53

Yes there is a significant security threat to the WordPress server.

Any application attack - such as SQL injection or cross-site scripting - will simply pass through the reverse proxy, and have the full impact on the WordPress server.

When it comes to lower-level attacks - such as a buffer overrun - these will affect the reverse proxy. These kinds of attack are much less common than application attacks. And once an attacker has compromised the reverse proxy, they can capture all traffic flowing through it, including user passwords.

You need to follow all the standard security advice for securing both Apache and WordPress.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.