seroval

Ecosystem: npm

Downloads:

Vulnerabilities from the last (months)
  • 2CriticalAffects 2 versions
  • 9HighAffects 9 versions
  • 0MediumAffects 0 versions
  • 2ModerateAffects 3 versions
  • 0LowAffects 0 versions
Severity distribution (all time)
13vulnerabilities
  • Critical2 (15.4%)
  • High9 (69.2%)
  • Medium0 (0.0%)
  • Moderate2 (15.4%)
  • Low0 (0.0%)

Monthly breakdown

  • Critical
  • High
  • Medium
  • Moderate
  • Low
  • 7 vulnerabilities
    • Critical: 1
    • High: 4
    • Medium: 0
    • Moderate: 2
    • Low: 0
  • 1 vulnerabilities
    • Critical: 1
    • High: 0
    • Medium: 0
    • Moderate: 0
    • Low: 0
  • 5 vulnerabilities
    • Critical: 0
    • High: 5
    • Medium: 0
    • Moderate: 0
    • Low: 0

Vulnerabilities (13)

Known vulnerabilities affecting seroval, based on data from OSV.

Vulnerabilities affecting seroval
IDSeveritySummaryAffected versionsPublishedSource
GHSA-7rv5-mrxv-xcr9HighSeroval: Deserialization invokes attacker-chosen callables: AsyncIteratorFactoryInstance calls source.on(listener) without type check### Summary When `fromJSON` rebuilt an async iterator, it called `on()` on the iterator's source without checking that the source was a seroval stream. A crafted payload could pick another value as the source, such as a function returned by an application plugin. The deserializer then called that value's `on` method. This is a variant of GHSA-mv8w-475r-vwqw. That fix covered the promise and stream control nodes but not the async iterator node. ### Impact An application that passes untrusted input to `fromJSON` with plugins that return callable values can have those callables invoked during
  • < 1.6.8
GitHub (opens in a new tab)
GHSA-97r2-qh9m-474hHighSeroval: fromJSON deserializer trusts node-supplied array length and sequence doneAt (unauthenticated event-loop DoS)### Summary `fromJSON` and `fromCrossJSON` used two node fields without checking them. - An array node's element list was not checked to be an array. A small payload could set the length the decoder looped over. This part is also tracked in GHSA-wp97-x4hv-qvhp. - A sequence node's done index was not checked. A crafted value produced an iterator that never finished. ### Impact A service that passes untrusted input to `fromJSON` or `fromCrossJSON` can be made unavailable by an unauthenticated request. - The array case blocks the thread while the decoder runs. - The sequence case makes any c
  • < 1.6.8
GitHub (opens in a new tab)
GHSA-9wx9-5pv9-3349ModerateSeroval: Script injection through RegExp sources in serialized output### Summary seroval writes a `RegExp` as a regular expression literal. In affected versions, the `<` character in a `RegExp` source is written without escaping. A source built from untrusted input can then end the HTML `<script>` element that the serialized output is placed in, and run script in the page. ### Details seroval escapes `<` in strings, so string values cannot end a `<script>` element. `RegExp` sources did not get the same escaping: - Versions before 1.0.0 wrote the source as is. - Version 1.5.5 stopped escaping `<` in `RegExp` sources, so that named groups and lookbehinds keep
  • >= 1.5.5, < 1.6.10
  • < 1.0.0
GitHub (opens in a new tab)
GHSA-f86p-h4j2-7qgjModerateSeroval: Code injection through a typed array's own constructor property### Summary seroval writes a typed array as a call to its constructor. In affected versions, the constructor name in the output is read from a property that data on the value can replace, and it is written without checks. A typed array that received properties from untrusted data can then put arbitrary code into the serialized output. ### Details Version 1.6.0 changed how seroval finds the class of an object, so that objects with their own `constructor` property serialize correctly. Typed arrays still took the constructor name from the value itself, so the name could come from the untrusted
  • >= 1.6.0, < 1.6.11
GitHub (opens in a new tab)
GHSA-wp97-x4hv-qvhpHighSeroval `fromJSON`/`fromCrossJSON` denial of service via unvalidated array node length### Summary `fromJSON` and `fromCrossJSON` did not check that an array node's element list is an array. A small crafted payload could set the length the decoder used. That length controlled how much memory was allocated and how many times the decoder looped, and it did not depend on the size of the payload. ### Impact A service that passes untrusted input to `fromJSON` or `fromCrossJSON` can be made unavailable by an unauthenticated request. - A small payload can allocate enough memory to end the process. - A small payload can block the thread for seconds, or without end. This affects any
  • >= 1.4.1, < 1.6.8
