If an adversary is able to insert or update any OpenPGP certificate stored in the victim's GnuPG's keyring (or keybox), the adversary can prevent the victim from subsequently importing any certificate of their choosing.
This appears to be the case with or without use-keyboxd on gpg 2.4.7. I have not tested any other version.
For example, if the user can be convinced to import the OpenPGP certificate blocker.cert (attached here), then a future attempt to import any of the keys shipped in /usr/share/gnupg/distsigkey.gpg will fail.
Below is a transcript of this process without use-keyboxd enabled, but the same concern seems to apply with use-keyboxd as well.
0 dkg@bob:~$ gpg --import blocker.cert gpg: keybox '/home/dkg/.gnupg/pubring.kbx' created gpg: /home/dkg/.gnupg/trustdb.gpg: trustdb created gpg: key 686B3732F1BA1156: public key "This is a dangerous certificate" imported gpg: Total number processed: 1 gpg: imported: 1 0 dkg@bob:~$ gpg --list-keys /home/dkg/.gnupg/pubring.kbx -------------------------------------------------------- pub ed25519 2025-02-10 [SCA] 9547A24942568307926B6ECB686B3732F1BA1156 uid [ unknown] This is a dangerous certificate sub rsa3072 2017-03-17 [E] sub ed25519 2020-08-24 [] sub ed25519 2021-05-19 [] sub brainpoolP256r1 2021-10-15 [] 0 dkg@bob:~$ gpg --import /usr/share/gnupg/distsigkey.gpg gpg: key BCEF7E294B092E28: 1 signature not checked due to a missing key gpg: key BCEF7E294B092E28: doesn't match our copy gpg: key 528897B826403ADA: 4 signatures not checked due to missing keys gpg: key 528897B826403ADA: doesn't match our copy gpg: key E98E9B2D19C6C8BD: 2 signatures not checked due to missing keys gpg: key E98E9B2D19C6C8BD: doesn't match our copy gpg: bad key signature from key 528897B826403ADA: Wrong key usage (0x10, 0x0) gpg: key 549E695E905BA208: 1 signature not checked due to a missing key gpg: key 549E695E905BA208: 1 bad signature gpg: key 549E695E905BA208: doesn't match our copy gpg: Total number processed: 4 2 dkg@bob:~$ gpg --list-keys /home/dkg/.gnupg/pubring.kbx -------------------------------------------------------- pub ed25519 2025-02-10 [SCA] 9547A24942568307926B6ECB686B3732F1BA1156 uid [ unknown] This is a dangerous certificate sub rsa3072 2017-03-17 [E] sub ed25519 2020-08-24 [] sub ed25519 2021-05-19 [] sub brainpoolP256r1 2021-10-15 [] 0 dkg@bob:~$
This DoS against the user's keyring affects the ability to verify signatures made from these signing keys. I think the same kind of keyring DoS could be used to prevent importing a certificate for encrypting a message to someone, but I have not crafted such a demonstration.
That said, use-keyboxd might also be an aggravating factor, since at least without use-keyboxd the user can offer --no-default-keyring and --keyring=/usr/share/gnupg/distsigkey.gpg. But those options don't have any effect once use-keyboxd is in play, as per T7265.