question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Block one more gadget type (mysql, CVE-2019-12086)

See original GitHub issue

A new gadget type (see https://medium.com/@cowtowncoder/on-jackson-cves-dont-panic-here-is-what-you-need-to-know-54cd0d6e8062) was reported, and CVE id allocated was CVE-2019-12086. CVE description is available at: https://nvd.nist.gov/vuln/detail/CVE-2019-12086 for full details, but the specific variation (in addition to needing “default typing”, attacker being able to craft specific json message) is that:

  • If service has jar mysql-connector-java in its classpath

vulnerability applies, and attacker is able to read arbitrary files from service’s local file system.

Original vulnerability discoverer: 618 from College of software, Nankai University


Fixed in:

  • 2.9.9 and later
  • 2.8.11.4
  • 2.7.9.6
  • 2.6.7.3

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
cowtowncodercommented, Jun 4, 2019

First of all: yes, that blog entry covers this CVE as well, there is nothing special (I’ll need to add more detail here).

Second: members of polymorphic types DO NOT automatically inherent polymorphic handling – so Object fields are not polymorphic by default unless either

  1. default typing is enabled (for category that includes java.lang.Object), or
  2. there is @JsonTypeInfo for that property

So neither of your cases is affected by any of these CVEs. In fact, even Test is fine unless there was a gadget class that extended this type (i.e. you managed to create a class that is subtype of Test and exposes a security vulnerability similar to types block-listed).

I hope this helps.

0reactions
MaximilianTewscommented, Jun 4, 2019

Hi @cowtowncoder,

I found this on the web https://medium.com/@cowtowncoder/on-jackson-cves-dont-panic-here-is-what-you-need-to-know-54cd0d6e8062 that seems written by you.

I am wondering if (3) under “What to do to Protect My System?” is also a valid protection against CVE-2019-12086. I assume it is. But I want to double check. If I read the description of the CVE (https://nvd.nist.gov/vuln/detail/CVE-2019-12086) it does not name (3) as a protection.

Also could you please tell me if classes with @JsonTypeInfo (or subclasses of them) with properties of type Object are affected if they are annotated with @JsonIgore? For example, would the following be vulnerable:

@JsonTypeInfo(...)
@JsonSubTypes(...)
class Test {
...
}
class SubTest extends Test {
   @JsonIgnore
   Object myObject
}

And my last question: would a class be vulnerable if the class does not have a property of type object directly but indirectly? I assume it is. But I want to double check. For example, would the following be vulnerable:

@JsonTypeInfo(...)
@JsonSubTypes(...)
class Test {
...
}

class SubTest extends Test {
   MyClass myClass;
}

class MyClass {
   Object test;
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

CVE-2019-12086
Description Tags Link Red Hat Customer Portal access.redhat.com text/html REDHAT RHSA‑2019:2935 Red Hat Customer Portal access.redhat.com text/html REDHAT RHSA‑2019:3050 Red Hat Customer Portal access.redhat.com text/html REDHAT...
Read more >
libjackson2-databind-java_2.9.8-3+deb10u3_all.deb
The Jackson Data Processor is a multi-purpose Java library for processing JSON. ... Add patch to fix: - CVE-2020-24616: Block one more gadget...
Read more >
14.16.2.1 Using InnoDB Transaction and Locking Information
Identifying Blocking Transactions. It is sometimes helpful to identify which transaction blocks another. The tables that contain information about InnoDB ...
Read more >
11.7 Data Type Storage Requirements
Despite differences in storage layout on disk, the internal MySQL APIs that communicate and exchange information about table rows use a consistent data ......
Read more >
MySQL 8.0 Reference Manual :: 8.11.4 Metadata Locking
If another session attempts a DDL or write lock operation on either table, it blocks until metadata lock release at transaction end. For...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found