{"answers":{"affected":"6 open source packages ship an affected version, including fast-copy.","exploited":"There is no known exploitation of GHSA-jggr-w7fw-pc2j in the wild and no public exploit code.","fix":"Upgrade fast-copy to a fixed version for your release line: 2.2.0, 3.1.0 or 4.1.0.","what":"GHSA-jggr-w7fw-pc2j is a denial of service vulnerability in fast-copy, published on 5 Oct 2026. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for GHSA-jggr-w7fw-pc2j and fix it if it is affected.\n\nWhat it is: GHSA-jggr-w7fw-pc2j is a denial of service vulnerability in fast-copy, published on 5 Oct 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of GHSA-jggr-w7fw-pc2j in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- fast-copy (npm): affected all versions; fixed in 2.2.0\n- fast-copy (npm): affected all versions; fixed in 2.2.0\n- fast-copy (npm): affected from 3.0.0; fixed in 3.1.0\n- fast-copy (npm): affected from 3.0.0; fixed in 3.1.0\n- fast-copy (npm): affected from 4.0.0; fixed in 4.1.0\n- fast-copy (npm): affected from 4.0.0; fixed in 4.1.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/GHSA-jggr-w7fw-pc2j/ (Markdown: https://insights.sbomify.com/GHSA-jggr-w7fw-pc2j/index.md)","id":"GHSA-jggr-w7fw-pc2j","markdown":"https://insights.sbomify.com/GHSA-jggr-w7fw-pc2j/index.md","name":"GHSA-jggr-w7fw-pc2j","record":{"aliases":[],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["denial_of_service"],"network_reachable":"yes","non_default_config":false,"product_category":"JavaScript utility library","requires_auth":"none","summary":"An attacker can cause a denial of service by providing deeply nested data to the fast-copy library, triggering a stack overflow error.","user_interaction":"not_required","vuln_class":"denial_of_service"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"## Summary\n\n`fast-copy` traverses values recursively with no bound on depth. Copying a sufficiently deeply-nested value exhausts the JavaScript call stack and throws a native `RangeError: Maximum call stack size exceeded` from inside the library.\n\n## Details\n\nBoth `copy` and `copyStrict` recurse once per level of nesting. The value does not need to be circular (circular references were already handled correctly via an internal cache) and it does not need to be large. A plain object nested a few thousand levels deep is only a few\nkilobytes of equivalent JSON.\n\nMeasured depths at which copying begins to fail (Node.js, V8; the exact ceiling varies with JIT state and the stack available to the environment):\n\n| Call                 | Last depth that copies successfully |\n| -------------------- | ----------------------------------- |\n| `copy(object)`       | 2811                                |\n| `copy(array)`        | 3983                                |\n| `copyStrict(object)` | 1874                                |\n| `copyStrict(array)`  | 1874                                |\n\n`JSON.parse` is iterative and parses deeply-nested input without difficulty, so a payload that deserializes cleanly can fail in a subsequent `copy` call.\n\n## Impact\n\nThe failure is a synchronous, catchable `RangeError` confined to the `copy` call that received the value. There are no memory safety concerns, no data exposure, and no effect on state outside that call. In a typical server the result is a failed request rather than a failed process.\n\nApplications that call `copy` on externally-supplied data, such as request bodies, cached payloads, merged configuration, etc., do not expect a clone helper to throw may surface this as an unhandled error.\n\n## Patches\n\nFixed in 4.1.0, and backported to 3.1.0 and 2.2.0 so that every major line has a patch available without requiring a breaking upgrade.\n\nTraversal is now bounded by a `maxDepth` option, defaulting to `1000`, which sits below the native limit in standard environments. Exceeding it throws `MaxDepthExceededError`, which carries the limit that was exceeded and extends `RangeError` so existing handling continues to match.\n\nThe limit is configurable for consumers with legitimately deep data. On `3.x` and `4.x` it is set when creating a copier:\n\n```js\nimport { createCopier } from 'fast-copy';\n\nexport const copy = createCopier({ maxDepth: 5000 });\n```\n\nOn `2.x` it is passed per call, and the error is a property of the exported function rather than a named export:\n\n```js\nimport copy from 'fast-copy';\n\ncopy(value, { maxDepth: 5000 });\n// detection: error instanceof copy.MaxDepthExceededError\n```\n\nIn legacy environments without `Object.setPrototypeOf`, `instanceof MaxDepthExceededError` cannot be supported; check `error.name === 'MaxDepthExceededError'` or `error instanceof RangeError` instead.","ecosystems":["npm"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"fast-copy: Stack exhaustion in fast-copy when copying deeply-nested values","id":"GHSA-jggr-w7fw-pc2j","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"npm","product":null,"products":[],"type":"denial_of_service","year":"2026"},"n_packages":6,"n_references":null,"packages":[{"ecosystem":"npm","fixed":["2.2.0"],"introduced":["0"],"last_affected":[],"package":"fast-copy","purl":null,"source":"GHSA-jggr-w7fw-pc2j"},{"ecosystem":"npm","fixed":["2.2.0"],"introduced":["0"],"last_affected":[],"package":"fast-copy","purl":"pkg:npm/fast-copy","source":"GHSA-jggr-w7fw-pc2j"},{"ecosystem":"npm","fixed":["3.1.0"],"introduced":["3.0.0"],"last_affected":[],"package":"fast-copy","purl":null,"source":"GHSA-jggr-w7fw-pc2j"},{"ecosystem":"npm","fixed":["3.1.0"],"introduced":["3.0.0"],"last_affected":[],"package":"fast-copy","purl":"pkg:npm/fast-copy","source":"GHSA-jggr-w7fw-pc2j"},{"ecosystem":"npm","fixed":["4.1.0"],"introduced":["4.0.0"],"last_affected":[],"package":"fast-copy","purl":null,"source":"GHSA-jggr-w7fw-pc2j"},{"ecosystem":"npm","fixed":["4.1.0"],"introduced":["4.0.0"],"last_affected":[],"package":"fast-copy","purl":"pkg:npm/fast-copy","source":"GHSA-jggr-w7fw-pc2j"}],"products":null,"published":"2026-10-05","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"An attacker can cause a denial of service by providing deeply nested data to the fast-copy library, triggering a stack overflow error.","url":"https://insights.sbomify.com/GHSA-jggr-w7fw-pc2j/"}