CVE-2016-4000: Deserialization of Untrusted Data in Jython

org.python:jython-standalone Updated 02 Oct 2025

Summary

13/05/2022
Yes i
Critical
9.8

CVE-2016-4000: Deserialization of Untrusted Data in Jython. Affects org.python:jython-standalone versions < 2.7.1. Fixed in 2.7.1. How to fix ↓

Also tracked for

The same CVE-2016-4000 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 MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

Jython is an implementation of the Python programming language written in Java. It allows Python code to run on the Java Virtual Machine (JVM). Jython provides seamless integration with Java libraries and frameworks, making it a popular choice for developers who want to leverage both Python and Java in their projects. However, Jython versions before 2.7.1rc1 are vulnerable to a deserialization issue that can be exploited by attackers to execute arbitrary code. This vulnerability arises from a flaw in the handling of serialized PyFunction objects.

Vulnerability Detail

The vulnerability (CVE-2016-4000) in Jython allows attackers to execute arbitrary code by exploiting a deserialization issue. By crafting a malicious serialized PyFunction object, an attacker can trigger the execution of arbitrary code on a vulnerable system. This can lead to various consequences, including remote code execution, privilege escalation, and unauthorized access to sensitive information. The severity of this vulnerability is rated as CRITICAL with a CVSS score of 9.8.

How To Fix

Latest published version: 2.7.5b1 as of 23 Oct 2026

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

2.7.1

This is the first release that contains the fix.

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

Workaround

If upgrading to the latest version of Jython is not immediately feasible, a possible workaround is to implement input validation and sanitization mechanisms to prevent the deserialization of untrusted data. This can involve implementing custom deserialization logic or using a secure deserialization library that provides additional safeguards against deserialization vulnerabilities. However, it is important to note that workarounds may not provide complete protection and upgrading to the fixed version is the recommended solution.

Conclusion

In conclusion, the vulnerability (CVE-2016-4000) in Jython allows attackers to execute arbitrary code by exploiting a deserialization issue. To mitigate this vulnerability, it is crucial to upgrade to Jython version 2.7.1rc1 or later. Implementing input validation and sanitization mechanisms can serve as a temporary workaround, but upgrading to the fixed version is the recommended solution. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for org.python:jython-standalone →

Share this vulnerability

FAQ

Jython is an implementation of the Python programming language written in Java. It allows Python code to run on the Java Virtual Machine (JVM) and provides seamless integration with Java libraries and frameworks.

This vulnerability allows attackers to execute arbitrary code on a vulnerable system. This can lead to various consequences, including remote code execution, privilege escalation, and unauthorized access to sensitive information.

To fix this vulnerability, it is recommended to upgrade to Jython version 2.7.1rc1 or later. Update the Jython dependency in your project's Maven configuration file (pom.xml) to the latest version that includes the security patch.

If upgrading to the latest version of Jython is not immediately feasible, you can implement input validation and sanitization mechanisms to prevent the deserialization of untrusted data. However, it is important to note that workarounds may not provide complete protection.

This vulnerability is rated as CRITICAL with a CVSS score of 9.8, indicating its high severity and potential impact.

Related vulnerabilities

Recent vulnerabilities recorded for org.python:jython-standalone.

How To Fix

Latest published version: 2.7.5b1 as of 23 Oct 2026

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

2.7.1

This is the first release that contains the fix.

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