Summary
Seroval versions before 1.5.3 contain an unsafe deserialization flaw in fromJSON() that allows attacker-controlled Promise control nodes to interact with entries in the general deserialization reference table without sufficient type verification.
When plugins and downstream frameworks expose callable wrappers, this behavior may trigger unintended server-side operations and could result in remote code execution.
Affected context
The issue occurs in applications that use Seroval's fromJSON() deserialization functionality with attacker-influenced serialized input. Risk increases when plugins are enabled and downstream frameworks register callable wrappers or other executable objects in the deserialization reference table. Exploitation depends on the application accepting and processing crafted control nodes in a server-side deserialization path.
Exploit preconditions
- Attack surface: Server-side Seroval deserialization through
fromJSON() - Required access: Ability to supply or influence serialized JSON processed by the application
- Trigger point: Handling of attacker-controlled Promise control nodes during deserialization
- Required conditions: Relevant plugins or framework integrations must expose callable wrappers or other operable references
- Why exploitation is possible: The deserializer does not sufficiently verify that referenced entries are genuine internal Promise resolver records before operating on them
Why this happens
The vulnerability is caused by insufficient validation of internal object types and relationships during deserialization. Promise control nodes can access values from a general reference table without confirming that those values represent legitimate Promise resolver records.
This maps primarily to CWE-502: Deserialization of Untrusted Data, because attacker-controlled serialized data can influence object reconstruction and trigger deserialization side effects. It also relates to CWE-843: Access of Resource Using Incompatible Type, because values are treated as if they have a trusted internal type without adequate verification.
Potential impact
- An attacker may trigger unintended server-side function or wrapper invocation
- The application could execute operations with the privileges of the deserializing process
- Sensitive server-side data may be exposed or modified
- Application integrity could be compromised through plugin or framework callbacks
- Remote code execution could occur when callable wrappers expose dangerous functionality
- A compromised service could be used for lateral movement or further application compromise
General mitigation guidance
Mitigation generally focuses on making deserialization strictly data-only and reducing trust in serialized control structures.
Common defensive patterns include:
- Restricting deserialization to explicitly supported primitive and structural data types
- Validating Promise-related nodes against genuine internal records before any operation is performed
- Separating general reference tables from privileged or callable objects
- Avoiding registration of executable wrappers in data-deserialization contexts
- Treating plugin-provided deserialization hooks as untrusted extension points
- Applying least privilege to server processes that perform deserialization
- Enforcing input size, structure, and schema limits before parsing
- Keeping security-sensitive callbacks outside objects reachable from untrusted serialized data
How teams detect issues like this
Detection can focus on both the parser implementation and integrations that extend its behavior.
Useful approaches include:
- Static analysis for deserializers that reconstruct executable objects from untrusted input
- Code review checks for reference-table lookups without strict type or ownership validation
- Searches for Promise control-node handling that invokes or mutates referenced values
- Review of plugin APIs that expose callable wrappers to serialization or deserialization logic
- Runtime monitoring for unexpected server-side callback execution during input parsing
- Policy enforcement requiring schema validation and data-only serialization boundaries
- Automated security review tools that flag unsafe deserialization and type-confusion patterns

