Import passwords stored in CSV file to Firefox
Solution 1:
Update: This solution no longer works with recent Firefox Quantum.
You can use the Password Exporter add-on.
This extension allows you to export your saved passwords and disabled login hosts using XML or CSV files that can be imported later.
Despite the name it allows you to import passwords from CSV as well:
You might need to change the CSV format for it to match the one the add-on requires.
Solution 2:
Edit (28 Feb 2020): The utility is broken in the latest versions of Firefox (73).
I made an utility that solves this issue: https://github.com/louisabraham/ffpass
pip install ffpass
ffpass import --from passwords.csv