-
SummaryI host a personal site via Next.js. I recently noticed that the static html of the site got embedded a malicious script The script is obfuscated, but it basically triggers a redirect to a scam site. This is happening after I patched my site for the React2Shell CVE. In my console log, I have a bunch of following error, not sure if it's caused by the attack: The script does not seem to be injected through proxy, because I am able to see the injected code directly accessing the server. However, I don't see file system modified by the attacker too, following is the output of docker diff So, I can only assume that the attacker was able to modify the static page data in the memory. The site is really simple static html with link to some of my social media pages. It's hosted through cloudflare. There's no async calls dynamic content what's so ever. How next.js can allow this to happen? Really appreciate any help Additional informationNo response ExampleNo response |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 7 replies
-
|
Do you use umami for analytics by any chance? |
Beta Was this translation helpful? Give feedback.
-
|
Is anyone aware of a way to analyse the script file injected |
Beta Was this translation helpful? Give feedback.
-
|
I've found the same script in my NextJS 15 website. I've applied the patch using the React2Shell and the malicious script is still there. I have only a Google Tag Manager applied (it applies a Google Analytics and Clarity scripts) and my deploy is done through a webhook on Github. I'm still investigating it. If I have any news I'll keep updated here. |
Beta Was this translation helpful? Give feedback.
it was because I didn't upgrade nextjs version correctly.