How I earned a $7000 bug bounty from Grab (RCE Unique Bugs)
A Java deserialization flaw in the Jackson library, used by Grab's mobile apps, allowed an attacker to create arbitrary objects and execute code on the server. The author demonstrated remote code execution by making the server send a request to an external listener.
HackerOne user deboc0n submitted a report to Grab describing a CVE-2017–7525 on the Mobile Apps. Jackson RCE was listed as the “most serious web application security risk” Essentially, bugs resulting in this type of weakness allows attackers to remote code executions.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Context
Grab is a mobile app company, and the report concerns its Android mobile apps. The researcher, publishing as Deb0con (credited in the article as A.HU, Application Security Research), submitted a report to Grab describing CVE-2017-7525, a deserialisation flaw in the Jackson data-binding library for Java. Jackson serialises Java objects to JSON and back; when Default Typing is enabled, the JSON document can name the class of the object to be created. That is what turns a data-binding feature into a remote code execution primitive.
The article frames Jackson RCE as the most serious web application security risk and notes that this particular vulnerability got little attention and even less documentation, which is why the notes were published.
Setup
The tools used were:
- BeVigil, described as a free mobile application security testing tool and search engine that identifies vulnerabilities or secrets in apps.
- Burp Suite, for application security testing, including Burp Collaborator for out-of-band interaction.
- jadx, a Dex to Java decompiler with command line and GUI tools for producing Java source code from Android Dex and Apk files.
The precondition for the exploit is stated explicitly in the references: the user of the library must have enabled Default Typing (mapper.enableDefaultTyping). Without it the exploit does not work, because arbitrary objects cannot be created.
Finding it
The researcher distinguishes two ways Jackson is commonly used. The simplest and most common is binding to a single object, pulling values from the JSON and setting properties on the associated Java object. That pattern is simple, straightforward and likely not exploitable. A sample document of that type:
{ "name" : "Bob", "age" : 13, "other" : { "type" : "student" }}
The interesting case is different: sometimes arbitrary objects are created and their class name appears in the JSON document. Seeing that should raise an immediate red flag. A sample of that shape:
{ "@class":"MyApp.Obj", val:[ "java.lang.Long", 1 ]}
To confirm that the parser really is Jackson, one technique, when detailed error messages are available, is to supply invalid input and look for references to:
com.grabtaxi/sources/com/fasterxml/jackson/databind/ObjectMapper.java
Exploitation
Step 1: Discover candidate apps with BeVigil
- Open BeVigil and create an account.
- Scan your targets and wait for a response.
- The result is only a notice, not exploitation; the next steps reproduce the exploitation.


The screenshots show the BeVigil scan results described above.
Step 2: Understand the gadget constraints
Creating arbitrary objects has limitations. The most important is that Jackson requires a default constructor with no arguments, so obvious choices such as java.lang.ProcessBuilder are not an option. The article points to Moritz Bechler's paper for techniques; the technique pushed there, loading remote objects from another server, did not meet the researcher's needs. Other simple options exist.
The technique used leverages a well-known gadget to create an object that accepts compiled Java code via transletBytecodes and executes it as soon as outputProperties is accessed. That gives a simple, straightforward way to exploit the vulnerability.
Step 3: Build the payload
To prove execution, the goal is to have the server issue a GET request to Burp Collaborator. The sample code for this is shown in the article:

The code is compiled with the javac compiler, the resulting .class file is Base64 encoded, and the encoded value is supplied to the transletBytecodes field in the JSON document. As soon as the document is processed, the object is created, the code is loaded and it executes. Errors from code failing after execution, such as type mismatches, may still appear.
Step 4: Report and follow the timeline
The report was submitted to the Grab Security Team and moved through the following states:
| Date | Event |
|---|---|
| May 8th 2022 | Reported issue to Grab Security Team |
| May 18th 2022 | Status changed to Triaged, with "Nice Catch" validation |
| Jun 18 2022 | Status changed to Need More Information |
| July 07 2022 | Status changed to Need More Information (x2) |
| Augst 08 2022 | Rewarded deb0con with a $6,500 bounty and a $500 bonus |
| Augst 08 2022 | Full public disclosure pending |

