Puppet contains a flaw related to the parsing of file bucket requests. The Puppet::FileBucket::File object does not sanitize user-supplied input allowing for files to be written to arbitrary locations, or writing to a world-writable location that matches a command string leading to command execution.
Upgrade to version 2.6.15 or 2.7.13 or 2.5.1 for Enterprise or higher, as they have been reported to fix this vulnerability. In addition, the vendor has released a patch for some older versions.