Please visit the Cacti website at http://www.cacti.net/download_patches.php If any patch has been released, you will find installation instructions there.
As an example, please find patch installation instructions for cacti 0.8.8 here. Do not apply those patches to recent releases!
wget http://www.cacti.net/downloads/patches/0.8.8a/snmpv3_priv_proto_none.patch patch -p1 -N < snmpv3_priv_proto_none.patch
You might need to reapply file/folder security on the files patched. Double check they are correct.
Please pay attention not to break cacti when using SELinux or using NTFS file security. If you encounter
PHP Warning: include_once(./lib/html_tree.php) [<a href='function.include-once'>function.include-once</a>]: failed to open stream: Permission denied in /var/www/cacti/graphs.php on line 33, referer: http://localhost/cacti/graphs.php
or the like, it is very likely that your permissions are wrong.