Root cause
The flaw is in Jackson's handling of class names in JSON when Default Typing is enabled: the document can specify the class to instantiate, and a gadget class with a suitable default constructor can be combined with attacker-controlled data to reach code execution. In this case the gadget accepts compiled code through transletBytecodes and runs it when outputProperties is accessed.
Jackson has since been modified with a blacklist of types known to be useful gadgets for this kind of attack:
org.apache.commons.collections.functors.InvokerTransformerorg.apache.commons.collections.functors.InstantiateTransformerorg.apache.commons.collections4.functors.InvokerTransformerorg.apache.commons.collections4.functors.InstantiateTransformerorg.codehaus.groovy.runtime.ConvertedClosureorg.codehaus.groovy.runtime.MethodClosureorg.springframework.beans.factory.ObjectFactorycom.grabtaxi.org.apache.[redacted].xsltc.trax.TemplatesImplorg.apache.xalan.xsltc.trax.TemplatesImplcom.grabtaxi.rowset.JdbcRowSetImpljava.util.logging.FileHandlerjava.rmi.server.UnicastRemoteObjectorg.springframework.aop.support.AbstractBeanFactoryPointcutAdvisororg.springframework.beans.factory.config.PropertyPathFactoryBeancom.mchange.v2.c3p0.JndiRefForwardingDataSourcecom.mchange.v2.c3p0.WrapperConnectionPoolDataSource
The article notes that other types can likely be used in similar ways and have not become well known yet, so the blacklist does not eliminate the problem, it only makes it less likely.
Impact
An attacker who can reach a Jackson parser with Default Typing enabled may be able to create arbitrary objects and, through a suitable gadget, achieve remote code execution on the server. In this report the proof was a GET request from the server to Burp Collaborator. The exploit only works where Default Typing has been enabled; otherwise arbitrary object creation is not possible and the technique does not apply.
Fix
The article describes the blacklist added to Jackson as a partial mitigation, not a complete fix, and states that unknown gadget types may still exist. The precondition remains the application's own configuration: Default Typing must be enabled for the exploit to work.
Variants to test
- Look for JSON bodies that contain a class name field such as
@class, or arrays whose first element is a fully qualified Java class name. A positive result is a document shape like theMyApp.Objsample above. - Send invalid JSON to endpoints that may use Jackson and check whether error output references
ObjectMapper.javaor other Jackson classes. A positive result is a stack trace or error message naming the parser.
What happened, in plain words
A security researcher reported a way to make one of Grab's Android apps run code that the researcher chose, on Grab's own servers. Grab is a mobile app company, and the report concerns its Android mobile apps. The researcher published under the name Deb0con, credited in the article as A.HU, Application Security Research. The report was submitted to Grab and described CVE-2017-7525, a flaw in a piece of software called Jackson.
Jackson is a library for the Java programming language. A library is a bundle of ready-made code that many programs share, a bit like a set of kitchen utensils every restaurant buys instead of forging its own knives. Jackson's job is to translate between two worlds: Java objects (chunks of data inside a running program) and JSON (a plain text format for data, the kind of thing you see in a web page's background traffic). It does this in both directions, which is called serialisation (Java to JSON) and deserialisation (JSON back to Java).
Normally that translation is harmless. But Jackson has an optional setting called Default Typing. When that setting is on, the JSON text is allowed to name which Java class should be created. A class is a blueprint for an object, like a cookie cutter is a blueprint for a cookie. If the text can choose the cutter, an attacker can choose a cutter that does something dangerous when it is used. That is what turns a data-binding feature into a remote code execution primitive: remote code execution means running your own code on someone else's machine, and a primitive is a small building block you can chain into a bigger attack.
The article calls Jackson RCE the most serious web application security risk and notes that this particular vulnerability got little attention and even less documentation, which is why these notes were published.
The tools, and why each one is needed
Before touching anything, the researcher lists three tools. Each one answers a different question.
- BeVigil, described as a free mobile application security testing tool and search engine that identifies vulnerabilities or secrets in apps. Think of it as a search engine, but instead of indexing web pages it indexes what is inside mobile apps. It answers: which apps might be worth looking at?
- Burp Suite, for application security testing, including Burp Collaborator for out-of-band interaction. Burp sits between your browser and a website so you can read and change every request. Collaborator is a helper server that waits for a signal from somewhere else. It answers: did my code actually run on the target?
- jadx, a Dex to Java decompiler with command line and GUI tools for producing Java source code from Android Dex and Apk files. An APK is the installable file of an Android app, and Dex is the compiled format inside it. Decompiling means turning compiled code back into readable source code. It answers: what is this app actually built from?
There is one precondition, stated explicitly in the references: the user of the library must have enabled Default Typing (mapper.enableDefaultTyping). Without it the exploit does not work, because arbitrary objects cannot be created. In plain terms: the dangerous door is only open if the application's own developers opened it.
Finding it: two shapes of JSON
The researcher distinguishes two ways Jackson is commonly used. The simplest and most common is binding to a single object: pulling values from the JSON and setting properties on the associated Java object. That pattern is simple, straightforward and likely not exploitable. A sample document of that type:
{ "name" : "Bob", "age" : 13, "other" : { "type" : "student" }}
Line by line: the outer braces open one JSON object. "name" : "Bob" sets a field called name to the text Bob. "age" : 13 sets age to the number 13. "other" opens a nested object, and inside it "type" : "student" sets a field called type to the text student. The closing braces shut the nested object and then the outer one. Nothing here names a Java class, so the program decides what to build and the text only fills in values. That is why it is likely safe.
The interesting case is different: sometimes arbitrary objects are created and their class name appears in the JSON document. Seeing that should raise an immediate red flag. A sample of that shape:
{ "@class":"MyApp.Obj", val:[ "java.lang.Long", 1 ]}
Line by line: "@class" is the giveaway. The @class key tells Jackson which Java class to create, here MyApp.Obj. val is a field of that object, and its value is an array (a list in square brackets) whose first element is the text java.lang.Long, a Java class name, and whose second element is the number 1. So the document is not just carrying data, it is naming the type of the data as well. If an attacker controls that name, the attacker controls what gets built.
To confirm that the parser really is Jackson, one technique, when detailed error messages are available, is to supply invalid input and look for references to:
com.grabtaxi/sources/com/fasterxml/jackson/databind/ObjectMapper.java
Why this works: when a program crashes on bad input it often prints a stack trace, a list of the internal files involved. If that list mentions Jackson's ObjectMapper.java, you know which library is handling your input. The path shown here also contains com.grabtaxi, which points at the app's own package name.
Exploitation
Step 1: Discover candidate apps with BeVigil
- Open BeVigil and create an account.
- Scan your targets and wait for a response.
- The result is only a notice, not exploitation; the next steps reproduce the exploitation.


