Subject: | Insecure temp files handling in Module::Packaged |
Module::Packaged creates predictable temp files of the form /tmp/mod_pac/(name)-(pid). A local attacker could create a symlink from such a file to a file which he cannot write to, and then entice someone with access to the target file to use Module::Packaged, thus overwriting the target file.
To solve this, Module::Packaged must use a temporary directory with an unpredictable name, and an access mode set to disallow access by others.