GitHub (opens in a new tab)
GHSA-jp82-f5mq-hwhpHighSeroval: Memory exhaustion via unchecked TypedArray length in JSON deserialization# Summary deserializeTypedArray casts the source node to ArrayBuffer without checking it and never bounds the element count. Pass a plain object with a length property and it hits the array-like TypedArray constructor, allocating that many elements. The offset guard above it can't stop this: source.byteLength is undefined, so the comparison is always false. The length is one integer in the JSON, so a tiny payload can name any allocation size, and it runs synchronously inside fromJSON, starving the event loop instead of just slowing one request. fromCrossJSON is the same. Impact is unauthent
  • < 1.6.3
GitHub (opens in a new tab)
GHSA-p6vx-979v-rg4cCriticalSeroval: `fromJSON()` Promise thenable assimilation invokes plugin-produced callables (bypass of GHSA-mv8w-475r-vwqw)A fulfilled Promise node deserialized by `fromJSON()` can trigger unintended invocation of a plugin-produced callable through native ECMAScript thenable assimilation. This bypasses the type-confusion fix in `seroval@1.5.3` (GHSA-mv8w-475r-vwqw / CVE-2026-59940) and affects every plugin-capable release from `0.12.0` through the current `1.6.0`.
  • >= 0.12.0, < 1.6.2
GitHub (opens in a new tab)
GHSA-mv8w-475r-vwqwCriticalseroval: `seroval.fromJSON()` Promise resolver type confusion invokes attacker-controlled methods during deserialization## Summary A type confusion issue in `seroval.fromJSON()` allowed attacker-controlled JSON input to cause Promise control nodes to operate on values from the general deserialization reference table without first verifying that those values were genuine internal promise resolver records. In applications that deserialize untrusted Seroval JSON with plugins enabled, this could allow attacker-controlled deserialization side effects. In downstream server frameworks that register plugins returning callable wrappers, this primitive could become unintended server-side invocation and, depending on ex
  • < 1.5.3
GitHub (opens in a new tab)
GHSA-3j22-8qj3-26mxHighSeroval affected by Denial of Service via Deeply Nested ObjectsSerialization of objects with extreme depth can **exceed the maximum call stack limit**. **Mitigation**: `Seroval` introduces a `depthLimit` parameter in serialization/deserialization methods. **An error will be thrown if the depth limit is reached.**
  • < 1.4.1
GitHub (opens in a new tab)
GHSA-3rxj-6cgf-8cfwHighseroval Affected by Remote Code Execution via JSON DeserializationImproper input handling in the JSON deserialization component can lead to arbitrary JavaScript code execution. The vulnerability can be exploited via overriding constant value and error deserialization, which allows indirect access to unsafe JS evaluation. This requires at least the ability to perform 4 separate requests on the same function and partial knowledge of how the serialized data is used during later runtime processing. This vulnerability affects the `fromJSON` and `fromCrossJSON` functions in a client-to-server transmission scenario. No known workarounds or mitigations are known
  • < 1.4.1
