mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #6896] --profile=FILE with just a filename has security implications and should be highly discouraged #3407
Labels
No labels
LTS merge
LTS merge
bug
bug
converted-to-discussion
doc-todo
documentation
duplicate
enhancement
file-transfer
firecfg
firejail-in-firejail
firetools
graphics
help wanted
information_old
installation
invalid
modif
moved
needinfo
networking
notabug
notourbug
old-version
overlayfs
packaging
profile-request
pull-request
question
question_old
removal
runtime-permissions
sandbox-ipc
security
stale
wiki
wiki
wontfix
wordpress
workaround
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/firejail#3407
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @vinc17fr on GitHub (Sep 12, 2025).
Original GitHub issue: https://github.com/netblue30/firejail/issues/6896
Description
Most examples in the firejail(1) man page suggest to use
--profilewith just a filename (profile name), without a colon. However, if the filename happens to exist in the current directory, it will be chosen as the security profile instead of the usual one found in standard paths; this is most often unexpected. Such a use should be highly discouraged (and in particular, no longer given as examples). As a general rule, reading config files in the current directory is a bad idea, in particular when there are security implications like here. This is almost as bad as having.first in$PATH.IMHO, since this is error prone, a search in the current directory should even be disabled, except when explicitly requested with
--profile=./FILE. So the use of the colon (:) would become unnecessary.Steps to Reproduce
So this has the effect to start firejail with an empty profile, which is usually unexpected. If the file has arbitrary contents, this will make firejail immediately exit with an error.
Note: This happened to me because in one of my directories, there was a file named
firefox. As this happened via a script, it took me time to find the cause of the silent failure (for some reason, the error message could not be visible, so I first blamedless, then xterm (which ran the command), then Firefox, before eventually finding that the cause was firejail).Checklist
--profile=PROFILENAMEto set the right profile. (Only relevant for AppImages)Even the checklist is misleading:
--profile=PROFILENAMEis what triggers the issue!@rusty-snake commented on GitHub (Sep 13, 2025):
Somewhat related: #3798
@netblue30 commented on GitHub (Jan 9, 2026):
Fixed, thanks @vinc17fr