Given the fact that today's world is inundated with PDF files in personals and business relationships, the danger of bad-intentioned activity within these what look-like innocent documents has risen drastically. A threat that has been significant to internet security for the past years is the known PDF malware. PDF malware presents a big problem because it can hide within the complicated makeup of PDF files. These files can contain many types of content, including text, images, text, and hidden objects. These complications give hackers more opportunities to hide their malicious code that bypasses traditional antivirus software. The objective of this chapter was to develop a classification-based machine learning algorithm for detecting PDF malware and it get succeeded with an impressive overall accuracy of 99.3% by using a random forest classifier This important achievement and the ability of machine learning algorithms to detect and neutralize threat-based PDFs is also highlighted in this chapter.