CVE-2020-17368
📋 TL;DR
CVE-2020-17368 is a command injection vulnerability in Firejail up to version 0.9.62 that allows attackers to execute arbitrary commands on the host system. The vulnerability occurs when shell metacharacters are passed to the --output or --output-stderr options. Any system running vulnerable Firejail versions with these options is affected.
💻 Affected Systems
- Firejail
📦 What is this software?
Fedora by Fedoraproject
Fedora by Fedoraproject
Firejail by Firejail Project
Leap by Opensuse
⚠️ Risk & Real-World Impact
Worst Case
Full system compromise with root privileges, allowing complete control over the host system, data theft, and lateral movement.
Likely Case
Privilege escalation from a lower-privileged user to root, enabling unauthorized access to sensitive data and system resources.
If Mitigated
Limited impact if proper sandboxing and least privilege principles are followed, potentially containing the exploit within the sandbox.
🎯 Exploit Status
Exploitation requires access to execute Firejail with the vulnerable options and ability to control input containing shell metacharacters.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 0.9.63 and later
Vendor Advisory: https://github.com/netblue30/firejail/security/advisories
Restart Required: No
Instructions:
1. Update Firejail to version 0.9.63 or later using your distribution's package manager. 2. For Debian/Ubuntu: sudo apt update && sudo apt upgrade firejail. 3. For Fedora: sudo dnf update firejail. 4. For source installations: git pull from repository and rebuild.
🔧 Temporary Workarounds
Avoid vulnerable options
linuxDo not use --output or --output-stderr options with untrusted input
Input sanitization
linuxSanitize all input passed to Firejail commands to remove shell metacharacters
🧯 If You Can't Patch
- Remove Firejail from systems where it's not essential
- Implement strict access controls to limit who can execute Firejail with vulnerable options
🔍 How to Verify
Check if Vulnerable:
Check Firejail version: firejail --version. If version is 0.9.62 or earlier, system is vulnerable.
Check Version:
firejail --version
Verify Fix Applied:
After update, verify version is 0.9.63 or later: firejail --version
📡 Detection & Monitoring
Log Indicators:
- Unusual Firejail process executions with --output or --output-stderr options
- Shell commands executed from Firejail processes
Network Indicators:
- Outbound connections from Firejail processes to unexpected destinations
SIEM Query:
process_name:"firejail" AND (command_line:"--output" OR command_line:"--output-stderr")
🔗 References
- http://lists.opensuse.org/opensuse-security-announce/2020-08/msg00036.html
- https://github.com/netblue30/firejail/
- https://lists.debian.org/debian-lts-announce/2020/08/msg00033.html
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/JFXN3JJG4DIMN4TAHOTKFMS7SGM4EOTR/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/W66IR5YT4KG464SKEMQN2NP2LGATGEGS/
- https://security.gentoo.org/glsa/202101-02
- https://www.debian.org/security/2020/dsa-4742
- https://www.debian.org/security/2020/dsa-4743
- http://lists.opensuse.org/opensuse-security-announce/2020-08/msg00036.html
- https://github.com/netblue30/firejail/
- https://lists.debian.org/debian-lts-announce/2020/08/msg00033.html
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/JFXN3JJG4DIMN4TAHOTKFMS7SGM4EOTR/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/W66IR5YT4KG464SKEMQN2NP2LGATGEGS/
- https://security.gentoo.org/glsa/202101-02
- https://www.debian.org/security/2020/dsa-4742
- https://www.debian.org/security/2020/dsa-4743