connect.8x8.com: Deserialization Vulnerability in Automation Builder via Jint→Newtonsoft serializer coercion (TypeNameHandling)
An authenticated user could craft a JSON response that, when evaluated by the server-side template engine, coerced a JavaScript engine into constructing a JSON serializer with unsafe type handling. This allowed deserialization of arbitrary .NET types, potentially leading to remote code execution.
- Triaged in 6 hours
- Fixed in 20 hours
- Paid in 7 days
- Disclosed after 50 days
Summary by the program
@kyotozzx reported a deserialization vulnerability in the 8x8 Connect Automation Builder's HTTP request step. The vulnerability occurred when server-side template evaluation exposed Newtonsoft JSON objects directly to the Jint JavaScript engine. By providing a specially crafted JSON response, an authenticated user could coerce Jint's overload resolution to construct a JsonSerializer with attacker-controlled TypeNameHandling settings, enabling deserialization of arbitrary .NET types including System.Diagnostics.Process.
The issue was quickly addressed by projecting HTTP responses to plain JavaScript values (System.Dynamic.ExpandoObject) before template evaluation, removing all Newtonsoft object exposure from the template scope.
We thank @kyotozzx for submitting this report to us.
What the report shows
The target is the 8x8 Connect Automation Builder, specifically its HTTP request step. The researcher, @kyotozzx, reported a deserialisation vulnerability that arose when server-side template evaluation exposed Newtonsoft JSON objects directly to the Jint JavaScript engine.
The chain described in the report runs as follows:
- An authenticated user configures an HTTP request step in the Automation Builder.
- The step receives a JSON response that the user controls.
- The response is passed into server-side template evaluation, where Jint evaluates JavaScript and the Newtonsoft objects are present in the template scope.
- A crafted JSON response coerces Jint's overload resolution into constructing a
JsonSerializerwith attacker-controlledTypeNameHandlingsettings. - With
TypeNameHandlingunder attacker control, arbitrary .NET types can be deserialised, includingSystem.Diagnostics.Process.
The report does not include the request, the payload, or the response body that was used. It describes the mechanism only at the level above: the coercion happens through Jint's overload resolution, and the result is a serializer configured to honour type names embedded in the JSON.
The issue was addressed by projecting HTTP responses to plain JavaScript values (System.Dynamic.ExpandoObject) before template evaluation, removing Newtonsoft object exposure from the template scope. The platform records the report as critical, CVSS 9.9, weakness Deserialisation of Untrusted Data, with a bounty of 3,000 USD.
Root cause
The mistake the report points to is that the template scope contained live Newtonsoft objects rather than plain data. When a JavaScript engine such as Jint resolves an overloaded call, it inspects the runtime types of the arguments it is given. If one of those arguments is a Newtonsoft object, the engine can select a constructor or method overload that accepts a Newtonsoft type, and the attacker's JSON then supplies the property values for that object. In this case the selected overload was a JsonSerializer constructor, and the attacker-controlled property was TypeNameHandling.
Once TypeNameHandling is set to a value that honours $type metadata, the deserializer will instantiate whatever .NET type the JSON names. The report names System.Diagnostics.Process as an example of an arbitrary type that could be reached. The design flaw is that the template scope contained live Newtonsoft objects rather than plain values.
Impact
The report states that an authenticated user could deserialise arbitrary .NET types, including System.Diagnostics.Process. A process object can be configured to start an executable, which is the usual path to code execution on the server. The report does not describe what was actually executed, what privileges the process ran with, or what the server returned. The platform records the report as critical with CVSS 9.9.
The precondition is authentication: the attacker needs an authenticated account. That lowers the bar from unauthenticated to authenticated, but it does not reduce the impact once the step runs.
How this kind of bug works
Deserialisation bugs of this shape appear when a serializer is configured to read type information from the payload. In .NET, Newtonsoft's TypeNameHandling defaults to None; when it is set to Objects, Arrays, All or Auto, the serializer will look for a $type property and instantiate the named type. If the type is dangerous, or if a gadget chain exists in the loaded assemblies, the attacker can turn data into behaviour.
The Jint angle is a second layer. Jint is a JavaScript interpreter for .NET, and it resolves overloads by matching argument types. A host object placed in scope is visible to script code as an object with .NET members. If a script calls a function that has several overloads, one of which takes a serializer or a settings object, the attacker can steer the call by shaping the JSON that becomes the argument. This is why the fix was to project responses to ExpandoObject: a plain dynamic object has no .NET type metadata for the engine to latch onto, so overload resolution cannot be pushed towards a dangerous constructor.
The general lesson is that any boundary where untrusted data meets a runtime with reflection, overload resolution or type metadata is a potential coercion point. The defences are to keep untrusted data in plain structures, to disable type handling in serializers, and to constrain what the scripting engine can see.
How to test for it
Look for features where user-supplied data is evaluated by a template engine or scripting host: automation builders, workflow steps, webhook transformers, rule engines, report generators and expression fields. The HTTP request step in an automation is a strong candidate because the response body is attacker-controlled and is often fed straight into the next stage.
A practical method:
- Map the data flow. Identify where a response body, a form field or a stored value is passed into a template or expression evaluator.
- Send a benign marker and confirm it is evaluated rather than escaped. A value that changes the rendered output proves evaluation.
- Probe the type surface. Send JSON with unusual property names and observe error messages, stack traces or timing differences that reveal which runtime types are in scope.
- Test for type metadata handling by including a
$typeproperty in a JSON object and watching for a deserialisation error that names a .NET type. An error such as a type-load failure is a positive signal. - Escalate carefully within the program's rules, using a harmless type first, and stop at proof of type instantiation rather than executing anything.
A positive result looks like a server-side error that references a .NET type you supplied, or behaviour that changes based on a $type value. Common false positives are client-side evaluation, where the browser runs the template and the server never sees the payload; reflection of input that is escaped before rendering; and errors that come from JSON parsing rather than deserialisation. Confirm the evaluation happens server-side by checking whether the response differs when the request is replayed without a browser session.
How it is fixed
The standard fixes are layered:
- Project untrusted data to plain structures before it reaches the evaluator, as this report describes with
ExpandoObject. - Set
TypeNameHandlingtoNoneon every serializer that touches untrusted input, and avoidAuto. - Use a serialisation binder that allowlists permitted types if type metadata is genuinely required.
- Run template evaluation in a sandbox with a restricted scope, so host objects and reflection APIs are not reachable from script code.
- Apply least privilege to the process that runs automations, so a successful deserialisation has less to work with.
Hunting notes
This bug class tends to hide in features that combine three things: user-controlled input, a scripting or template layer, and a .NET or Java object model underneath. Automation and integration platforms are prime territory because they are built to transform data between systems. Recon signals include documentation that mentions expressions, templates, variables or scripting in a step; error pages that leak .NET type names; and features that accept JSON and return transformed output.
To get a report accepted, show the full path from an authenticated action to server-side evaluation, keep the proof minimal and non-destructive, and demonstrate that the type metadata you supplied was honoured. If you can show a harmless type being instantiated, that is usually enough to establish the vulnerability class without running commands on the target. Document the preconditions clearly, especially the authentication requirement, so the triager can reproduce it.
What happened, in plain words
8x8 Connect is a cloud communications platform. One of its features, the Automation Builder, lets a customer assemble a workflow out of steps: when something happens, do this, then do that. One of those steps is an HTTP request step, which makes a web request to a server of the customer's choosing and takes the reply back into the workflow. The researcher @kyotozzx found that this step could be abused to deserialise arbitrary .NET types, and the platform rated the report critical, CVSS 9.9, with a 3,000 USD bounty.
A few words first, because the rest depends on them.
- A request is a message a program sends to a server asking for something; the response is the server's reply. When you load a web page, your browser sends a request and the server sends back a response.
- JSON is a plain text format for structured data, made of names and values in curly braces, like
{"name": "value"}. It is the usual way two programs exchange data. - A template is text with placeholders that get filled in before the text is used, a bit like a mail merge letter where the name of the recipient is inserted. The Automation Builder evaluates templates on the server, so the placeholders can be filled with values from earlier steps.
- Deserialisation is turning text (such as JSON) back into live objects inside a program. The reverse, serialisation, is turning objects into text. Think of serialisation as writing down a recipe and deserialisation as cooking from it.
- A JavaScript engine is the part of a program that reads and runs JavaScript code. Jint is a JavaScript engine written for .NET, the software framework 8x8's service is built on.
- Newtonsoft is a widely used .NET library for converting between JSON and .NET objects.
The chain described in the report runs like this:
- A logged-in user sets up an HTTP request step in the Automation Builder.
- The step receives a JSON response that the user controls, because the user chose which server to call.
- That response is passed into server-side template evaluation, where Jint runs JavaScript and the Newtonsoft objects are present in the template scope.
- A crafted JSON response coerces Jint's overload resolution into constructing a
JsonSerializerwith attacker-controlledTypeNameHandlingsettings. - With
TypeNameHandlingunder the attacker's control, arbitrary .NET types can be deserialised, includingSystem.Diagnostics.Process.
Step 3 is where the design went wrong. The template engine was supposed to see plain values, the way a mail merge sees a name, but it was handed the deserializer's own internal objects instead. Those objects carry information about what .NET types they are, and Jint uses that information when it decides which version of a function to call. If a function exists in several versions (this is called overload resolution, choosing between variants that take different kinds of argument), Jint picks one by looking at the types of the arguments it was given. Because one argument was a Newtonsoft object, Jint could be steered into picking a variant that builds a JsonSerializer, and the attacker's JSON then supplied that serializer's settings.
TypeNameHandling is the setting that decides whether the deserializer trusts type names written inside the JSON. When it is set to honour them, the JSON can say "make an object of this .NET type" and the deserializer will do it. The report names System.Diagnostics.Process as an example of a type that could be reached. A process object is how a .NET program starts another program on the machine, so reaching it is the classic route to running commands on the server. The report does not describe what was actually executed, what privileges it ran with, or what the server returned.
The precondition is that the attacker needs an authenticated account. That is a lower bar than no login at all, but once the step runs, the impact is the same.
The issue was addressed by projecting HTTP responses to plain JavaScript values (System.Dynamic.ExpandoObject) before template evaluation, removing Newtonsoft object exposure from the template scope. In plain terms, the response is now copied into a simple container with no .NET type information attached, so Jint has nothing to latch onto and cannot be pushed towards a dangerous constructor.
In general, how this kind of bug works
Deserialisation bugs of this shape appear when a serializer is set up to read type information from the payload. In .NET, Newtonsoft's TypeNameHandling defaults to None; when it is set to Objects, Arrays, All or Auto, the serializer looks for a $type property in the JSON and creates the named type. If that type is dangerous, or if a chain of otherwise harmless types can be assembled into something dangerous (a gadget chain), the attacker turns data into behaviour.
The Jint angle is a second layer. Jint resolves overloads by matching argument types, and a host object placed in scope is visible to script code as an object with .NET members. If a script calls a function that has several overloads, one of which takes a serializer or a settings object, the attacker can steer the call by shaping the JSON that becomes the argument. This is why the fix was to project responses to ExpandoObject: a plain dynamic object has no .NET type metadata for the engine to latch onto.
The general lesson is that any boundary where untrusted data meets a runtime with reflection, overload resolution or type metadata is a potential coercion point. The defences are to keep untrusted data in plain structures, to disable type handling in serializers, and to constrain what the scripting engine can see.
How to test for it
Look for features where user-supplied data is evaluated by a template engine or scripting host: automation builders, workflow steps, webhook transformers, rule engines, report generators and expression fields. An HTTP request step in an automation is a strong candidate because the response body is attacker-controlled and is often fed straight into the next stage.
- Map the data flow. Identify where a response body, a form field or a stored value is passed into a template or expression evaluator.
- Send a benign marker and confirm it is evaluated rather than escaped. A value that changes the rendered output proves evaluation.
- Probe the type surface. Send JSON with unusual property names and observe error messages, stack traces or timing differences that reveal which runtime types are in scope.
- Test for type metadata handling by including a
$typeproperty in a JSON object and watching for a deserialisation error that names a .NET type. An error such as a type-load failure is a positive signal. - Escalate carefully within the program's rules, using a harmless type first, and stop at proof of type instantiation rather than executing anything.
A positive result looks like a server-side error that references a .NET type you supplied, or behaviour that changes based on a $type value. Common false positives are client-side evaluation, where the browser runs the template and the server never sees the payload; reflection of input that is escaped before rendering; and errors that come from JSON parsing rather than deserialisation. Confirm the evaluation happens server-side by checking whether the response differs when the request is replayed without a browser session.
How it is fixed
The standard fixes are layered:
- Project untrusted data to plain structures before it reaches the evaluator, as this report describes with
ExpandoObject. - Set
TypeNameHandlingtoNoneon every serializer that touches untrusted input, and avoidAuto. - Use a serialisation binder that allowlists permitted types if type metadata is genuinely required.
- Run template evaluation in a sandbox with a restricted scope, so host objects and reflection APIs are not reachable from script code.
- Apply least privilege to the process that runs automations, so a successful deserialisation has less to work with.
Hunting notes
This bug class tends to hide in features that combine three things: user-controlled input, a scripting or template layer, and a .NET or Java object model underneath. Automation and integration platforms are prime territory because they are built to transform data between systems. Recon signals include documentation that mentions expressions, templates, variables or scripting in a step; error pages that leak .NET type names; and features that accept JSON and return transformed output.
To get a report accepted, show the full path from an authenticated action to server-side evaluation, keep the proof minimal and non-destructive, and demonstrate that the type metadata you supplied was honoured. If you can show a harmless type being instantiated, that is usually enough to establish the vulnerability class without running commands on the target. Document the preconditions clearly, especially the authentication requirement, so the triager can reproduce it.
Glossary
- Request: a message a program sends to a server asking for something.
- Response: the server's reply to a request.
- JSON: a plain text format for structured data, made of names and values.
- Template: text with placeholders that are filled in before use.
- Template scope: the set of values and objects a template is allowed to see while it is evaluated.
- Serialisation: turning live objects into text.
- Deserialisation: turning text back into live objects inside a program.
- JavaScript engine: the part of a program that reads and runs JavaScript code.
- Jint: a JavaScript engine written for .NET.
- .NET: a software framework from Microsoft for building and running programs.
- Newtonsoft: a widely used .NET library for converting between JSON and .NET objects.
- Overload resolution: the process of choosing between several versions of a function that take different kinds of argument.
- JsonSerializer: the Newtonsoft object that performs serialisation and deserialisation.
- TypeNameHandling: a Newtonsoft setting that decides whether type names written inside JSON are trusted and used to create objects.
- $type: the JSON property that carries a type name when type handling is enabled.
- System.Diagnostics.Process: a .NET type that represents a running program and can be used to start one.
- System.Dynamic.ExpandoObject: a .NET container for plain named values that carries no type information.
- Gadget chain: a sequence of otherwise harmless types that, combined, produce a dangerous effect.
- Reflection: a program's ability to inspect and act on its own types at runtime.
- Sandbox: a restricted environment that limits what running code can reach.
- Least privilege: giving a process only the permissions it actually needs.
- Allowlist: a list of things that are explicitly permitted, with everything else refused.
- CVSS: a standard scoring system for the severity of a vulnerability.
- Remote code execution: running an attacker's commands on someone else's server.