Malicious Code Injection in jsonschema-utf8 Package
Summary
MAL-2025-192436: Malicious code in jsonschema-utf8 (PyPI). Affects jsonschema-utf8 versions 4.1.0 – 4.1.2. No fix is published. How to fix ↓
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.
No signup required · Results in about 60 seconds
Background
The jsonschema-utf8 package is a Python library that is designed to provide JSON schema validation capabilities. It is a clone of the popular jsonschema package, which is widely used for validating JSON data structures against defined schemas. The jsonschema-utf8 package claims to offer additional features, but it has been identified as containing malicious code that compromises the security of applications using it.
Vulnerability Detail
The vulnerability originates from the jsonschema-utf8 package, which is a malicious clone of the legitimate jsonschema library. It includes an obfuscated compiled native library that is silently loaded during the import of the module. This behavior poses significant risks, including potential data theft or unauthorized access to sensitive information, as the exact functionality of the malicious code remains unknown. The package also employs techniques such as typosquatting and obfuscation to evade detection.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
pip uninstall jsonschema-utf8
If it arrived as a transitive dependency, remove the package that pulled it in, then reinstall.
Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →
Workaround
If you need to continue using the jsonschema-utf8 package temporarily, consider isolating its usage in a controlled environment and monitoring for any suspicious activity. However, the best practice is to remove it entirely and use the legitimate package.
Conclusion
The jsonschema-utf8 package poses a serious security threat due to its malicious code. Users are strongly advised to uninstall this package and switch to the legitimate jsonschema package to protect their applications from potential vulnerabilities.
See every vulnerability recorded for jsonschema-utf8 →
FAQ
jsonschema-utf8 is a malicious clone of the jsonschema package, designed for JSON schema validation in Python applications.
The malicious code can potentially steal sensitive information or allow unauthorized access to your application, compromising its security.
You can use Vulert to monitor and alert for open-source vulnerabilities in your software. Check your application against the vulnerability using the Vulert playground at Vulert Scanner.
Uninstall jsonschema-utf8 immediately and install the legitimate jsonschema package to ensure your application is secure.
Using malicious packages can lead to data breaches, loss of sensitive information, and potential legal ramifications due to compromised security.