You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Deserialization of Untrusted Data in com.jsoniter:jsoniter [CVE-2021-23441] #303
Description
All versions of package com.jsoniter:jsoniter are vulnerable to Deserialization of Untrusted Data via malicious JSON strings. This may lead to a Denial of Service, and in certain cases, code execution.
While code snippets from snyk.io look harmless there are can be some real vulnerabilities:
DoS attack that exploits O(n)^2 complexity of parsing some classes (where n is number of input characters) like BigInteger/BigDecimal;
DoS attack that exploits OutOfMemory errors during parsing of some classes like BitSets;
DoS attack that exploits StackOverflow errors during parsing of deeply nested JSON objects/arrays (or recursive classes);
RCE attack that exploits the ability to parse unregistered class by type discriminator from the input.
I don't know if any of them exists for json-iterator yet.
An acceptable solution for possible DoS attacks would be introducing some configurable limits (max number of digits, max bitset value, max level of nesting, etc.) with reasonable defaults.
Here and here are examples of how DoS vulnerabilities of json4s library were tested with jsoniter-scala harness.
@plokhotnyuk I don't see why any of that is problematic. It's ridiculous. There is no DoS or any vulnerability inside this pdf. It's just calling the setters. It's just what setters are for, it's the expected behaviour and I think all other json libs works exactly like this. Anything else would seem strange to me.
Also, regarding the "potential" vulnerabilities, isn't the role of a vulnerability report to proove that there is one, instead of "well, maybe there is something, no idea though, I haven't any working example".
It would be nice if they would actually provide some real DoS or RCE example instead of alarming the world with unfounded claims and pure speculations.
PS: I'm not affiliated with this project in any way ...it just popped up in one of my projects as dependency alarm
PS @plokhotnyuk : Thanks for the link ...it's a pity that such a "CVE" is published without even being reviewed.
Activity
dagnelies commentedon Oct 6, 2021
I just had a closer look at this CVE out of curiosity and I'm rather dumbfolded ...is it just me, or is it just plain nonsense?!
plokhotnyuk commentedon Oct 6, 2021
While code snippets from snyk.io look harmless there are can be some real vulnerabilities:
O(n)^2complexity of parsing some classes (wherenis number of input characters) like BigInteger/BigDecimal;I don't know if any of them exists for json-iterator yet.
An acceptable solution for possible DoS attacks would be introducing some configurable limits (max number of digits, max bitset value, max level of nesting, etc.) with reasonable defaults.
Here and here are examples of how DoS vulnerabilities of json4s library were tested with jsoniter-scala harness.
plokhotnyuk commentedon Oct 20, 2021
I found more detailed samples here
xsun12 commentedon Oct 26, 2021
@plokhotnyuk
Telegram is not accessible from my part of the world. Can someone copy the detailed samples here?
plokhotnyuk commentedon Oct 26, 2021
@xsun12 4_5960538858721381440.pdf
dagnelies commentedon Oct 26, 2021
@plokhotnyuk I don't see why any of that is problematic. It's ridiculous. There is no DoS or any vulnerability inside this pdf. It's just calling the setters. It's just what setters are for, it's the expected behaviour and I think all other json libs works exactly like this. Anything else would seem strange to me.
Also, regarding the "potential" vulnerabilities, isn't the role of a vulnerability report to proove that there is one, instead of "well, maybe there is something, no idea though, I haven't any working example".
dagnelies commentedon Oct 26, 2021
It would be nice if they would actually provide some real DoS or RCE example instead of alarming the world with unfounded claims and pure speculations.
PS: I'm not affiliated with this project in any way ...it just popped up in one of my projects as dependency alarm
PS @plokhotnyuk : Thanks for the link ...it's a pity that such a "CVE" is published without even being reviewed.