{"id":"CVE-2026-34043","aliases":["CVE-2026-34043","GHSA-qj8w-gfj5-8c6v"],"related":[],"kind":"vulnerability","state":"published","title":"Serialize JavaScript has CPU Exhaustion Denial of Service via crafted array-like objects","summary":"Serialize JavaScript to a superset of JSON that includes regular expressions and functions. Prior to version 7.0.5, there 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. This issue has been patched in version 7.0.5.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Serialize JavaScript to a superset of JSON that includes regular expressions and functions. Prior to version 7.0.5, there 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. This issue has been patched in version 7.0.5.","source":"cvelist"},{"lang":"en","text":"### 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.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Serializar JavaScript a un superconjunto de JSON que incluye expresiones regulares y funciones. Antes de la versión 7.0.5, existe una vulnerabilidad de denegación de servicio (DoS) causada por el agotamiento de la CPU. Al serializar un objeto 'similar a un array' especialmente diseñado (un objeto que hereda de Array.prototype pero tiene una propiedad 'length' muy grande), el proceso entra en un bucle intensivo que consume el 100% de la CPU y se cuelga indefinidamente. Este problema ha sido parcheado en la versión 7.0.5.","source":"nvd"}],"published":"2026-03-27T18:18:54.000Z","modified":"2026-09-10T03:50:40.557Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","score":5.9,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","score":5.9,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","score":5.9,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"}],"cwes":["CWE-400","CWE-834"],"affected":[{"ranges":[{"version":"< 7.0.5","status":"affected"}],"vendor":"yahoo","product":"serialize-javascript","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"5.0.0","status":"affected","fixed":"7.0.5"}],"ecosystem":"npm","package":"serialize-javascript","purl":"pkg:npm/serialize-javascript","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"7.0.5"}],"vendor":"yahoo","product":"serialize","cpe":"cpe:2.3:a:yahoo:serialize:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/yahoo/serialize-javascript/security/advisories/GHSA-qj8w-gfj5-8c6v","tags":["vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/yahoo/serialize-javascript/commit/f147e90269b58bb6e539cfdf3d0e20d6ad14204b","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/yahoo/serialize-javascript/releases/tag/v7.0.5","tags":["release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-34043","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/yahoo/serialize-javascript","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/yahoo/serialize-javascript/releases/tag/v5.0.0","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-03-31T13:55:44.694Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-34043","url":"https://www.cve.org/CVERecord?id=CVE-2026-34043","licence":"CVE Terms of Use","modified":"2026-03-31T13:55:54.998Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-qj8w-gfj5-8c6v","url":"https://github.com/advisories/GHSA-qj8w-gfj5-8c6v","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:40.557Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-34043","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-34043","licence":"Public domain","modified":"2026-06-17T10:38:28.740Z"}],"updatedAt":"2026-11-25T22:59:17.555Z","epss":{"score":0.00536,"percentile":0.46668,"date":"2026-12-01T12:00:22.000Z"}}