{"id":"CVE-2021-23362","aliases":["CVE-2021-23362","GHSA-43f8-2h32-f4cj"],"related":[],"kind":"vulnerability","state":"published","title":"Regular Expression Denial of Service (ReDoS)","summary":"The package hosted-git-info before 3.0.8 are vulnerable to Regular Expression Denial of Service (ReDoS) via regular expression shortcutMatch in the fromUrl function in index.js. The affected regular expression exhibits polynomial worst-case time complexity.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"The package hosted-git-info before 3.0.8 are vulnerable to Regular Expression Denial of Service (ReDoS) via regular expression shortcutMatch in the fromUrl function in index.js. The affected regular expression exhibits polynomial worst-case time complexity.","source":"cvelist"},{"lang":"en","text":"The npm package `hosted-git-info` before 3.0.8 are vulnerable to Regular Expression Denial of Service (ReDoS) via regular expression shortcutMatch in the fromUrl function in index.js. The affected regular expression exhibits polynomial worst-case time complexity","format":"markdown","source":"ghsa"},{"lang":"es","text":"El paquete hosted-git-info anterior a la versión 3.0.8 es vulnerable a la Denegación de Servicio por Expresión Regular (ReDoS) a través de la expresión regular shortcutMatch en la función fromUrl en index.js. La expresión regular afectada muestra una complejidad de tiempo polinómica en el peor de los casos","source":"nvd"}],"published":"2021-03-23T16:20:14.854Z","modified":"2026-06-17T03:38:37.500Z","severity":{"scorer":"snyk","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L/E:P/RL:O/RC:C","score":5.3,"rating":"MEDIUM"},"severities":[{"scorer":"snyk","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L/E:P/RL:O/RC:C","score":5.3,"rating":"MEDIUM"},{"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:L","score":5.3,"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:L","score":5.3,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:N/C:N/I:N/A:P","score":5,"rating":"MEDIUM"}],"cwes":["CWE-400","CWE-1333"],"affected":[{"ranges":[{"type":"custom","introduced":"unspecified","fixed":"3.0.8","status":"affected"}],"product":"hosted-git-info","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.8.9"}],"ecosystem":"npm","package":"hosted-git-info","purl":"pkg:npm/hosted-git-info","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"3.0.0","status":"affected","fixed":"3.0.8"}],"ecosystem":"npm","package":"hosted-git-info","purl":"pkg:npm/hosted-git-info","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"2.0.0","fixed":"2.8.9"},{"status":"affected","introduced":"3.0.0","fixed":"3.0.8"}],"vendor":"npmjs","product":"hosted-git-info","cpe":"cpe:2.3:a:npmjs:hosted-git-info:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","fixed":"1.0.1.1"}],"vendor":"siemens","product":"sinec_infrastructure_network_services","cpe":"cpe:2.3:a:siemens:sinec_infrastructure_network_services:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://snyk.io/vuln/SNYK-JS-HOSTEDGITINFO-1088355","tags":["exploit","patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-1088356","tags":["exploit","patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/npm/hosted-git-info/commit/bede0dc38e1785e732bf0a48ba6f81a4a908eba3","tags":["patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/npm/hosted-git-info/commits/v2","tags":["patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/npm/hosted-git-info/commit/29adfe5ef789784c861b2cdeb15051ec2ba651a7","tags":["patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/npm/hosted-git-info/commit/8d4b3697d79bcd89cdb36d1db165e3696c783a01","tags":["patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://cert-portal.siemens.com/productcert/pdf/ssa-389290.pdf","tags":["patch","third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-23362","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/npm/hosted-git-info/pull/76","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/npm/hosted-git-info","tags":["package"],"sources":["ghsa"]}],"credits":["Yeting Li"],"assigner":"snyk","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-23362","url":"https://www.cve.org/CVERecord?id=CVE-2021-23362","licence":"CVE Terms of Use","modified":"2024-09-17T03:02:03.337Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-43f8-2h32-f4cj","url":"https://github.com/advisories/GHSA-43f8-2h32-f4cj","licence":"CC-BY-4.0","modified":"2025-01-14T08:57:25.609Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-23362","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-23362","licence":"Public domain","modified":"2026-06-17T03:38:37.500Z"}],"updatedAt":"2026-11-25T22:58:00.395Z","epss":{"score":0.03612,"percentile":0.89778,"date":"2026-12-01T12:00:22.000Z"}}