Vulnerability · Published Mar 23, 2021 · Assigned by snyk
CVE-2021-23362Regular Expression Denial of Service (ReDoS)
Medium 5.3
In plain English
A medium-severity security flaw in hosted-git-info. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 3.6% (higher than 90% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Severity (CVSS 3.1)5.3Medium
Exploit odds (30 days)3.6%top 10.5% of all CVEs
Exploited in the wildNo reportsnot in CISA KEV
Attack toolingNoneno public tooling known
Official description
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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| AlmaLinux:8 | nodejs-nodemon | 2.0.3-1.module_el8.4.0+2521+c668cc9f | ALSA-2021:3073 |
| AlmaLinux:8 | nodejs-nodemon | 2.0.3-1.module_el8.4.0+2521+c668cc9f | ALSA-2021:3074 |
| AlmaLinux:8 | nodejs-packaging | 17-3.module_el8.4.0+2521+c668cc9f | ALSA-2021:3073 |
| AlmaLinux:8 | nodejs-packaging | 23-3.module_el8.5.0+254+b4526b16 | ALSA-2021:3074 |
| AlmaLinux:8 | nodejs-packaging | 23-3.module_el8.4.0+2522+3bd42762 | ALSA-2021:3074 |
| AlmaLinux:8 | nodejs-packaging | 17-3.module_el8.3.0+2023+d2377ea3 | ALSA-2021:3073 |
| AlmaLinux:8 | nodejs-packaging | 17-3.module_el8.4.0+2224+b07ac28e | ALSA-2021:3073 |
| Debian:12 | node-hosted-git-info | 3.0.8-1 | DEBIAN-CVE-2021-23362 |
| Debian:13 | node-hosted-git-info | 3.0.8-1 | DEBIAN-CVE-2021-23362 |
| Debian:14 | node-hosted-git-info | 3.0.8-1 | DEBIAN-CVE-2021-23362 |
| Rocky Linux:8 | nodejs | 1:14.17.3-2.module+el8.4.0+639+18660d0d | RLSA-2021:3074 |
| Rocky Linux:8 | nodejs | 1:12.22.3-2.module+el8.4.0+638+5344c6f7 | RLSA-2021:3073 |
| Rocky Linux:8 | nodejs-nodemon | 0:2.0.3-1.module+el8.3.0+100+234774f7 | RLSA-2021:3074 |
| Rocky Linux:8 | nodejs-nodemon | 0:2.0.3-1.module+el8.4.0+638+5344c6f7 | RLSA-2021:3074 |
| Rocky Linux:8 | nodejs-nodemon | 0:2.0.3-1.module+el8.4.0+638+5344c6f7 | RLSA-2021:3073 |
| Rocky Linux:8 | nodejs-nodemon | 0:2.0.3-1.module+el8.6.0+982+9fdca2d4 | RLSA-2021:3074 |
| Rocky Linux:8 | nodejs-nodemon | 0:2.0.3-1.module+el8.3.0+100+234774f7 | RLSA-2021:3073 |
| Rocky Linux:8 | nodejs-nodemon | 0:2.0.3-1.module+el8.6.0+982+9fdca2d4 | RLSA-2021:3073 |
| Rocky Linux:8 | nodejs-packaging | 0:23-3.module+el8.5.0+733+de4fee6c | RLSA-2021:3074 |
| Rocky Linux:8 | nodejs-packaging | 0:17-3.module+el8.3.0+101+f84c7154 | RLSA-2021:3073 |
| Rocky Linux:8 | nodejs-packaging | 0:23-3.module+el8.7.0+1071+4bdda2a8 | RLSA-2021:3074 |
| Rocky Linux:8 | nodejs-packaging | 0:23-3.module+el8.3.0+100+234774f7 | RLSA-2021:3074 |
| npm | hosted-git-info | 2.8.9 | GHSA-43f8-2h32-f4cj |
| npm | hosted-git-info | 3.0.8 | GHSA-43f8-2h32-f4cj |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| n/a | hosted-git-info | unspecified – before 3.0.8 |
References
- https://snyk.io/vuln/SNYK-JS-HOSTEDGITINFO-1088355 x_refsource_MISC
- https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-1088356 x_refsource_MISC
- https://github.com/npm/hosted-git-info/commit/bede0dc38e1785e732bf0a48ba6f81a4a908eba3 x_refsource_MISC
- https://github.com/npm/hosted-git-info/commits/v2 x_refsource_MISC
- https://github.com/npm/hosted-git-info/commit/29adfe5ef789784c861b2cdeb15051ec2ba651a7 x_refsource_MISC
- https://github.com/npm/hosted-git-info/commit/8d4b3697d79bcd89cdb36d1db165e3696c783a01 x_refsource_MISC
- https://cert-portal.siemens.com/productcert/pdf/ssa-389290.pdf x_refsource_CONFIRM