CVE-2026-34043: Serialize javascript Denial of Service Vulnerability

MODERATE
Advisory Identifier: GHSA-qj8w-gfj5-8c6v
CVSS 5.9
CWE-834 CWE-400
Published
Advisory Summary

CVE-2026-34043 is a MODERATE (CVSS 5.9) denial of service vulnerability (CWE-834: Excessive Iteration) affecting Serialize javascript libraries in the npm ecosystem. The issue involves serialize javascript has cpu exhaustion denial of service via crafted array-like objects. Remediation is available by upgrading affected packages to version 7.0.5.

CVE-2026-34043 at a Glance

CVE Identifier CVE-2026-34043
GHSA Identifier GHSA-qj8w-gfj5-8c6v
Severity MODERATE
CVSS v3.1 Base Score 5.9
CWE Classification CWE-834: Excessive Iteration
Affected Product Serialize javascript
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 5.9

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2026-34043

To remediate this vulnerability, upgrade all affected Serialize javascript dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

serialize-javascript fixed: 7.0.5
npm install serialize-javascript@7.0.5
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls serialize-javascript

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-34043, inspect your project dependencies using npm:

npm ls serialize-javascript

Analyze the terminal output to locate any version of Serialize javascript in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 7.0.5), your application is affected.

Note: The npm ls serialize-javascript command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-834: Excessive Iteration, where the product performs an iteration or loop without sufficiently limiting the number of times that the loop is executed. In Serialize javascript, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact **What kind of vulnerability is it?** It is a **Denial of Service (DoS)** vulnerability caused by CPU exhaustion. When serializing a specially crafted "array-like" object (an object that inherits from `Array.prototype` but has a very large `length` property), the process enters an intensive loop that consumes 100% CPU and hangs indefinitely. **Who is impacted?** Applications that use `serialize-javascript` to serialize untrusted or user-controlled objects are at risk. While direct exploitation is difficult, it becomes a high-priority threat if the application is also vulnerable to **Prototype Pollution** or handles untrusted data via **YAML Deserialization**, as these could be used to inject the malicious object. ### Patches **Has the problem been patched?** Yes, the issue has been patched by replacing `instanceof Array` checks with `Array.isArray()` and using `Object.keys()` for sparse array detection. **What versions should users upgrade to?** Users should upgrade to **`v7.0.5`** or later. ### Workarounds **Is there a way for users to fix or remediate the vulnerability without upgrading?** There is no direct code-level workaround within the library itself. However, users can mitigate the risk by: * Validating and sanitizing all input before passing it to the `serialize()` function. * Ensuring the environment is protected against Prototype Pollution. * Upgrading to **`v7.0.5`** as soon as possible. ### Acknowledgements Serialize JavaScript thanks **Tomer Aberbach** (@TomerAberbach) for discovering and privately disclosing this issue.

CVE-2026-34043 Affected Serialize javascript Versions

1 component(s)
Fixed Versions:
7.0.5
Product / Package Ecosystem Affected Versions Fixed Version
serialize-javascript
npm
≥ 5.0.0
< 7.0.5
7.0.5

References

Frequently Asked Questions

What is CVE-2026-34043?
CVE-2026-34043 is a security vulnerability in Serialize javascript involving Serialize JavaScript has CPU Exhaustion Denial of Service via crafted array-like objects under CWE-834: Excessive Iteration.
Which Serialize javascript versions are affected?
Affected versions include releases prior to 7.0.5 across affected packages: serialize-javascript.
What version fixes CVE-2026-34043?
Upgrading to 7.0.5 (or the latest patched release for your respective branch) resolves the vulnerability.
Is serialize-javascript affected?
Yes, serialize-javascript is affected in releases prior to 7.0.5. Upgrade your dependency to 7.0.5 or later.
What is the CVSS score of CVE-2026-34043?
CVE-2026-34043 has a CVSS v3.1 base score of 5.9 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2026-34043?
CVE-2026-34043 is classified under CWE-834: Excessive Iteration (The product performs an iteration or loop without sufficiently limiting the number of times that the loop is executed.).
How can I check npm dependencies for CVE-2026-34043?
Run the dependency tree command: 'npm ls serialize-javascript'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-qj8w-gfj5-8c6v",
  "modified" : "2026-05-21T18:30:13Z",
  "published" : "2026-03-27T18:18:54Z",
  "aliases" : [ "CVE-2026-34043" ],
  "summary" : "Serialize JavaScript has CPU Exhaustion Denial of Service via crafted array-like objects",
  "details" : "### Impact\n\n**What kind of vulnerability is it?**\n\nIt is a **Denial of Service (DoS)** vulnerability caused by CPU exhaustion. When serializing a specially crafted \"array-like\" object (an object that inherits from `Array.prototype` but has a very large `length` property), the process enters an intensive loop that consumes 100% CPU and hangs indefinitely.\n\n**Who is impacted?**\n\nApplications that use `serialize-javascript` to serialize untrusted or user-controlled objects are at risk. While direct exploitation is difficult, it becomes a high-priority threat if the application is also vulnerable to **Prototype Pollution** or handles untrusted data via **YAML Deserialization**, as these could be used to inject the malicious object.\n\n### Patches\n\n**Has the problem been patched?**\n\nYes, the issue has been patched by replacing `instanceof Array` checks with `Array.isArray()` and using `Object.keys()` for sparse array detection.\n\n**What versions should users upgrade to?**\n\nUsers should upgrade to **`v7.0.5`** or later.\n\n### Workarounds\n\n**Is there a way for users to fix or remediate the vulnerability without upgrading?**\n\nThere is no direct code-level workaround within the library itself. However, users can mitigate the risk by:\n\n* Validating and sanitizing all input before passing it to the `serialize()` function.\n* Ensuring the environment is protected against Prototype Pollution.\n* Upgrading to **`v7.0.5`** as soon as possible.\n\n### Acknowledgements\n\nSerialize JavaScript thanks **Tomer Aberbach** (@TomerAberbach) for discovering and privately disclosing this issue.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "serialize-javascript"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.0.0"
      }, {
        "fixed" : "7.0.5"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/yahoo/serialize-javascript/security/advisories/GHSA-qj8w-gfj5-8c6v"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-34043"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/yahoo/serialize-javascript/commit/f147e90269b58bb6e539cfdf3d0e20d6ad14204b"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/yahoo/serialize-javascript"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/yahoo/serialize-javascript/releases/tag/v5.0.0"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/yahoo/serialize-javascript/releases/tag/v7.0.5"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-400", "CWE-834" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-03-27T18:18:54Z",
    "nvd_published_at" : "2026-03-31T03:15:58Z"
  }
}