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
Jackson Deserializer security vulnerability via default typing (CVE-2017-7525) #1599
changed the title [-]Jackson Deserializer vulnerability, can execute any code or command[/-][+]Jackson Deserializer security vulnerability[/+]on Apr 11, 2017
I don't think blacklist is a good mechanism to prevent this issue, because there are other Java Deserialized Gadgets or ClassLoaders can arise this problem including com.sun.org.apache.xalan which is in your list.
Reacted by tr4nc3, cleverlzc, Philippe Arteau, Artem Vozhdayenko, Homaebic and Pear1y
I use jackson-databind 2.9.3 which depends on jackson-annotations 2.9.0, will this cause problems? Do I need to upgrade all jackson related jars to 2.9.3?
@fasterxml-travis No: jackson-annotations is quite special in that it only declares annotation types, and as a general rule there should be no differences at all between all 2.9.x versions (and same for all 2.x minor patches). In Jackson 3.x we will only have 3.0, 3.1 and so on, to remove this one source of confusion.
So: 2.9.0 is fine; 2.9.3 is also fine. They do not have code differences (*)
(*) For sake of completeness: there happens to be one actual packaging difference: 2.9.1 and above have Java 9 module declaration compiled in. Otherwise patches are identical.
Have you considered disabling this feature when the target field’s type is java.lang.Object, Comparable, etc.? That would quickly cut down the attack surface.
@swankjesse Unfortunately ability to use that base type is a big use case (equivalent of JDK serialization, with all the warts), so those can not really be blocked without breaking some of existing usage. Especially since library can not really determine if content is trusted or might come from untrusted source.
But I think adding a MapperFeature that would add such limits is indeed something that might make sense -- and making that feature enabled by default for 3.0.
That is the loose plan anyway, so that although it will be possible to allow unsafe (potentially unsafe) usage it should require bit more work. As things are one has to enable default typing (or unsafe base type for @JsonTypeInfo), but it is not obvious that there are security considerations.
There is also some related discussion on #1866 as well as at:
although I may not have added an issue for MapperFeature to perhaps add in 2.9 (which is against SemVer, but 2.9 is likely the last 2.x version so... may be lesser evil. Unless I'll change my mind and do 2.10 yet)
Does anyone know when CVE-2017-7525 is going to be published in the NVD? I see that it was created at least as early as July 16, here it is November 2 and it's still not published.
Hi @cowtowncoder , may I ask a off-topic question? When I try to following all the discussion above, I notice that you mention the cve-2017-7525 before it is published. Could you let me know how do you know it? (Do you guys already discuss it on other channels?)
@yiikou Whoever files an issue typically can see it before issue becomes publicly available -- and person filing usually sends email to a fasterxml dot com email (either mine, tatu, or general purpose info). This is usually where information comes from: CVE submitter is expected to contact the "vendor" (in this case, author(s) of the OSS package).
@yiikou Whoever files an issue typically can see it before issue becomes publicly available -- and person filing usually sends email to a fasterxml dot com email (either mine, tatu, or general purpose info). This is usually where information comes from: CVE submitter is expected to contact the "vendor" (in this case, author(s) of the OSS package).
Thank you for the explanation. I got your point: you are either a CVE submitter or member of the vendor team, right? And please allow me to ask an additional question, would you have any concern about discussing this vulnerability before it is disclosed? Since the potential attackers may notice this vulnerability before it is patched, and leverage it to exploit product.
@yiikou right. I am involved in discussions happening outside of public CVE stream.
As to discussions on issue tracker, it is bit of a balance: I usually do not include necessary details for reproduction for polymorphic type deserialization exploits (such as specific classes involved or properties/json used).
If we are talking about this particular issue (CVE-2017-7525), it was patched years ago so discussion would be fine.
Another source of information about exploit are actual block list additions; these do give some information on exploits themselves: not complete ones (since no reproduction is added as unit tests), but could be helpful for someone looking for reconstructing exploits.
I am not aware of any actual real-world exploits against Jackson, for what that is worth. That does not mean there has not been any, could just be that those are not published in general, or that if they are no one related to Jackson has been notified.
@yiikou right. I am involved in discussions happening outside of public CVE stream.
As to discussions on issue tracker, it is bit of a balance: I usually do not include necessary details for reproduction for polymorphic type deserialization exploits (such as specific classes involved or properties/json used).
If we are talking about this particular issue (CVE-2017-7525), it was patched years ago so discussion would be fine.
Another source of information about exploit are actual block list additions; these do give some information on exploits themselves: not complete ones (since no reproduction is added as unit tests), but could be helpful for someone looking for reconstructing exploits.
I am not aware of any actual real-world exploits against Jackson, for what that is worth. That does not mean there has not been any, could just be that those are not published in general, or that if they are no one related to Jackson has been notified.
Activity
[-]Jackson Deserializer vulnerability, can execute any code or command[/-][+]Jackson Deserializer security vulnerability[/+]cowtowncoder commentedon Apr 13, 2017
I have received this and am investigating possible patch. Problem is quite specific, but some aspects are more general.
Fix #1599 for 2.7(.10)
Fix #1599 for 2.8.9
cowtowncoder commentedon Apr 13, 2017
Fixed in 2.7, 2.8 and
master(to the best of my knowledge): will be in2.8.9and2.7.9.1, as well as2.9.0.pr3.Viyond commentedon Apr 17, 2017
nice~
ayound commentedon Apr 17, 2017
when do you want to release 2.7.10,2.8.9 and 2.9.0.pr3?
JoyChou93 commentedon Apr 17, 2017
when do you want to release 2.7.10,2.8.9 and 2.9.0.pr3?
OneSourceCat commentedon Apr 17, 2017
I don't think blacklist is a good mechanism to prevent this issue, because there are other Java Deserialized Gadgets or ClassLoaders can arise this problem including
com.sun.org.apache.xalanwhich is in your list.58 remaining items
fv3386 commentedon Dec 25, 2017
I use jackson-databind 2.9.3 which depends on jackson-annotations 2.9.0, will this cause problems? Do I need to upgrade all jackson related jars to 2.9.3?
cowtowncoder commentedon Dec 26, 2017
@fasterxml-travis No:
jackson-annotationsis quite special in that it only declares annotation types, and as a general rule there should be no differences at all between all2.9.xversions (and same for all 2.x minor patches). In Jackson 3.x we will only have3.0,3.1and so on, to remove this one source of confusion.So:
2.9.0is fine;2.9.3is also fine. They do not have code differences (*)(*) For sake of completeness: there happens to be one actual packaging difference: 2.9.1 and above have Java 9 module declaration compiled in. Otherwise patches are identical.
ksuresh8 commentedon Feb 1, 2018
does this vulnerability affect jackson-databind v2.3.3?
cowtowncoder commentedon Feb 1, 2018
@ksuresh8 yes. All 2.x versions not specifically included as having the fix will have it.
swankjesse commentedon Feb 14, 2018
Have you considered disabling this feature when the target field’s type is
java.lang.Object,Comparable, etc.? That would quickly cut down the attack surface.cowtowncoder commentedon Feb 14, 2018
@swankjesse Unfortunately ability to use that base type is a big use case (equivalent of JDK serialization, with all the warts), so those can not really be blocked without breaking some of existing usage. Especially since library can not really determine if content is trusted or might come from untrusted source.
But I think adding a
MapperFeaturethat would add such limits is indeed something that might make sense -- and making that feature enabled by default for 3.0.That is the loose plan anyway, so that although it will be possible to allow unsafe (potentially unsafe) usage it should require bit more work. As things are one has to enable default typing (or unsafe base type for
@JsonTypeInfo), but it is not obvious that there are security considerations.There is also some related discussion on #1866 as well as at:
FasterXML/jackson3-dev#21
although I may not have added an issue for
MapperFeatureto perhaps add in 2.9 (which is against SemVer, but 2.9 is likely the last 2.x version so... may be lesser evil. Unless I'll change my mind and do 2.10 yet)Update jackson-databind 2.7.9.1
cowtowncoder commentedon Feb 22, 2018
For further info: https://medium.com/@cowtowncoder/on-jackson-cves-dont-panic-here-is-what-you-need-to-know-54cd0d6e8062
Changed version of Jackson using bom 2.7.9 (see description for the r…
Update CVE id for #1599 in 2.8 release notes
yiikou commentedon Jul 9, 2021
Hi @cowtowncoder , may I ask a off-topic question? When I try to following all the discussion above, I notice that you mention the cve-2017-7525 before it is published. Could you let me know how do you know it? (Do you guys already discuss it on other channels?)
cowtowncoder commentedon Jul 9, 2021
@yiikou Whoever files an issue typically can see it before issue becomes publicly available -- and person filing usually sends email to a fasterxml dot com email (either mine,
tatu, or general purposeinfo). This is usually where information comes from: CVE submitter is expected to contact the "vendor" (in this case, author(s) of the OSS package).yiikou commentedon Jul 11, 2021
Thank you for the explanation. I got your point: you are either a CVE submitter or member of the vendor team, right? And please allow me to ask an additional question, would you have any concern about discussing this vulnerability before it is disclosed? Since the potential attackers may notice this vulnerability before it is patched, and leverage it to exploit product.
cowtowncoder commentedon Jul 11, 2021
@yiikou right. I am involved in discussions happening outside of public CVE stream.
As to discussions on issue tracker, it is bit of a balance: I usually do not include necessary details for reproduction for polymorphic type deserialization exploits (such as specific classes involved or properties/json used).
If we are talking about this particular issue (CVE-2017-7525), it was patched years ago so discussion would be fine.
Another source of information about exploit are actual block list additions; these do give some information on exploits themselves: not complete ones (since no reproduction is added as unit tests), but could be helpful for someone looking for reconstructing exploits.
I am not aware of any actual real-world exploits against Jackson, for what that is worth. That does not mean there has not been any, could just be that those are not published in general, or that if they are no one related to Jackson has been notified.
yiikou commentedon Jul 11, 2021
Thank you for the explanation, I appreciateit.