GHSA-F86P-H4J2-7QGJ

Vulnerability from github – Published: 2026-10-28 21:17 – Updated: 2026-10-28 21:17
VLAI
Summary
Seroval: Code injection through a typed array's own constructor property
Details

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 property instead of the array's real type.

These functions are affected:

  • serialize, serializeAsync
  • crossSerialize, crossSerializeAsync, crossSerializeStream
  • the Serializer class
  • compileJSON

fromJSON and fromCrossJSON are not affected: they only accept the names of the built-in typed arrays. With the compactArrayBufferViews option, the same lookup throws a TypeError instead of writing code.

Impact

An application is affected only when it serializes a typed array that has an own constructor property set from untrusted data. That requires code that copies properties from untrusted objects onto a typed array. This is unusual, so the severity is rated Low, even though the result is script execution in the page that receives the output.

Patches

Fixed in 1.6.11. The constructor name now comes from the array's internal type, which properties on the value cannot change. compactArrayBufferViews uses the real type as well.

Workarounds

If you cannot upgrade, do not copy properties from untrusted objects onto typed arrays, or remove an own constructor property from a typed array before serializing it.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "npm",
        "name": "seroval"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "1.6.0"
            },
            {
              "fixed": "1.6.11"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-116583"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-79",
      "CWE-94"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-10-28T21:17:36Z",
    "nvd_published_at": "2026-10-26T21:18:16Z",
    "severity": "MODERATE"
  },
  "details": "### Summary\n\nseroval 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.\n\n### Details\n\nVersion 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 property instead of the array\u0027s real type.\n\nThese functions are affected:\n\n- `serialize`, `serializeAsync`\n- `crossSerialize`, `crossSerializeAsync`, `crossSerializeStream`\n- the `Serializer` class\n- `compileJSON`\n\n`fromJSON` and `fromCrossJSON` are not affected: they only accept the names of the built-in typed arrays. With the `compactArrayBufferViews` option, the same lookup throws a `TypeError` instead of writing code.\n\n### Impact\n\nAn application is affected only when it serializes a typed array that has an own `constructor` property set from untrusted data. That requires code that copies properties from untrusted objects onto a typed array. This is unusual, so the severity is rated Low, even though the result is script execution in the page that receives the output.\n\n### Patches\n\nFixed in 1.6.11. The constructor name now comes from the array\u0027s internal type, which properties on the value cannot change. `compactArrayBufferViews` uses the real type as well.\n\n### Workarounds\n\nIf you cannot upgrade, do not copy properties from untrusted objects onto typed arrays, or remove an own `constructor` property from a typed array before serializing it.",
  "id": "GHSA-f86p-h4j2-7qgj",
  "modified": "2026-10-28T21:17:36Z",
  "published": "2026-10-28T21:17:36Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/lxsmnsyc/seroval/security/advisories/GHSA-f86p-h4j2-7qgj"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-116583"
    },
    {
      "type": "WEB",
      "url": "https://github.com/lxsmnsyc/seroval/commit/1313ebbad9687bc0245e08bfd576376e57e0e5c1"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/lxsmnsyc/seroval"
    },
    {
      "type": "WEB",
      "url": "https://github.com/lxsmnsyc/seroval/releases/tag/seroval@1.6.11"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:P/VC:N/VI:N/VA:N/SC:H/SI:H/SA:N",
      "type": "CVSS_V4"
    }
  ],
  "summary": "Seroval: Code injection through a typed array\u0027s own constructor property"
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline

Sightings and recorded dates, grouped by day · UTC

JSON
Events included in the timeline

Loading timeline…


    Loading…

    Loading…

    Loading…

    Related by attack behaviour

    Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.