CVE-2026-34043: Serialize javascript Denial of Service Vulnerability
MODERATECVE-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
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).
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.
npm install serialize-javascript@7.0.5
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
CVE-2026-34043 Affected Serialize javascript Versions
1 component(s)| 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?
Which Serialize javascript versions are affected?
What version fixes CVE-2026-34043?
Is serialize-javascript affected?
What is the CVSS score of CVE-2026-34043?
What CWE is associated with CVE-2026-34043?
How can I check npm dependencies for CVE-2026-34043?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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"
}
}