IIRC, in the case of firefox, a key is generated at profile creation, and then the password saved are encrypted using this key.
It's basically security through obscurity as the key stays clear text UNLESS the profile is protected by a password a human must type every times he opens Firefox.