fast-uri vulnerable to scheme injection via an unescaped first-segment colon in suffix referencesGHSA-333x-w4r6-6crp
LOWFix: fastify/fast-uri@39e6493GHSA-333x-w4r6-6crp is a low-severity (CVSS 3.7) CWE-41 vulnerability in fast-uri. A fix is available for fast-uri — see the affected versions and patch details below.
Exploitation Status
No confirmed exploitation observed yet
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for GHSA-333x-w4r6-6crp.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
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.
fast-urinpmDescription
Impact
fast-uri's serialize(), normalize(), and resolve(), when called with the non-default option reference: 'suffix' on a reference that has no authority, emit a relative reference whose first path segment contains a bare colon without escaping it. RFC 3986 section 3.3 requires the first segment of a path-noscheme reference not to contain a colon, precisely because a bare colon makes the string reparse as an absolute URI with a scheme. fast-uri's default serialization escapes that colon, but the suffix path does not.
For example, normalize('javascript:alert(1)', { reference: 'suffix' }) returns javascript:alert(1), which reparses as a live javascript: scheme; data: and vbscript: behave the same.
Applications that serialize or normalize a relative reference with reference: 'suffix' and then treat the result as a URI can turn inert input into a live javascript:, data:, or vbscript: URL (a cross-site scripting vector), and equal() can conflate a scheme-bearing reference with a relative one. Exposure is limited to applications that use the non-default reference: 'suffix' option.
Patches
Upgrade to fast-uri 2.4.8, 3.1.9, or 4.2.3.
Workarounds
Do not use the reference: 'suffix' option on untrusted input. If suffix output is required, percent-encode a colon in the first path segment of the result before treating it as a URI.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | fast-uri | all versions | 2.4.8npm install fast-uri@2.4.8 |
| 📦npm | fast-uri | ≥ 3.0.0&&< 3.1.9 | 3.1.9npm install fast-uri@3.1.9 |
| 📦npm | fast-uri | ≥ 4.0.0&&< 4.2.3 | 4.2.3npm install fast-uri@4.2.3 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for fast-uri, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update fast-uri to 2.4.8 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-333x-w4r6-6crp is resolved across your whole dependency graph.
Workarounds
Escape or sanitise the affected output on the server side rather than relying on client-side filtering, and add a Content-Security-Policy that blocks inline script execution so injected markup cannot run even if it reaches the page.
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.
This vulnerability is rated as having a Low impact because exploitation is constrained to applications invoking specific non-default parsing configurations on untrusted input without scheme authority. Across Red Hat products, this library is primarily embedded as an internal dependency within build pipelines and…
Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability.Source: Red Hat security advisory for GHSA-333x-w4r6-6crp (CC BY 4.0)
| Product | Fixed in | Advisory |
|---|---|---|
| Red Hat Hardened Images | grafana12-4-main-12.4.13-0.4.hum1 | RHSA-2026:90388 |
| Red Hat Hardened Images | grafana13-2-main-13.2.4-0.4.hum1 | RHSA-2026:90990 |
| Red Hat Hardened Images | grafana13-1-main-13.1.8-0.5.hum1 | RHSA-2026:91181 |
| Red Hat Hardened Images | grafana12-4-main-12.4.13-0.5.hum1 | RHSA-2026:91292 |
Frequently Asked Questions
Is GHSA-333x-w4r6-6crp in your dependencies?
Find it across npm, including transitive dependencies.