Regular Expression Denial of Service in hosted-git-infoGHSA-43f8-2h32-f4cj
MEDIUMFix: npm/hosted-git-info#76GHSA-43f8-2h32-f4cj is a medium-severity (CVSS 5.3) CWE-1333 vulnerability in hosted-git-info. 2 public exploit references exist, so weaponization risk is real. A fix is available for hosted-git-info — see the affected versions and patch details below.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
GHSA-43f8-2h32-f4cj by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.
Where this sits among everything scored
Of 385,386 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.
Real-World Exposure
How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.
hosted-git-infonpmDescription
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
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | hosted-git-info | all versions | 2.8.9npm install hosted-git-info@2.8.9 |
| 📦npm | hosted-git-info | ≥ 3.0.0&&< 3.0.8 | 3.0.8npm install hosted-git-info@3.0.8 |
Affected Products
hosted-git-infonpmjssinec infrastructure network servicessiemensResearch use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for hosted-git-info, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update hosted-git-info to 2.8.9 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-43f8-2h32-f4cj is resolved across your whole dependency graph.
Workarounds
Cap what an attacker can consume: apply request size, rate and timeout limits in front of the affected component, and run it with memory and CPU limits so exhaustion degrades one worker rather than the whole service.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
While some components do package a vulnerable version of hosted-git-info, access to them requires OpenShift OAuth credentials and hence have been marked with a Low impact. This applies to the following products: - OpenShift Container Platform (OCP) - OpenShift ServiceMesh (OSSM) - Red Hat Advanced Cluster Management…
| Product | Fixed in | Advisory |
|---|---|---|
| Red Hat Enterprise Linux 8 | nodejs:12-8040020210708131418.522a0ee4 | RHSA-2021:3073 |
| Red Hat Enterprise Linux 8 | nodejs:14-8040020210708154809.522a0ee4 | RHSA-2021:3074 |
| Red Hat Enterprise Linux 8.1 Extended Update Support | nodejs:12-8010020210817113128.c27ad7f8 | RHSA-2021:3639 |
| Red Hat Enterprise Linux 8.2 Extended Update Support | nodejs:12-8020020210817125332.4cda2c84 | RHSA-2021:3638 |
| Red Hat OpenShift Container Platform 4.8 | openshift4/ose-console:v4.8.0-202107010336.p0.git.188a490.assembly.stream | RHSA-2021:2438 |
| Red Hat Software Collections for Red Hat Enterprise Linux 7 | rh-nodejs12-nodejs-0:12.22.2-1.el7 | RHSA-2021:2931 |
| Red Hat Software Collections for Red Hat Enterprise Linux 7 | rh-nodejs14-nodejs-0:14.17.2-1.el7 | RHSA-2021:2932 |
Frequently Asked Questions
Is GHSA-43f8-2h32-f4cj in your dependencies?
Find it across npm, including transitive dependencies.