Securing our home labs: Frigate code review
Frigate's configuration parser used unsafe YAML deserialization, allowing remote code execution when an attacker could submit a crafted configuration. Additionally, the API lacked authentication and CSRF protection, enabling a drive-by attack where a malicious website could scan the local network and send a payload to a Frigate instance without user interaction.
Published on github.blog
Logan MacLaren & Jorge Rosillo
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Impact
An attacker could achieve remote code execution on a Frigate instance without authentication, and could also read or modify the configuration, potentially exfiltrating credentials and disabling recording.
What the attacker needed
Victim visits malicious website; Frigate on local network; Frigate on predictable port
The fix
The vulnerabilities were fixed in version 0.13.0 Beta 3 by updating the YAML loader and adding CSRF protection.
How it was found
- The attacker creates a malicious web page that scans the local network for a service on port 5000.
- When a victim visits the page, JavaScript sends a POST request to the Frigate API endpoint /api/config/save with a YAML payload that triggers code execution.
- The payload is processed by the vulnerable YAML loader, executing the attacker's command on the Frigate host.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
Frigate is a home security camera recorder. Its configuration parser could be tricked into running commands on the server because it used an unsafe YAML loader. Also, the web API had no login or CSRF protection, so a malicious website could send requests to a Frigate instance on the victim's local network and take control.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.