/

CVE-2026-116580

Severity:

HIGH RISK

(7.3)

Unsafe Deserialization (CWE-502) in Seroval fromJSON

CVE-2026-116580

Deferred

Vulnerability type

Category:

Unsafe Deserialization

CWE:

CWE-502

Impact:

Plugin-dependent confidentiality, integrity, or availability impact

Severity:

HIGH RISK

(7.3)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Seroval versions before 1.6.8 contain an unsafe deserialization flaw in fromJSON when rebuilding asynchronous iterator structures from untrusted input. If an application plugin returns a callable value or an object with an on method, crafted serialized data may cause the deserializer to invoke that plugin-produced value, with confidentiality, integrity, or availability effects depending on the plugin.

Seroval versions before 1.6.8 contain an unsafe deserialization flaw in fromJSON when rebuilding asynchronous iterator structures from untrusted input. If an application plugin returns a callable value or an object with an on method, crafted serialized data may cause the deserializer to invoke that plugin-produced value, with confidentiality, integrity, or availability effects depending on the plugin.

Affected context

The issue occurs in applications that use Seroval to deserialize untrusted serialized values and expose application plugins capable of returning callable values or objects with an on method. Risk is increased when deserialization reconstructs asynchronous iterator-related objects before confirming that the referenced source is a genuine internal stream.

The issue occurs in applications that use Seroval to deserialize untrusted serialized values and expose application plugins capable of returning callable values or objects with an on method. Risk is increased when deserialization reconstructs asynchronous iterator-related objects before confirming that the referenced source is a genuine internal stream.

Exploit preconditions

  • Attack surface: Application code that passes attacker-controlled or otherwise untrusted data to Seroval fromJSON
  • Required access: The ability to supply or influence serialized Seroval input, plus access to a relevant application plugin
  • Trigger point: Deserialization of an asynchronous iterator factory instance
  • Why exploitation is possible: The deserializer may resolve a reused identifier to a plugin-produced callable value or object and invoke its on member without adequately verifying the expected internal stream type
  • Attack surface: Application code that passes attacker-controlled or otherwise untrusted data to Seroval fromJSON
  • Required access: The ability to supply or influence serialized Seroval input, plus access to a relevant application plugin
  • Trigger point: Deserialization of an asynchronous iterator factory instance
  • Why exploitation is possible: The deserializer may resolve a reused identifier to a plugin-produced callable value or object and invoke its on member without adequately verifying the expected internal stream type

Why this happens

The underlying bug is an incomplete validation of deserialized object references. While rebuilding an asynchronous iterator factory instance, fromJSON invokes source.on(listener) without establishing that source is a trusted internal stream implementation. This maps to CWE-502: Unsafe Deserialization, because untrusted serialized structure can influence object reconstruction and trigger behavior supplied by application-controlled plugin values.

The underlying bug is an incomplete validation of deserialized object references. While rebuilding an asynchronous iterator factory instance, fromJSON invokes source.on(listener) without establishing that source is a trusted internal stream implementation. This maps to CWE-502: Unsafe Deserialization, because untrusted serialized structure can influence object reconstruction and trigger behavior supplied by application-controlled plugin values.

Potential impact

  • Confidentiality loss may occur if a plugin-exposed operation reveals protected data
  • Integrity compromise could occur if the invoked behavior changes application state
  • Availability disruption may result from plugin behavior that consumes resources or raises repeated failures
  • Application-specific code execution may be possible when a plugin exposes a callable with security-sensitive behavior
  • Downstream services or users may be affected through compromised application state
  • Confidentiality loss may occur if a plugin-exposed operation reveals protected data
  • Integrity compromise could occur if the invoked behavior changes application state
  • Availability disruption may result from plugin behavior that consumes resources or raises repeated failures
  • Application-specific code execution may be possible when a plugin exposes a callable with security-sensitive behavior
  • Downstream services or users may be affected through compromised application state

General mitigation guidance

Mitigation generally focuses on reducing trust in serialized input and ensuring that deserialization cannot invoke arbitrary application-provided behavior.

