firefox-db2pem: avoid use of eval in script

This could potentially be exploited by manipulating nicknames in the
cert DB.

Reported-by: behindtheblackwall on hackerone
Closes #17766
This commit is contained in:
Dan Fandrich 2025-06-27 11:07:10 -07:00
parent d2a408587a
commit 0b98f596c8

View file

@ -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"