How to Fix dock.lovegreenpencils.ga/m.js?n=nb5

Thousands of sites are recently affected by lovegreenpencils malware, directing users to:
https://dock.lovegreenpencils.ga/m.js?n=nb5
https://cht.secondaryinformtrand.com/m.js?n=nb5
This contamination affects PHP files, JS files, wp_posts tables, wp_options site URLs.