The screenshots show the BeVigil scan results described above. The point of this step is triage, not attack: you are narrowing a long list of apps down to the ones worth the effort of decompiling and testing.
Step 2: Understand the gadget constraints
Creating arbitrary objects has limitations. The most important is that Jackson requires a default constructor with no arguments, so obvious choices such as java.lang.ProcessBuilder are not an option. A constructor is the setup routine that runs when an object is created, and a default constructor takes no inputs. ProcessBuilder is the Java class you would normally use to start an operating system command, so it looks like the perfect target, but it cannot be built with no arguments, so Jackson cannot create it from a JSON document.
The article points to Moritz Bechler's paper for techniques. The technique pushed there, loading remote objects from another server, did not meet the researcher's needs. Other simple options exist.
The technique used leverages a well-known gadget. A gadget, in this context, is a class that already exists in the application and that does something useful to an attacker when it is created or used in a particular way. It is like finding that a household appliance in the building can be switched on remotely and will then do something unintended. Here the gadget creates an object that accepts compiled Java code via transletBytecodes and executes it as soon as outputProperties is accessed. transletBytecodes is a field holding compiled code, and outputProperties is a field whose mere reading triggers the run. That gives a simple, straightforward way to exploit the vulnerability.
Step 3: Build the payload
To prove execution, the goal is to have the server issue a GET request to Burp Collaborator. A GET request is the ordinary kind a browser makes when you open a page. If the server makes one to a machine you control, you have proof that your code ran there, because nothing else would have caused that request. The sample code for this is shown in the article:

The code is compiled with the javac compiler, the resulting .class file is Base64 encoded, and the encoded value is supplied to the transletBytecodes field in the JSON document. Base64 is a way of writing binary data using only ordinary text characters, so it can travel inside a JSON string without breaking it. As soon as the document is processed, the object is created, the code is loaded and it executes. Errors from code failing after execution, such as type mismatches, may still appear.
Step 4: Report and follow the timeline
The report was submitted to the Grab Security Team and moved through the following states:
| Date | Event |
|---|---|
| May 8th 2022 | Reported issue to Grab Security Team |
| May 18th 2022 | Status changed to Triaged, with "Nice Catch" validation |
| Jun 18 2022 | Status changed to Need More Information |
| July 07 2022 | Status changed to Need More Information (x2) |
| Augst 08 2022 | Rewarded deb0con with a $6,500 bounty and a $500 bonus |
| Augst 08 2022 | Full public disclosure pending |

