Clash Vulnerability Alert: Watch Out Before Your PC Falls Victim!


For those of you still using Clash or Sub‑Store, please take note of the following vulnerability:

Full Attack Flow:

1. User opens a malicious webpage controlled by the attacker
​
2. The page’s JS directly requests the local address http://127.0.0.1:38324

Key point: Browser pages can access local loopback addresses; binding only to 127.0.0.1 does not block web JS from initiating requests.

3. The Sub‑Store local service lacks authentication, directly accepting externally sent requests without requiring a password or token.
​
4. The API response header includes Access‑Control‑Allow‑Origin: * , allowing CORS so the webpage JS can read the returned data.
​
5. The malicious webpage sends a POST request to /api/preview/sub , injecting malicious script code.
​
6. Sub‑Store internally uses new Function() to dynamically execute the injected script.
​
7. The malicious script accesses Node’s underlying module: require(“child_process”)
​
8. It uses execSync() to execute system commands locally, for example: whoami to query the current user.
​
9. Replacing the command with certutil allows downloading a trojan and executing it on the PC, resulting in a full compromise.

Protection Steps :xhj32:

  1. Set an access password (auth token) for Sub‑Store and enable API authentication; do not run password‑less local instances openly.

  2. Avoid opening random/unfamiliar webpages. While running Sub‑Store locally, steer clear of untrusted sites.

  3. Do not expose ports to the public internet; use only locally, and do not listen on 0.0.0.0.

  4. Update to the latest version; this vulnerability has been patched/restricted in newer releases.

This is essentially a local service being attacked from the browser side, a common security pitfall for many desktop tools built with Node.js.

Simple test to check for risks (primarily Windows, uncertainty remains regarding mobile):

  1. Enable the node/proxy in your frequently used proxy software (so far, group members have tested and found that Sub‑Store is the cause),

  2. Visit http://127.0.0.1:38324

  3. Check if it responds/connects successfully

  4. (Submit it to your legitimate AI for testing and feedback)

To determine if you’re specifically affected, you can send the images from this post to an AI and ask it to analyze them for you.

Folks, feel free to test and share your results below to see if this affects Windows, Linux, and macOS.

If this was helpful, thank you for your likes, support, and bookmarks!

3 Likes

Disable LAN access? :thinking:

Take a look

3 Likes


I’m using Clash Verge, but it won’t open.

They’ve given up on this and switched to v2rayN.

I tried v2rayN, but it still won’t open.

Which specific version of Clash is it?

It’s Sub Store; just turn it off.
The new version of Clash Verge doesn’t have any issues.

1 Like

Will update on Monday.

This looks like Clash may have been compromised. No competent developer would normally enable Access-Control-Allow-Origin: *; it’s clearly a CORS attack from the local network.

1 Like

Moreover, running the script without an isolated sandbox is also very dangerous; this isn’t how normal development should be done.

I don’t like using Clash. I usually use Windows machines, and I found that running Clash for extended periods can cause system problems, so I stopped using it altogether. Clash seems to work better on Mac, but I haven’t run it for long periods on Mac either, so I can’t really say.

It’s actually Sub-Store in Clash (the title needs to be attention-grabbing :xhj001:, as advised by a journalism expert). Clash Party and Sparkle are known to be affected; simply stop using Sub-Store.

Yeah, that’s right. Clash has always had a bit of an issue with kernel resource scheduling on Windows. Plenty of users report memory leaks, and it starts lagging after prolonged use, but the official team doesn’t seem to have done much optimization.

In an act of urgency, I have published a new blog post to hopefully reduce the number of victims impacted by the bug I discovered in Sub-Store. I unfortunately do not speak Chinese, but modern translation tools are good enough to convey the information. A poisoned jQuery file turned SpeedyBee into a malware carrier - kabir.au

1 Like

Thanks for this critical finding.

Is your expectation that I help promote your blog on this forum?

I will cite your original work for Chinese‑speaking users.

Clickbait headline, huh? :angry: What do you mean by a “Clash vulnerability”?

Running any configuration file you come across is your own problem, and in a normal network environment, how could you expose an API directly to the public internet?

Be careful—you might get reported.

A security expert from overseas replied in the comments—check out their analysis yourself. This problem actually came up when some folks in the group were using Clash Party and Sparkle (sub-store), which means there could be more undetected security risks lurking. Does it really matter if the title focuses on Sparkle/sub-store or Clash? You pick. If you think the post is misleading, all hype without substance, or just the result of your own mishandling (look, it wasn’t me who fell victim, so maybe it wasn’t worth sharing anyway), go ahead and report it :xhj36:. Honestly, I didn’t dig too deep into the analysis myself (as I mentioned at the end, I was just hoping some pros would step in with a proper security audit).

ok - modified

Is it okay to use Clash Verge?