GitHub (opens in a new tab)
  • GHSA-7rv5-mrxv-xcr9High
    Seroval: Deserialization invokes attacker-chosen callables: AsyncIteratorFactoryInstance calls source.on(listener) without type check
    • < 1.6.8

    ### Summary When `fromJSON` rebuilt an async iterator, it called `on()` on the iterator's source without checking that the source was a seroval stream. A crafted payload could pick another value as the source, such as a function returned by an application plugin. The deserializer then called that value's `on` method. This is a variant of GHSA-mv8w-475r-vwqw. That fix covered the promise and stream control nodes but not the async iterator node. ### Impact An application that passes untrusted input to `fromJSON` with plugins that return callable values can have those callables invoked during

    CVE: CVE-2026-116580

  • GHSA-97r2-qh9m-474hHigh
    Seroval: fromJSON deserializer trusts node-supplied array length and sequence doneAt (unauthenticated event-loop DoS)
    • < 1.6.8

    ### Summary `fromJSON` and `fromCrossJSON` used two node fields without checking them. - An array node's element list was not checked to be an array. A small payload could set the length the decoder looped over. This part is also tracked in GHSA-wp97-x4hv-qvhp. - A sequence node's done index was not checked. A crafted value produced an iterator that never finished. ### Impact A service that passes untrusted input to `fromJSON` or `fromCrossJSON` can be made unavailable by an unauthenticated request. - The array case blocks the thread while the decoder runs. - The sequence case makes any c

    CVE: CVE-2026-116581

  • GHSA-9wx9-5pv9-3349Moderate
    Seroval: Script injection through RegExp sources in serialized output
    • >= 1.5.5, < 1.6.10
    • < 1.0.0

    ### Summary seroval writes a `RegExp` as a regular expression literal. In affected versions, the `<` character in a `RegExp` source is written without escaping. A source built from untrusted input can then end the HTML `<script>` element that the serialized output is placed in, and run script in the page. ### Details seroval escapes `<` in strings, so string values cannot end a `<script>` element. `RegExp` sources did not get the same escaping: - Versions before 1.0.0 wrote the source as is. - Version 1.5.5 stopped escaping `<` in `RegExp` sources, so that named groups and lookbehinds keep

    CVE: CVE-2026-116582

  • GHSA-f86p-h4j2-7qgjModerate
    Seroval: Code injection through a typed array's own constructor property
    • >= 1.6.0, < 1.6.11

    ### Summary seroval writes a typed array as a call to its constructor. In affected versions, the constructor name in the output is read from a property that data on the value can replace, and it is written without checks. A typed array that received properties from untrusted data can then put arbitrary code into the serialized output. ### Details Version 1.6.0 changed how seroval finds the class of an object, so that objects with their own `constructor` property serialize correctly. Typed arrays still took the constructor name from the value itself, so the name could come from the untrusted

    CVE: CVE-2026-116583

  • GHSA-wp97-x4hv-qvhpHigh
    Seroval `fromJSON`/`fromCrossJSON` denial of service via unvalidated array node length
    • >= 1.4.1, < 1.6.8

    ### Summary `fromJSON` and `fromCrossJSON` did not check that an array node's element list is an array. A small crafted payload could set the length the decoder used. That length controlled how much memory was allocated and how many times the decoder looped, and it did not depend on the size of the payload. ### Impact A service that passes untrusted input to `fromJSON` or `fromCrossJSON` can be made unavailable by an unauthenticated request. - A small payload can allocate enough memory to end the process. - A small payload can block the thread for seconds, or without end. This affects any

    CVE: CVE-2026-116584

  • GHSA-jp82-f5mq-hwhpHigh
    Seroval: Memory exhaustion via unchecked TypedArray length in JSON deserialization
    • < 1.6.3

    # Summary deserializeTypedArray casts the source node to ArrayBuffer without checking it and never bounds the element count. Pass a plain object with a length property and it hits the array-like TypedArray constructor, allocating that many elements. The offset guard above it can't stop this: source.byteLength is undefined, so the comparison is always false. The length is one integer in the JSON, so a tiny payload can name any allocation size, and it runs synchronously inside fromJSON, starving the event loop instead of just slowing one request. fromCrossJSON is the same. Impact is unauthent

    CVE: CVE-2026-104845

  • GHSA-p6vx-979v-rg4cCritical
    Seroval: `fromJSON()` Promise thenable assimilation invokes plugin-produced callables (bypass of GHSA-mv8w-475r-vwqw)
    • >= 0.12.0, < 1.6.2

    A fulfilled Promise node deserialized by `fromJSON()` can trigger unintended invocation of a plugin-produced callable through native ECMAScript thenable assimilation. This bypasses the type-confusion fix in `seroval@1.5.3` (GHSA-mv8w-475r-vwqw / CVE-2026-59940) and affects every plugin-capable release from `0.12.0` through the current `1.6.0`.

    CVE: CVE-2026-104846

  • GHSA-mv8w-475r-vwqwCritical
    seroval: `seroval.fromJSON()` Promise resolver type confusion invokes attacker-controlled methods during deserialization
    • < 1.5.3

    ## Summary A type confusion issue in `seroval.fromJSON()` allowed attacker-controlled JSON input to cause Promise control nodes to operate on values from the general deserialization reference table without first verifying that those values were genuine internal promise resolver records. In applications that deserialize untrusted Seroval JSON with plugins enabled, this could allow attacker-controlled deserialization side effects. In downstream server frameworks that register plugins returning callable wrappers, this primitive could become unintended server-side invocation and, depending on ex

    CVE: CVE-2026-59940

  • GHSA-3j22-8qj3-26mxHigh
    Seroval affected by Denial of Service via Deeply Nested Objects
    • < 1.4.1

    Serialization of objects with extreme depth can **exceed the maximum call stack limit**. **Mitigation**: `Seroval` introduces a `depthLimit` parameter in serialization/deserialization methods. **An error will be thrown if the depth limit is reached.**

    CVE: CVE-2026-24006

  • GHSA-3rxj-6cgf-8cfwHigh
    seroval Affected by Remote Code Execution via JSON Deserialization
    • < 1.4.1

    Improper input handling in the JSON deserialization component can lead to arbitrary JavaScript code execution. The vulnerability can be exploited via overriding constant value and error deserialization, which allows indirect access to unsafe JS evaluation. This requires at least the ability to perform 4 separate requests on the same function and partial knowledge of how the serialized data is used during later runtime processing. This vulnerability affects the `fromJSON` and `fromCrossJSON` functions in a client-to-server transmission scenario. No known workarounds or mitigations are known

    CVE: CVE-2026-23737

Showing 1-10 of 13 vulnerabilities