]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
firefox-db2pem: avoid use of eval in script
authorDan Fandrich <dan@coneharvesters.com>
Fri, 27 Jun 2025 18:07:10 +0000 (11:07 -0700)
committerDan Fandrich <dan@coneharvesters.com>
Sun, 29 Jun 2025 04:12:27 +0000 (21:12 -0700)
This could potentially be exploited by manipulating nicknames in the
cert DB.

Reported-by: behindtheblackwall on hackerone
Closes #17766

scripts/firefox-db2pem.sh

index 57252b40578e9da4de356e9bf42fbb3eaf62babc..2a4b9ceace16c263a0ba6e4be6d14bd474d74e93 100755 (executable)
@@ -57,5 +57,5 @@ sed -e 's/ *[CcGTPpu]*,[CcGTPpu]*,[CcGTPpu]* *$//' -e 's/\(.*\)/"\1"/' | \
 sort | \
 while read -r nickname; \
  do echo "$nickname" | sed -e "s/Builtin Object Token://g"; \
-eval certutil -d "$db" -L -n "$nickname" -a ; \
+ echo "$nickname" | xargs -I{} certutil -d "$db" -L -a -n {} ; \
 done >> "$out"