The Xsession script, as used by X Display Manager (xdm) in NetBSD before 20060212, X.Org before 20060317, and Solaris 8 through 10 before 20061006, allows local users to overwrite arbitrary files, or read another user's Xsession errors file, via a symlink attack on a /tmp/xses-$USER file.
https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A2205
https://exchange.xforce.ibmcloud.com/vulnerabilities/29427
https://bugs.freedesktop.org/show_bug.cgi?id=5898
http://www.netbsd.org/cgi-bin/query-pr-single.pl?number=32805
http://support.avaya.com/elmodocs2/security/ASA-2006-250.htm
http://sunsolve.sun.com/search/document.do?assetkey=1-26-102652-1