CVE-2020-13091: Command Execution Vulnerability in pandas

pandas Updated 02 Oct 2025

Summary

15/05/2020
Yes i
Unrated
Not published

CVE-2020-13091: DISPUTED pandas through 1.0.3 can unserialize and execute commands from an untrusted file that is passed to the read_pickle() function, if reduce makes an os.system call. Affects pandas versions < 1.0.4. Fixed in 1.0.4. How to fix ↓

Also tracked for

The same CVE-2020-13091 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 Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

Pandas is a popular open-source data manipulation and analysis library for Python. It provides data structures and functions to efficiently handle and process structured data. The library is widely used in various domains, including data science, finance, and research. However, pandas versions up to 1.0.3 are vulnerable to a command execution vulnerability when untrusted files are passed to the read_pickle() function.

Vulnerability Detail

The vulnerability, identified as CVE-2020-13091, allows an attacker to execute arbitrary commands by exploiting the deserialization process in pandas. If the reduce method of a serialized object makes an os.system call, an attacker can craft a malicious pickle file that triggers the execution of arbitrary commands when read using the read_pickle() function. It is important to note that the read_pickle() function is documented as unsafe, and it is the responsibility of the user to use it securely.

How To Fix

Minimum fixed version

1.0.4

This is the first release that contains the fix.

pip install --upgrade "pandas==1.0.4"

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

Workaround

As a workaround, users can avoid using the read_pickle() function with untrusted files. Instead, they should consider alternative methods for deserialization or ensure that the pickle files being read are from trusted sources and have not been tampered with.

Conclusion

In conclusion, pandas versions up to 1.0.3 are vulnerable to a command execution vulnerability when using the read_pickle() function with untrusted files. Users should update to pandas 1.0.4 or later to fix this issue. It is important to use the read_pickle() function securely and avoid deserializing untrusted pickle files. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for pandas →

Share this vulnerability

FAQ

Pandas is an open-source data manipulation and analysis library for Python, widely used in various domains for handling structured data.

The vulnerable function is read_pickle(), which is used for deserializing pickle files. It is important to use this function with caution and ensure the files being read are from trusted sources.

This vulnerability allows an attacker to execute arbitrary commands on the system if a malicious pickle file is passed to the read_pickle() function. It can lead to unauthorized access, data loss, or other malicious activities.

Yes, the vulnerability has been fixed in pandas version 1.0.4. Users are advised to update their pandas installation to the latest version to mitigate the risk.

As a workaround, users can avoid using the read_pickle() function with untrusted files. They should consider alternative deserialization methods or ensure the pickle files are from trusted sources.

Related vulnerabilities

Recent vulnerabilities recorded for pandas.

How To Fix

Minimum fixed version

1.0.4

This is the first release that contains the fix.

pip install --upgrade "pandas==1.0.4"

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