-
Notifications
You must be signed in to change notification settings - Fork 215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unbounded Recursion in Deserialization #458
Comments
I believe this is a high severity security issue (denial of service). The attack complexity is low, and the vector is network. Any application parsing untrusted user input would be vulnerable to it. https://nvd.nist.gov/vuln-metrics/cvss/v3-calculator?vector=AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H&version=3.1 In my case it's enough that the message size is of 2MB ( Given the popularity of this project, I would recommend the maintainers set up a security policy to allow for safe disclosure of similar issues in the future. https://github.com/ijl/orjson/security |
This issue has been assigned CVE-2024-27454. Thank you DavidBuchanan314 for the report 🙂. |
orjson does not limit its maximum recursion depth during deserialisation, so deserialising very deeply nested objects will overflow the native call stack. On my system (Fedora 39, aarch64), this results in a segfault. Python's native json module handles this slightly more gracefully.
orjson.dumps()
also appears to handle recursion limits gracefully, throwingTypeError: Recursion limit reached
(it would be nice if it threw aRecursionError
, though).The text was updated successfully, but these errors were encountered: