JupyterLab versions 4.5.7 through 4.6.3 have a vulnerability where the trust prompt for command links can incorrectly mark a different document as trusted than the one the user clicked. This occurs if another document becomes current while the trust prompt is open. Trusted documents allow buttons to run commands without further prompts, potentially enabling unintended command execution. When a notebook is incorrectly trusted, it is saved to disk as trusted, persisting the effect beyond the session. The issue is patched in versions 4.6.4 and 4.5.11.