CVE-2019-18874: Double Free Vulnerability in psutil

psutil Updated 02 Oct 2025

Summary

12/11/2019
Yes i
High
7.5

CVE-2019-18874: psutil (aka python-psutil) through 5.6.5 can have a double free. Affects psutil versions < 5.6.6. Fixed in 5.6.6. How to fix ↓

Also tracked for

The same CVE-2019-18874 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

psutil (aka python-psutil) is a Python library used for retrieving information on running processes and system utilization. It provides an interface to various system and process-related functionalities. The library is widely used in Python applications for monitoring system resources and managing processes. However, psutil versions up to 5.6.5 are vulnerable to a double free vulnerability.

Vulnerability Detail

The double free vulnerability in psutil occurs due to refcount mishandling within a while or for loop that converts system data into a Python object. This vulnerability can be exploited by an attacker to cause a denial of service or potentially execute arbitrary code. By carefully crafting a malicious input, an attacker can trigger the double free condition, leading to memory corruption and potentially allowing them to gain control over the affected system.

How To Fix

Minimum fixed version

5.6.6

This is the first release that contains the fix.

pip install --upgrade "psutil==5.6.6"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There is no known workaround for this vulnerability. It is strongly advised to upgrade to the latest version of psutil to mitigate the risk.

Conclusion

The double free vulnerability in psutil can have serious consequences, including denial of service and potential code execution. It is crucial to upgrade to the latest version of psutil (5.6.6 or later) to mitigate the risk. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for psutil →

Share this vulnerability

FAQ

psutil is a Python library used for retrieving information on running processes and system utilization. It provides an interface to various system and process-related functionalities.

A double free vulnerability is a memory corruption issue that occurs when a program attempts to free the same memory block twice. This can lead to memory corruption, crashes, or potentially allow an attacker to execute arbitrary code.

The double free vulnerability in psutil can be exploited by an attacker to cause a denial of service or potentially execute arbitrary code. By carefully crafting a malicious input, an attacker can trigger the double free condition, leading to memory corruption and potentially allowing them to gain control over the affected system.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability. Vulert monitors and alerts in real-time for open-source vulnerabilities in software using just the Pipfile.lock file.

How To Fix

Minimum fixed version

5.6.6

This is the first release that contains the fix.

pip install --upgrade "psutil==5.6.6"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback