CVE-2017-9303: Laravel/laravel Laravel Does Not Properly Constrain Vulnerability

MODERATE
Advisory Identifier: GHSA-rc8x-jrrc-frfv
CVSS 6.1
CWE-20
Published
Advisory Summary

CVE-2017-9303 is a MODERATE (CVSS 6.1) laravel does not properly constrain vulnerability (CWE-20: Improper Input Validation) affecting Laravel/laravel libraries in the Packagist ecosystem. The issue involves laravel does not properly constrain the host portion of a password-reset url. Remediation is available by upgrading affected packages to version 5.4.22.

CVE-2017-9303 at a Glance

CVE Identifier CVE-2017-9303
GHSA Identifier GHSA-rc8x-jrrc-frfv
Severity MODERATE
CVSS v3.1 Base Score 6.1
CWE Classification CWE-20: Improper Input Validation
Affected Product Laravel/laravel
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 6.1

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:R/S:C/C:L/I:L/A:N).

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

How to Fix CVE-2017-9303

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

laravel/laravel fixed: 5.4.22
Upgrade laravel/laravel to 5.4.22
illuminate/auth fixed: Latest secure release
Upgrade illuminate/auth to Latest secure release
illuminate/auth fixed: 5.4.22
Upgrade illuminate/auth to 5.4.22
laravel/framework fixed: Latest secure release
Upgrade laravel/framework to Latest secure release
laravel/framework fixed: 5.4.22
Upgrade laravel/framework to 5.4.22
Verify Direct and Transitive Dependencies

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

inspect dependencies for laravel/laravel

How to Check if You Are Affected

To determine whether your application is affected by CVE-2017-9303, inspect your project dependencies for Laravel/laravel:

inspect dependencies for laravel/laravel

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

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-20: Improper Input Validation, where the product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. In Laravel/laravel, 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

Laravel 5.4.x before 5.4.22 does not properly constrain the host portion of a password-reset URL, which makes it easier for remote attackers to conduct phishing attacks by specifying an attacker-controlled host.

CVE-2017-9303 Affected Laravel/laravel Versions

5 component(s)
Fixed Versions:
5.4.22
Product / Package Ecosystem Affected Versions Fixed Version
laravel/laravel
Packagist
≥ 5.4.0
< 5.4.22
5.4.22
illuminate/auth
Packagist
≥ 5.3.0
≤ 5.3.31
illuminate/auth
Packagist
≥ 5.4.0
< 5.4.22
5.4.22
laravel/framework
Packagist
≥ 5.3.0
≤ 5.3.31
laravel/framework
Packagist
≥ 5.4.0
< 5.4.22
5.4.22

References

Frequently Asked Questions

What is CVE-2017-9303?
CVE-2017-9303 is a security vulnerability in Laravel/laravel involving Laravel does not properly constrain the host portion of a password-reset URL under CWE-20: Improper Input Validation.
Which Laravel/laravel versions are affected?
Affected versions include releases prior to 5.4.22 across affected packages: laravel/laravel, illuminate/auth, laravel/framework.
What version fixes CVE-2017-9303?
Upgrading to 5.4.22 (or the latest patched release for your respective branch) resolves the vulnerability.
Is laravel/laravel affected?
Yes, laravel/laravel is affected in releases prior to 5.4.22. Upgrade your dependency to 5.4.22 or later.
Is illuminate/auth affected?
Yes, illuminate/auth is affected in releases prior to Latest secure release, 5.4.22. Upgrade your dependency to Latest secure release, 5.4.22 or later.
What is the CVSS score of CVE-2017-9303?
CVE-2017-9303 has a CVSS v3.1 base score of 6.1 (MODERATE) with vector string CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N.
What CWE is associated with CVE-2017-9303?
CVE-2017-9303 is classified under CWE-20: Improper Input Validation (The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.).
How can I check Packagist dependencies for CVE-2017-9303?
Run the dependency tree command: 'inspect dependencies for laravel/laravel'. 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-rc8x-jrrc-frfv",
  "modified" : "2024-04-25T22:55:13Z",
  "published" : "2022-05-17T02:42:21Z",
  "aliases" : [ "CVE-2017-9303" ],
  "summary" : "Laravel does not properly constrain the host portion of a password-reset URL",
  "details" : "Laravel 5.4.x before 5.4.22 does not properly constrain the host portion of a password-reset URL, which makes it easier for remote attackers to conduct phishing attacks by specifying an attacker-controlled host.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "laravel/laravel"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.4.0"
      }, {
        "fixed" : "5.4.22"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "illuminate/auth"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.3.0"
      }, {
        "last_affected" : "5.3.31"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "illuminate/auth"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.4.0"
      }, {
        "fixed" : "5.4.22"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "laravel/framework"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.3.0"
      }, {
        "last_affected" : "5.3.31"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "laravel/framework"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.4.0"
      }, {
        "fixed" : "5.4.22"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2017-9303"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/laravel/framework/commit/cef10551820530632a86fa6f1306fee95c5cac43"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/illuminate/auth/CVE-2017-9303.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/laravel/framework/CVE-2017-9303.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://laravel-news.com/laravel-5-4-22-is-now-released-and-includes-a-security-fix"
  }, {
    "type" : "WEB",
    "url" : "https://laravel.com/docs/5.4/releases#laravel-5.4.22"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20171021180417/http://www.securityfocus.com/bid/98776"
  }, {
    "type" : "WEB",
    "url" : "http://www.securityfocus.com/bid/98776"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-20" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-04-25T22:55:13Z",
    "nvd_published_at" : "2017-05-29T22:29:00Z"
  }
}