SQL query crashing MariaDB
-
We have a Medium size AWS instance running 3 small low-traffic WordPress websites. They are all running Wordfence Free. We are seeing occasional downtime where an SQL query is overwhelming MariaDB. Here is the query:
SELECT HEX(
meta_value
) as a, IF (meta_value
LIKE '%meta_value LIKE '%meta_value LIKE '%meta_value LIKE '%meta_value LIKE '%fromCharCode%' ORmeta_value
LIKE '%setTimeout%' ORmeta_value
LIKE '%setInterval%' ORmeta_value
LIKE '%meta_value LIKE '%href%' ORmeta_value
LIKE '%base64_decode%', 1, 0) as a_norm, IF (IF(SUBSTRING(meta_value
, 1, 4) = ':AI:', FROM_BASE64(SUBSTRING(meta_value
, 5)), FROM_BASE64(¨C13C)) LIKE '% 53666 AND (((LENGTH(meta_value
) <= 665600 AND (meta_value
LIKE '%<script%' ORmeta_value
LIKE '%<iframe%' ORmeta_value
LIKE '%<object%' ORmeta_value
LIKE '%<embed%' ORmeta_value
LIKE '%fromCharCode%' ORmeta_value
LIKE '%setTimeout%' ORmeta_value
LIKE '%setInterval%' ORmeta_value
LIKE '%<?php%' ORmeta_value
LIKE '%href%' ORmeta_value
LIKE '%base64_decode%'))) OR ((LENGTH(meta_value
) <= 665600 AND (CHAR_LENGTH(meta_value
) % 4 = 0 ANDmeta_value
REGEXP '^(:AI:)?*={0,3}$')))) HAVING a_norm = 1 OR a_b64 = 1 ORDER BYmeta_id
LIMIT 1000;I tried searching the files on the server to find the source of the query. This is the most success I had:
[master_a***********y]:plugins$ grep -Rl “FROM_BASE64”
wordfence/vendor/wordfence/wf-waf/src/lib/parser/sqli.phpIt looks like Malware scanning to me. The query occurred at 9pm and multiple times under each account on the server (We have Wordfence installed across all sites).
Can anyone else confirm that this is Wordfence? Do we need to upgrade our server if this kind of query is crashing MariaDB?
- You must be logged in to reply to this topic.