Triaged means the security team accepted the report as real and worth working on. Need More Information means they asked for extra detail before going further, which is common and not a rejection. The bounty is the money paid for a valid report, and the bonus is an extra amount on top.
Root cause
The flaw is in how Jackson handles polymorphic types when Default Typing is enabled. Polymorphic means one field can hold objects of several different classes, and the JSON document is allowed to say which one. The document can specify the class to instantiate, and a gadget class with a suitable default constructor can be combined with attacker-controlled data to reach code execution. In this case the gadget accepts compiled code through transletBytecodes and runs it when outputProperties is accessed.
Jackson has since been modified with a blacklist of types known to be useful gadgets for this kind of attack. A blacklist is a list of names the program refuses to create, like a guest list at a door where the named people are turned away:
org.apache.commons.collections.functors.InvokerTransformerorg.apache.commons.collections.functors.InstantiateTransformerorg.apache.commons.collections4.functors.InvokerTransformerorg.apache.commons.collections4.functors.InstantiateTransformerorg.codehaus.groovy.runtime.ConvertedClosureorg.codehaus.groovy.runtime.MethodClosureorg.springframework.beans.factory.ObjectFactorycom.grabtaxi.org.apache.[redacted].xsltc.trax.TemplatesImplorg.apache.xalan.xsltc.trax.TemplatesImplcom.grabtaxi.rowset.JdbcRowSetImpljava.util.logging.FileHandlerjava.rmi.server.UnicastRemoteObjectorg.springframework.aop.support.AbstractBeanFactoryPointcutAdvisororg.springframework.beans.factory.config.PropertyPathFactoryBeancom.mchange.v2.c3p0.JndiRefForwardingDataSourcecom.mchange.v2.c3p0.WrapperConnectionPoolDataSource
The article notes that other types can likely be used in similar ways and have not become well known yet, so the blacklist does not eliminate the problem, it only makes it less likely. A blacklist only blocks what someone already thought of; it cannot block a gadget nobody has published yet.
Impact
An attacker who can reach a Jackson parser with Default Typing enabled may be able to create arbitrary objects and, through a suitable gadget, achieve remote code execution on the server. In this report the proof was a GET request from the server to Burp Collaborator. The exploit only works where Default Typing has been enabled; otherwise arbitrary object creation is not possible and the technique does not apply.
Fix
The article describes the blacklist added to Jackson as a partial mitigation, not a complete fix, and states that unknown gadget types may still exist. The precondition remains the application's own configuration: Default Typing must be enabled for the exploit to work. In everyday terms, the safest move is not to open the door at all, and the blacklist is a lock fitted to a door that is still there.
Variants to test
- Look for JSON bodies that contain a class name field such as
@class, or arrays whose first element is a fully qualified Java class name. A positive result is a document shape like theMyApp.Objsample above. A fully qualified name is the full path of the class, package included, so it cannot be confused with a class of the same short name elsewhere. - Send invalid JSON to endpoints that may use Jackson and check whether error output references
ObjectMapper.javaor other Jackson classes. A positive result is a stack trace or error message naming the parser. An endpoint is a specific address a program answers on, like a particular counter in a large building. - Out-of-band means the signal comes back through a different channel than the one you sent the attack on.
Glossary
- API: a defined way for one program to talk to another, like a service counter with set questions and answers.
- APK: the installable file format of an Android app.
- Base64: a way of writing binary data using only ordinary text characters so it can travel inside text such as JSON.
- BeVigil: a free mobile application security testing tool and search engine that identifies vulnerabilities or secrets in apps.
- Blacklist: a list of names a program refuses to accept.
- Bounty: money paid for a valid security report.
- Burp Collaborator: a helper server used to detect out-of-band interactions, proving that code ran somewhere else.
- Burp Suite: a tool for application security testing that lets you read and change web traffic.
- Class: a blueprint in Java from which objects are created.
- Constructor: the setup routine that runs when an object is created; a default constructor takes no arguments.
- CVE-2017-7525: the identifier of the Jackson deserialisation vulnerability described in the report.
- Default Typing: a Jackson setting that lets the JSON document name the Java class to create; the exploit only works when it is enabled.
- Deserialisation: turning stored or transmitted data back into objects inside a running program.
- Dex: the compiled code format inside an Android app.
- Endpoint: a specific address a program answers on.
- Gadget: an existing class in an application that does something useful to an attacker when created or used in a particular way.
- GET request: the ordinary request a browser makes when opening a page.
- Jackson: a Java library that converts Java objects to JSON and back.
- jadx: a Dex to Java decompiler that produces Java source code from Android Dex and Apk files.
- Java: a programming language and runtime in which Jackson and the gadget classes are written.
- javac: the Java compiler, which turns source code into a
.classfile. - JSON: a plain text format for structured data.
- Library: a bundle of ready-made code shared by many programs.
- Mitigation: a measure that reduces the risk without removing the underlying flaw.
- Object: a chunk of data inside a running program, created from a class.
- Out-of-band interaction: a signal that comes back through a different channel than the attack was sent on.
- Polymorphic type: a field that can hold objects of several different classes, with the document naming which one.
- Primitive: a small building block used to build a bigger attack.
- Remote code execution (RCE): running your own code on someone else's machine.
- Serialisation: turning objects inside a running program into stored or transmitted data.
- Stack trace: the list of internal files a program prints when it crashes.
- transletBytecodes: the field through which the gadget accepts compiled Java code.
- Triaged: a status meaning the security team accepted the report as real and worth working on.
- outputProperties: the field whose access triggers the gadget to run the supplied code.