man before 1.5l allows attackers to execute arbitrary code via a malformed man file with improper quotes, which causes the myxsprintf function to return a string with the value "unsafe," which is then executed as a program via a system call if it is in the search path of the user who runs man.
man-db 2.3.12 and 2.3.18 to 2.4.1 uses certain user-controlled DEFINE directives from the ~/.manpath file, even when running setuid, which could allow local users to gain privileges.
Multiple buffer overflows in man-db 2.4.1 and earlier, when installed setuid, allow local users to gain privileges via (1) MANDATORYMANPATH, MANPATHMAP, and MANDBMAP arguments to addtodirlist in manp.c, (2) a long pathname to ultsrc in ultsrc.c, (3) a long .so argument to testforinclude in ultsrc.c, (4) a long MANPATH environment variable, or (5) a long PATH environment variable.