CVE-2018-3774: Url parse Open Redirect Vulnerability

CRITICAL
Advisory Identifier: GHSA-pv4c-p2j5-38j4
CVSS 10.0
CWE-425
Published
Advisory Summary

CVE-2018-3774 is a CRITICAL (CVSS 10.0) open redirect vulnerability (CWE-425: Direct Request ('Forced Browsing')) affecting Url parse libraries in the npm ecosystem. The issue involves open redirect in url-parse. Remediation is available by upgrading affected packages to version 1.4.3.

CVE-2018-3774 at a Glance

CVE Identifier CVE-2018-3774
GHSA Identifier GHSA-pv4c-p2j5-38j4
Severity CRITICAL
CVSS v3.1 Base Score 10.0
CWE Classification CWE-425: Direct Request ('Forced Browsing')
Affected Product Url parse
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 10.0

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2018-3774

To remediate this vulnerability, upgrade all affected Url parse dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

url-parse fixed: 1.4.3
npm install url-parse@1.4.3
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls url-parse

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2018-3774, inspect your project dependencies using npm:

npm ls url-parse

Analyze the terminal output to locate any version of Url parse in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.4.3), your application is affected.

Note: The npm ls url-parse command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-425: Direct Request ('Forced Browsing'), where the web application does not adequately enforce appropriate authorization on all restricted urls, scripts, or files. In Url parse, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

Versions of `url-parse` before 1.4.3 returns the wrong hostname which could lead to Open Redirect, Server Side Request Forgery (SSRF), or Bypass Authentication Protocol vulnerabilities. ## Recommendation Update to version 1.4.3 or later.

CVE-2018-3774 Affected Url parse Versions

1 component(s)
Fixed Versions:
1.4.3
Product / Package Ecosystem Affected Versions Fixed Version
url-parse
npm
≥ 1.0.0
< 1.4.3
1.4.3

References

Frequently Asked Questions

What is CVE-2018-3774?
CVE-2018-3774 is a security vulnerability in Url parse involving Open Redirect in url-parse under CWE-425: Direct Request ('Forced Browsing').
Which Url parse versions are affected?
Affected versions include releases prior to 1.4.3 across affected packages: url-parse.
What version fixes CVE-2018-3774?
Upgrading to 1.4.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is url-parse affected?
Yes, url-parse is affected in releases prior to 1.4.3. Upgrade your dependency to 1.4.3 or later.
What is the CVSS score of CVE-2018-3774?
CVE-2018-3774 has a CVSS v3.1 base score of 10.0 (CRITICAL) with vector string CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H.
What CWE is associated with CVE-2018-3774?
CVE-2018-3774 is classified under CWE-425: Direct Request ('Forced Browsing') (The web application does not adequately enforce appropriate authorization on all restricted URLs, scripts, or files.).
How can I check npm dependencies for CVE-2018-3774?
Run the dependency tree command: 'npm ls url-parse'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-pv4c-p2j5-38j4",
  "modified" : "2026-01-23T20:10:56Z",
  "published" : "2018-08-13T15:02:15Z",
  "aliases" : [ "CVE-2018-3774" ],
  "summary" : "Open Redirect in url-parse",
  "details" : "Versions of `url-parse` before 1.4.3 returns the wrong hostname which could lead to Open Redirect, Server Side Request Forgery (SSRF), or Bypass Authentication Protocol vulnerabilities.\n\n\n## Recommendation\n\nUpdate to version 1.4.3 or later.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "url-parse"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.0.0"
      }, {
        "fixed" : "1.4.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2018-3774"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/unshiftio/url-parse/commit/209c296d302317268afbe19700a70c63ecbeb2d2"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/unshiftio/url-parse/commit/53b1794e54d0711ceb52505e0f74145270570d5a"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/unshiftio/url-parse/commit/d7b582ec1243e8024e60ac0b62d2569c939ef5de"
  }, {
    "type" : "WEB",
    "url" : "https://hackerone.com/reports/384029"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/unshiftio/url-parse"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/unshiftio/url-parse/compare/0.2.3...1.0.0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-425" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-06-16T21:50:04Z",
    "nvd_published_at" : null
  }
}