Cacti 0.8.6e and earlier does not perform proper input validation to protect against common attacks, which allows remote attackers to execute arbitrary commands or SQL by sending a legitimate value in a POST request or cookie, then specifying the attack string in the URL, which causes the get_request_var function to return the wrong value in the $_REQUEST variable, which is cleansed while the original malicious $_GET value remains unmodified, as demonstrated in (1) graph_image.php and (2) graph.php.
https://exchange.xforce.ibmcloud.com/vulnerabilities/21270
https://exchange.xforce.ibmcloud.com/vulnerabilities/21266
http://www.vupen.com/english/advisories/2005/0951
http://www.securityfocus.com/bid/14129
http://www.securityfocus.com/bid/14128
http://www.securityfocus.com/archive/1/404054
http://www.securityfocus.com/archive/1/404047/30/30/threaded
http://www.hardened-php.net/advisory-042005.php
http://www.hardened-php.net/advisory-032005.php
http://www.debian.org/security/2005/dsa-764
http://www.cacti.net/downloads/patches/0.8.6e/cacti-0.8.6f_security.patch