snap-confine in snapd before 2.38 incorrectly set the ownership of a snap application to the uid and gid of the first calling user. Consequently, that user had unintended access to a private /tmp directory.
https://github.com/snapcore/snapd/commit/bdbfeebef03245176ae0dc323392bb0522a339b1