Our Confluence server was flagged by Qualys scan for the 11827 vulnerability.
The following headers are not present:
Header set X-Content-Type-Options: "nosniff" Header set X-XSS-Protection: "1; mode=block" Header set X-Frame-Options: "sameorigin"
As we are using the default Confluence installation which is using Apache Tomcat (built in or something),
how do I add these headers to the default config?
While the other comment by @Edwin Kyalangalilwais good, you should also consider "masking" this vulnerability by fronting your Tomcat with a proxy server in front of it. For example, Apache:
There is no easy way to upgrade Tomcat that run's Jira and Confluence. So, the best workaround is to mask whatever's running in the background with a good proxy and webserver setup.
Hi Lloyd,
This link will be helpful. Refers to web.xml
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanks - looked at that reference and another - I made the correct changes to the web.xml file located under ..\confluence\conf - however, after making the changes, it's still not working - the headers are not appearing..
I updated web.xml to contain the following - uncommented:
<filter>
<filter-name>httpHeaderSecurity</filter-name>
<filter-class>org.apache.catalina.filters.HttpHeaderSecurityFilter</filter-class>
<async-supported>true</async-supported>
<init-param>
<param-name>antiClickJackingEnabled</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>antiClickJackingOption</param-name>
<param-value>SAMEORIGIN</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>httpHeaderSecurity</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Did you try restarting after the changes?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
yep - if that means restarting the Confluence service..reboot, no..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I've also found that there are 3 web.xml files on the system - not sure why and which to change..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That's the correct location. A reboot is required for changes to take effect.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Reboot doesn't change anything - still doesn't work. I don't understand. I've made those exact line changes in web.xml. Here's the locations I have found this file:
1. D:\confluence\confluence\conf
2. D:\confluence\confluence\confluence\WEB-INF
3. D:\confluence\confluence\synchrony-proxy\WEB-INF
Made the change on number 1. Number 2 and 3 files look different than web.xml in #1 location, so not sure what to do here.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Item 2 is where you want to make the change. And only in Item 2.
2. D:\confluence\confluence\confluence\WEB-INF
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
ok - so the one in 2 is strange as it doesn't have these entries even commented out, like the web.xml in #1 does - so do I just add them anywhere? I've seen some references that it must be in certain areas (before or after other entries). I've also seen where filter mapping entry should be before the filter.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Item 2 is where you want to make the change. And only in Item 2.
I may stand corrected on this.
I've seen some references that it must be in certain areas (before or after other entries). I've also seen where filter mapping entry should be before the filter.
There are orders in the filters:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.