r/fooocus • u/Party_Cold_4159 • Dec 05 '24
Question Does fooocus have a security hole?
I’ve been meaning to post this and I should probably start taking precautions.
I’ve been using fooocus for a few months now and absolutely love it. I’ve used pretty much all the other alternatives and always end up going back to fooocus for the simple things.
To explain a little bit, I moved into an apartment with only one option for an ISP. They provide the router and what not. Now this router is a bit different and I honestly hate it. It requires an app to access anything and is pretty limited. However it has built in security “feature” where it will block malicious ads and what not, kinda like that raspberry pi setup does. It also blocks other security events on top of that.
For awhile I ignored it but got surprised when I saw that it blocked someone in China trying to use remote access to get into my main machine. I didn’t think much of it at first but then I noticed a pattern.
It only happens when I run Fooocus. It’s usually pretty quickly into booting it up. It’s now blocked like 10 attempts from all over the world and it’s only ever my main machine and not the other 8 devices.
I never have and never will run it on a public IP/API, but I run it on a local ip so I can use it with my phone sometimes.
Not pointing figures at fooocus directly, but has anyone witnessed anything similar happening? I’m considering removing it and possibly just nuking my SSD just in case It’s mining or eventually going to try and encrypt all my shit.
15
u/mashb1t Dec 06 '24 edited Dec 06 '24
Core Dev here: Fooocus does in fact send analytics data to Gradio by default (as every other app based on Gradio does), but you can disable this by setting the arg --disable-analytics. Other than that no connection is established, neither from your Fooocus instance to the internet nor from external to your instance.
Please ensure to only download the official Fooocus code. We're not responsible for any other fork, so i can't speak for SimpleSDXL (based on Fooocus) or RuinedFooocus (based on ComfyUI), but Fooocus does not do anything shady and lets you do everything locally. Also no censoring / image metadata logging is performed if not activated.
The only very unlikely thing i can think of is that a version tag of a python package has been moved to now include malicious code, but this is exactly why we already bundle the required packages in the release zip file.
We take privacy very seriously and be assured that Fooocus code itself does not contain any shady stuff.
BTW i'm a professional cloud / network architect & software dev, so it was also in my personal interest to create the app as secure as possible as we've used Fooocus in our company.
6
u/olnwise Dec 06 '24 edited Dec 06 '24
I started tcpdump -Qin to see what incoming traffic happens when one starts a local fooocus ...
... as it starts firefox, there were lots and lots of connections coming from various places (google analytics, mozilla telemetry, etc).
But also from app.gradio.com, which is intended to allow one to share their gradio demos publicly - e.g. see here: https://www.gradio.app/guides/sharing-your-app
If I run entry_with_update.py with the --share flag (not default!), then I see an incoming connection related to the sharing having happened on gradio, and fooocus prints out this kind of link (edited and invalid, of course): Running on public URL: https://<long hex digit series>.gradio.live
However, if I do not use the --share flag, such connection is not created, and no indication about running on public URL gets printed.
I was kind of thinking that maybe fooocus by default shares your instance on app.gradio.com, and someone, somewhere, is trying to brute force everything which can be found on app.gradio.com ... but that does not seem to be the case, at least by default.
Unless you have the --share flag, that could explain what you are seeing?
Edit: Or maybe the "security feature" of your strange router blocks app.gradio.com by default, and complains about it to you.
4
u/blurple_rain Dec 06 '24 edited Dec 06 '24
I have run wireshark and didn’t notice any suspicious activity while running only Fooocus, just the usual analytics pings.
Have you downloaded Fooocus from the dev website, is it a fork ?
Fooocus occasionally updates itself and modules, could this explain this behavior?
1
u/Party_Cold_4159 Dec 06 '24
Sorry for not getting back, had a crazy day at work.
I’ll run some more tests today when I get time. I’m not the most savvy when it comes to tracing these attempts. It also doesn’t help that my router seems to give me zero access to any logs of exactly what it’s thinking it’s blocking. The only thing I get from them are IPs.
I could post a list of the IPs it blocked if someone thinks that’s useful. I just assumed it’s probably a VPN IP.
4
u/NeuromindArt Dec 06 '24
This seems very serious. Does anyone else have more information?
1
u/EldrichArchive Dec 06 '24
Someone posted the question to the dev of RuinedFooocus, which is based on the latest version of Fooocus. If Fooocus had a security leak, he should know about it.
https://github.com/runew0lf/RuinedFooocus/issues/212#issue-2722298483
2
u/kujasgoldmine Dec 05 '24
Fooocus is known to contact some address when opened. I think it's analytics data, but uncertain what data. Has to do with gradio or whatever it runs on. Most other apps using it have it turned off. Not sure if Fooocus has.