Skip Navigation

[Resolved] Wordfence is flagging files, is there really a problem?

This thread is resolved. Here is a description of the problem and solution.

Problem: A Wordfence security scan has thrown a notice that a file in WooCommerce Views contains malicious code. Is it a problem?

Solution: Our developers are confident there is not a security risk here, and the issue is a false positive.

This support ticket is created 6 years, 4 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Tagged: 

This topic contains 4 replies, has 3 voices.

Last updated by Christian Cox 6 years, 4 months ago.

Assisted by: Christian Cox.

Author
Posts
#955338

I am trying to: my wordfence security scan is identifying files as critical issues, when I google them they seem to be related to Toolset stuff. Please advise:

Link to a page where the issue can be seen: This file may contain malicious executable code: wp-content/plugins/woocommerce-views/Class_WooCommerce_Views.php
Type: File
Issue Found July 24, 2018 3:20 pm
Critical
Ignore
Details

Filename: wp-content/plugins/woocommerce-views/Class_WooCommerce_Views.php
File Type: Not a core, theme, or plugin file from wordpress.org.
Details: This file is a PHP executable file and contains the word "eval" (without quotes) and the word "urldecode(" (without quotes). The eval() function along with an encoding function like the one mentioned are commonly used by hackers to hide their code. If you know about this file you can choose to ignore it to exclude it from future scans. This file was detected because you have enabled HIGH SENSITIVITY scanning. This option is more aggressive than the usual scans, and may cause false positives.

------------------------------------------------------------------------------------------------------------------------------------------------------------

This file may contain malicious executable code: wp-content/plugins/wp-views/embedded/inc/wpv-condition.php
Type: File
Issue Found July 24, 2018 3:20 pm
Critical
Ignore
Details

Filename: wp-content/plugins/wp-views/embedded/inc/wpv-condition.php
File Type: Not a core, theme, or plugin file from wordpress.org.
Details: This file is a PHP executable file and contains the word "eval" (without quotes) and the word "base64_decode(" (without quotes). The eval() function along with an encoding function like the one mentioned are commonly used by hackers to hide their code. If you know about this file you can choose to ignore it to exclude it from future scans. This file was detected because you have enabled HIGH SENSITIVITY scanning. This option is more aggressive than the usual scans, and may cause false positives.
I expected to see: no security issues

Instead, I got:

#955371

The eval requirements and statements about security are here:
https://toolset.com/toolset-requirements/
https://toolset.com/toolset-requirements/#eval-usage

I will actually now ask for a list of files, that hold this critical code.
Then, I will ask to publish that list there.

This will avoid wasting your time to put down a ticket asking us if this is a false positive or not, you will just be able to compare the files and be at ease.

Note also, that we evaluate possibilities to fully avoid the code specifically.

For now, this should be a false alarm, and you do not need to worry.

To be 100% safe, I will let a developer confirm this.

#955392

There is no usage at all of eval() in the wp-content/plugins/woocommerce-views/Class_WooCommerce_Views.php
(Actually, there is none in the whole WooCommerce Views Plugin)

What is possible is that the false alarm came from the function wcviews_clear_all_func_conditional_eval() which is not an eval() function at all.

The Views usage of eval() instead is totally safe.
We pass over eval() a string that we craft, that is not and can not be accessed by the "outer world", based on our own checks against the legacy wpv-if shortcode conditions.

Hence, this is a false alarm.

Thanks for the query thou, it's always better to be safe.

Related to the public list of such files I wanted, we are discussing this internally.

#955542

Hi, do you still need me to copy/paste the whole code in here? Its very long.

#955574

No, there's no need to post any additional code right now. Our developers are confident there is no security problem in these files, and are sure the high sensitivity of the Wordfence scan is throwing a false positive.