This plugin has yet to be updated to remove this security flaw. I also want to note that it’s setting the X-Powered-By header which also shows what technology the website is using.
X-Powered-By: W3 Total Cache/0.9.4.1
This is a little weird, but you can disable it like so in functions.php or wherever:
//prevent W3 Total Cache from dumping comments in your footer
add_filter( 'w3tc_can_print_comment', function( $w3tc_setting ) { return false; }, 10, 1 );
Thank you. Hopefully they fix this issue soon.
Devs, check out OWASP’s security write-up on why having X-Powered by, and other identifying marks, are bad for security. Pretty much any hacker worth their name can identify a WP site manually, and probably even program their bots to easily identify one. However, the real issue here is that version numbers help people find CVE and NVD entries much more readily, and if that version has a known flaw, it’s bye-bye website.
https://www.owasp.org/index.php/Fingerprint_Web_Application_%28OTG-INFO-009%29
Hi all,
The X-Powered-By: W3 Total Cache/x.x.x.x header can be disabled by un-ticking the “Set W3 Total Cache header” under the Browser Cache tab.
As far as the comments W3TC inserts, those can be removed via minifying HTML with W3TC (it looks like you are minifying your site’s HTML with Autoptimize, Rick, which will not automatically remove W3TC’s comments). MadysonDesigns’ filter works too.
Best,
AJ
(@cozylife)
11 years, 5 months ago
Hackers look for various scraps of data to figure out the best attack vectors. One of the ways they do so is to examine the HTML source code especially for comments. W3 Total Cache aids in allowing attackers to understand what type of caching is taking place in order to eliminate futile attack vectors.
What does this information tell an attacker?
echo file_get_contents()and they could gain access to any data that was once in the DB.Marketing helps to keep businesses going, so it’s perfectly understandable that you include your advertisement in the free version. It’s better that the ad is in the HTML source instead of placing banners and other stuff on the site in stead like other plugins may do.
Soliciting that the plugin exists on the system is still a security flaw, but it’s generally not such a problem, as attackers will try to aim their attacks more towards the core code of widely used projects such as WordPress, as they can always count on that code being present.
Higher profile sites are more susceptible to having their plugins known as the attacker will probably manually attack the site instead of using a bot to scan for vulnerable sites. In that case, a vulnerable plugin could give them leverage.
The other content, what’s being cached where, and for how long, should only be available to logged in administrators, not the end user. As an optimization system, you know that the less code, including comments, that the site sends to the browser, the smaller the file size.
Please make this change to enhance security and optimization. Thank you.
https://ww.wp.xz.cn/plugins/w3-total-cache/