Common defensive patterns include:

  • Use a maintained Seroval release containing the complete fix for this deserialization path
  • Restrict deserialization to data-only formats and narrowly defined schemas where possible
  • Validate object types, reference targets, and stream identities before invoking methods
  • Avoid exposing callable values or broadly capable objects through deserialization plugins
  • Apply allowlists for plugin return types and permitted operations
  • Run affected application components with least privilege and isolate sensitive plugin capabilities

Mitigation generally focuses on reducing trust in serialized input and ensuring that deserialization cannot invoke arbitrary application-provided behavior.

Common defensive patterns include:

  • Use a maintained Seroval release containing the complete fix for this deserialization path
  • Restrict deserialization to data-only formats and narrowly defined schemas where possible
  • Validate object types, reference targets, and stream identities before invoking methods
  • Avoid exposing callable values or broadly capable objects through deserialization plugins
  • Apply allowlists for plugin return types and permitted operations
  • Run affected application components with least privilege and isolate sensitive plugin capabilities

How teams detect issues like this

Organizations can look for:

  • Static analysis findings around deserialization of untrusted input and indirect method invocation
  • Code review signals where plugin return values are treated as trusted stream or iterator objects
  • Tests that exercise malformed references, reused identifiers, unexpected callable values, and objects exposing protocol-like methods
  • Dependency and policy checks that require approved Seroval versions and restrict unsafe plugin capabilities
  • Runtime telemetry for unusual plugin invocations, deserialization failures, or unexpected access to sensitive resources

Automated dependency scanning and security-focused code review tools can help identify affected usage patterns, but should be complemented by application-specific testing.

Organizations can look for:

  • Static analysis findings around deserialization of untrusted input and indirect method invocation
  • Code review signals where plugin return values are treated as trusted stream or iterator objects
  • Tests that exercise malformed references, reused identifiers, unexpected callable values, and objects exposing protocol-like methods
  • Dependency and policy checks that require approved Seroval versions and restrict unsafe plugin capabilities
  • Runtime telemetry for unusual plugin invocations, deserialization failures, or unexpected access to sensitive resources

Automated dependency scanning and security-focused code review tools can help identify affected usage patterns, but should be complemented by application-specific testing.

Sources

SourceLink
github.comgithub.com/lxsmnsyc/seroval/commit/3edc78b495ea0d6bd498143e5b3e56996607c5f2
github.comgithub.com/lxsmnsyc/seroval/commit/50926b3ee198fb757e6ce3aa70efeed38d931c8d
github.comgithub.com/lxsmnsyc/seroval/releases/tag/seroval@1.6.8
github.comgithub.com/lxsmnsyc/seroval/security/advisories/GHSA-7rv5-mrxv-xcr9

Frequently asked

questions

It can be exploitable through a remote or indirect input path when an application deserializes attacker-controlled Seroval data. The precise exposure depends on how serialized input reaches fromJSON and what capabilities the application plugin provides.

An attacker must generally be able to influence the serialized input and reach a deserialization operation associated with a suitable application plugin. No direct access to the host is necessarily required if the application exposes such a data-processing endpoint.

Use a release containing the complete fix, avoid deserializing untrusted data into behavior-bearing objects, and validate that reconstructed references are genuine internal stream types before invoking methods.

Keep deserialization data-only by default, strictly constrain plugin return values, apply schema and type checks before method dispatch, and test reference-handling logic with adversarial input.

It can be exploitable through a remote or indirect input path when an application deserializes attacker-controlled Seroval data. The precise exposure depends on how serialized input reaches fromJSON and what capabilities the application plugin provides.

An attacker must generally be able to influence the serialized input and reach a deserialization operation associated with a suitable application plugin. No direct access to the host is necessarily required if the application exposes such a data-processing endpoint.

Use a release containing the complete fix, avoid deserializing untrusted data into behavior-bearing objects, and validate that reconstructed references are genuine internal stream types before invoking methods.

Keep deserialization data-only by default, strictly constrain plugin return values, apply schema and type checks before method dispatch, and test reference-handling logic with adversarial input.

Find out what's already
exploitable in your codebase.