Medium
Security advisory
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.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2021-23362
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 31 Oct 2026, 11:40 UTC · Revision 1
Source evidence
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.
osv:CVE-2021-23362
Complete source record
{
"id": "b178a0f60bb326992aca6096ce0c6c0ab6f83eb0210a6f67e5716a95ab70f72e",
"url": "https://osv.dev/vulnerability/CVE-2021-23362",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "CVE-2021-23362",
"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.",
"evidence": "osv:CVE-2021-23362",
"products": [],
"severity": "medium",
"structured": {
"id": "CVE-2021-23362",
"aliases": [
"CVE-2021-23362",
"GHSA-43f8-2h32-f4cj"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/npm/hosted-git-info",
"type": "GIT",
"events": [
{
"introduced": "7aa49c01abeb96480dbb2c94b1967ffd03a2e460"
},
{
"fixed": "8d4b3697d79bcd89cdb36d1db165e3696c783a01"
},
{
"introduced": "64f0b645f52371b0680becafe7b200da8d3330ec"
},
{
"fixed": "a810463604a54af041223a1f69c80622b85fac90"
},
{
"fixed": "29adfe5ef789784c861b2cdeb15051ec2ba651a7"
},
{
"fixed": "bede0dc38e1785e732bf0a48ba6f81a4a908eba3"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:npmjs:hosted-git-info:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "2.0.0"
},
{
"fixed": "2.8.9"
}
],
"source": "CPE_RANGE"
},
{
"cpe": "cpe:2.3:a:npmjs:hosted-git-info:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "3.0.0"
},
{
"fixed": "3.0.8"
}
],
"source": "CPE_RANGE"
},
{
"range": [
{
"fixed": "29adfe5ef789784c861b2cdeb15051ec2ba651a7"
}
],
"source": "REFERENCES_COMMIT"
},
{
"range": [
{
"fixed": "8d4b3697d79bcd89cdb36d1db165e3696c783a01"
}
],
"source": "REFERENCES_COMMIT"
},
{
"range": [
{
"fixed": "bede0dc38e1785e732bf0a48ba6f81a4a908eba3"
}
],
"source": "REFERENCES_COMMIT"
}
]
}
}
],
"versions": [
"v2.8.8",
"v3.0.7",
"v3.0.6",
"v3.0.5",
"v3.0.4",
"v2.8.7",
"v3.0.3",
"v2.8.6",
"v3.0.2",
"v2.8.5",
"v3.0.1",
"v3.0.0",
"v2.8.4",
"v2.8.3",
"v2.8.2",
"v2.8.1",
"v2.8.0",
"v2.7.1",
"v2.7.0",
"v2.6.0",
"v2.5.0",
"v2.4.2",
"v2.4.1",
"v2.4.0",
"v2.3.1",
"v2.3.0",
"v2.2.0",
"v2.1.5",
"v2.1.4",
"v2.1.3",
"v2.1.2",
"v2.1.1",
"v2.1.0",
"v2.0.3",
"v2.0.2",
"v2.0.1",
"v2.0.0"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-23362.json"
}
}
],
"modified": "2026-10-20T10:54:32.278297143Z",
"provider": "osv",
"references": [
"https://cert-portal.siemens.com/productcert/pdf/ssa-389290.pdf",
"https://github.com/npm/hosted-git-info/commit/29adfe5ef789784c861b2cdeb15051ec2ba651a7",
"https://github.com/npm/hosted-git-info/commit/8d4b3697d79bcd89cdb36d1db165e3696c783a01",
"https://github.com/npm/hosted-git-info/commit/bede0dc38e1785e732bf0a48ba6f81a4a908eba3",
"https://github.com/npm/hosted-git-info/commits/v2",
"https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-1088356",
"https://snyk.io/vuln/SNYK-JS-HOSTEDGITINFO-1088355"
],
"provider_metadata": {
"unresolved_ranges": [
{
"cpes": [
"cpe:2.3:a:siemens:sinec_infrastructure_network_services:*:*:*:*:*:*:*:*"
],
"vendor_product": "siemens:sinec_infrastructure_network_services",
"extracted_events": [
{
"range": [
{
"fixed": "1.0.1.1"
}
],
"source": "CPE_RANGE"
}
]
}
]
}
},
"related_cves": [
{
"value": "CVE-2021-23362",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 385510,
"published_at": "2021-03-23T17:15:14.027+00:00"
}