Firejail is a setuid binary with tons of attack surface and has had a number of privescs itself[1], unlike something like the lower-level Bubblewrap tool.
I'm glad it exists, though - it's the only mature solution other than Flatpak that has proper dbus filtering, among other things.
[1]: https://www.cvedetails.com/vulnerability-list/vendor_id-1619...
Therein lies IMO the biggest problem with application security on desktop Linux. Just like selinux, apparmor and other similar security tools *someone* has to globally deny access to permissions, break things in the process and find the minimum number of permissions required for the app to function.
Many users are not going to do this and (lazy or uninterested?) developers (package maintainers?) don't want to do that work either.
Couldn’t package managers install and enforce such policies?