{"answers":{"affected":"2 open source packages ship an affected version, including cumulative-distribution-function. It affects 1 product.","exploited":"There is no known exploitation of CVE-2021-29486 in the wild and no public exploit code.","fix":"Upgrade cumulative-distribution-function to 2.0.0 or later.","what":"CVE-2021-29486 is a high-severity denial of service vulnerability in DrPaulBrewer cumulative-distribution-function, published on 30 Apr 2021. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2021-29486 and fix it if it is affected.\n\nWhat it is: CVE-2021-29486 is a high-severity denial of service vulnerability in DrPaulBrewer cumulative-distribution-function, published on 30 Apr 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2021-29486 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- cumulative-distribution-function (npm): affected all versions; fixed in 2.0.0\n- cumulative-distribution-function (npm): affected all versions; fixed in 2.0.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/CVE-2021-29486/ (Markdown: https://insights.sbomify.com/CVE-2021-29486/index.md)","id":"CVE-2021-29486","markdown":"https://insights.sbomify.com/CVE-2021-29486/index.md","name":"CVE-2021-29486","record":{"aliases":["GHSA-58qp-5328-v7mh"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["denial_of_service"],"network_reachable":"yes","non_default_config":false,"product_category":"npm statistical library","requires_auth":"none","summary":"An attacker can cause a denial of service via infinite loop by supplying string data to the cumulative-distribution-function library.","user_interaction":"not_required","vuln_class":"denial_of_service"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"cumulative-distribution-function","vendor":"cumulative-distribution-function_project"}],"cvss":{"score":7.5,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","version":"3.1"},"cwes":[{"id":"CWE-835","name":"Loop with Unreachable Exit Condition"},{"id":"CWE-20","name":"Improper Input Validation"}],"description":"cumulative-distribution-function is an open source npm library used which calculates statistical cumulative distribution function from data array of x values. In versions prior to 2.0.0 apps using this library on improper data may crash or go into an infinite-loop. In the case of a nodejs server-app using this library to act on invalid non-numeric data, the nodejs server may crash. This may affect other users of this server and/or require the server to be rebooted for proper operation. In the case of a browser app using this library to act on invalid non-numeric data, that browser may crash or lock up. A flaw enabling an infinite-loop was discovered in the code for evaluating the cumulative-distribution-function of input data. Although the documentation explains that numeric data is required, some users may confuse an array of strings like [\"1\",\"2\",\"3\",\"4\",\"5\"] for numeric data [1,2,3,4,5] when it is in fact string data. An infinite loop is possible when the cumulative-distribution-function is evaluated for a given point when the input data is string data rather than type `number`. This vulnerability enables an infinite-cpu-loop denial-of-service-attack on any app using npm:cumulative-distribution-function v1.0.3 or earlier if the attacker can supply malformed data to the library. The vulnerability could also manifest if a data source to be analyzed changes data type from Arrays of number (proper) to Arrays of string (invalid, but undetected by earlier version of the library). Users should upgrade to at least v2.0.0, or the latest version. Tests for several types of invalid data have been created, and version 2.0.0 has been tested to reject this invalid data by throwing a `TypeError()` instead of processing it. Developers using this library may wish to adjust their app's code slightly to better tolerate or handle this TypeError. Apps performing proper numeric data validation before sending data to this library should be mostly unaffected by this patch. The vulnerability can be mitigated in older versions by ensuring that only finite numeric data of type `Array[number]` or `number` is passed to `cumulative-distribution-function` and its `f(x)` function, respectively.","ecosystems":["npm"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"cumulative-distribution-function Infinite Loop vulnerability","id":"CVE-2021-29486","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"denial_of_service","year":"2021"},"n_packages":2,"n_references":4,"next":{"headline":"Authentication bypass in Octobercms","id":"CVE-2021-29487"},"packages":[{"ecosystem":"npm","fixed":["2.0.0"],"introduced":["0"],"last_affected":[],"package":"cumulative-distribution-function","purl":null,"source":"GHSA-58qp-5328-v7mh"},{"ecosystem":"npm","fixed":["2.0.0"],"introduced":["0"],"last_affected":[],"package":"cumulative-distribution-function","purl":"pkg:npm/cumulative-distribution-function","source":"GHSA-58qp-5328-v7mh"}],"prev":{"headline":"Remote Code Execution Vulnerability in Session Storage","id":"CVE-2021-29485"},"products":["cumulative-distribution-function"],"published":"2021-04-30","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2024-08-03","vendors":["DrPaulBrewer"]},"summary":"An attacker can cause a denial of service via infinite loop by supplying string data to the cumulative-distribution-function library.","url":"https://insights.sbomify.com/CVE-2021-29486/"}