CVE-2026-121479: Improper quoting of command arguments in hints enables command injection
sq emits hints, which can include a suggested command that the user can run. Some hints are derived from the input and thus can partially be influenced by an attacker. Because the quoting was not careful enough, it was possible to craft a user ID that would be used in the command and when the hint is copy and pasted would execute arbitrary commands. Consider the user ID $(touch /tmp/pwned). If the corresponding certificate is not considered authenticated and the user runs sq verify on a message signed by that certificate, sq would show:
Hint: After checking that FINGERPRINT belongs to $(touch /tmp/pwned), you can mark it as authenticated using:
$ sq pki link add --cert=FINGERPRINT --userid="$(touch /tmp/pwned)"
If the user copy and pasted the command, then most shells would create the file /tmp/pwned.
This was fixed by improving the argument quoting.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
rust/sqzto a version that resolves this vulnerability.Fixed in 0.2.0
Event History
Frequently Asked Questions
What conditions are required for exploitation?
An attacker needs to influence a user ID on a certificate that is not considered authenticated and have the target run sq verify on a message signed by that certificate. Exploitation then requires the target to copy and paste the displayed suggested command into a shell.
How can I determine whether a user may have been exposed?
Review whether sq verify was run on messages signed by unauthenticated certificates with attacker-influenced user IDs, and whether users copied the resulting authentication-linking hints into a shell. A user ID containing shell command substitution syntax, such as $(touch /tmp/pwned), is an example of a dangerous value.
What should be done if immediate updating is not possible?
Do not copy and paste suggested sq commands that include certificate user IDs into a shell. Validate the user ID and construct any required command manually with safe shell quoting.