CVE-2017-1000163: Phoenix Phoenix Arbitrary URL Redirect Vulnerability

MODERATE
Advisory Identifier: GHSA-cmfh-8f8r-fj96
CVSS 6.1
CWE-601
Published
Advisory Summary

CVE-2017-1000163 is a MODERATE (CVSS 6.1) phoenix arbitrary url redirect vulnerability (CWE-601: URL Redirection to Untrusted Site ('Open Redirect')) affecting Phoenix libraries in the Hex ecosystem. The issue involves phoenix arbitrary url redirect. Remediation is available by upgrading affected packages to version 1.0.6, 1.1.8, 1.2.3.

CVE-2017-1000163 at a Glance

CVE Identifier CVE-2017-1000163
GHSA Identifier GHSA-cmfh-8f8r-fj96
Severity MODERATE
CVSS v3.1 Base Score 6.1
CWE Classification CWE-601: URL Redirection to Untrusted Site ('Open Redirect')
Affected Product Phoenix
Package Ecosystem Hex
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-1000163

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

phoenix fixed: 1.0.6
Upgrade phoenix to 1.0.6
phoenix fixed: 1.1.8
Upgrade phoenix to 1.1.8
phoenix fixed: 1.2.3
Upgrade phoenix to 1.2.3
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 phoenix

How to Check if You Are Affected

To determine whether your application is affected by CVE-2017-1000163, inspect your project dependencies for Phoenix:

inspect dependencies for phoenix

Analyze the terminal output to locate any version of Phoenix in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.0.6), 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-601: URL Redirection to Untrusted Site ('Open Redirect'), where the web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a redirect. In Phoenix, 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

The Phoenix team designed `Phoenix.Controller.redirect/2` to protect against redirects allowing user input to redirect to an external URL where your application code otherwise assumes a local path redirect. This is why the `:to` option is used for “local” URL redirects and why you must pass the `:external` option to intentionally allow external URLs to be redirected to. It has been disclosed that carefully crafted user input may be treated by some browsers as an external URL. An attacker can use this vulnerability to aid in social engineering attacks. The most common use would be to create highly believable phishing attacks. For example, the following user input would pass local URL validation, but be treated by Chrome and Firefox as external URLs: `http://localhost:4000/?redirect=/\nexample.com` Not all browsers are affected, but latest Chrome and Firefox will issue a get request for `example.com` and successfully redirect externally

CVE-2017-1000163 Affected Phoenix Versions

3 component(s)
Fixed Versions:
1.0.61.1.81.2.3
Product / Package Ecosystem Affected Versions Fixed Version
phoenix
Hex
< 1.0.6
1.0.6
phoenix
Hex
≥ 1.1.0
< 1.1.8
1.1.8
phoenix
Hex
≥ 1.2.0
< 1.2.3
1.2.3

References

Frequently Asked Questions

What is CVE-2017-1000163?
CVE-2017-1000163 is a security vulnerability in Phoenix involving Phoenix Arbitrary URL Redirect under CWE-601: URL Redirection to Untrusted Site ('Open Redirect').
Which Phoenix versions are affected?
Affected versions include releases prior to 1.0.6, 1.1.8, 1.2.3 across affected packages: phoenix.
What version fixes CVE-2017-1000163?
Upgrading to 1.0.6, 1.1.8, 1.2.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is phoenix affected?
Yes, phoenix is affected in releases prior to 1.0.6, 1.1.8, 1.2.3. Upgrade your dependency to 1.0.6, 1.1.8, 1.2.3 or later.
What is the CVSS score of CVE-2017-1000163?
CVE-2017-1000163 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-1000163?
CVE-2017-1000163 is classified under CWE-601: URL Redirection to Untrusted Site ('Open Redirect') (The web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a redirect.).
How can I check Hex dependencies for CVE-2017-1000163?
Run the dependency tree command: 'inspect dependencies for phoenix'. 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-cmfh-8f8r-fj96",
  "modified" : "2023-09-07T23:06:08Z",
  "published" : "2022-04-12T21:16:09Z",
  "aliases" : [ "CVE-2017-1000163" ],
  "summary" : "Phoenix Arbitrary URL Redirect",
  "details" : "The Phoenix team designed `Phoenix.Controller.redirect/2` to protect against redirects allowing user input to redirect to an external URL where your application code otherwise assumes a local path redirect. This is why the `:to` option is used for “local” URL redirects and why you must pass the `:external` option to intentionally allow external URLs to be redirected to. It has been disclosed that carefully crafted user input may be treated by some browsers as an external URL. An attacker can use this vulnerability to aid in social engineering attacks. The most common use would be to create highly believable phishing attacks. For example, the following user input would pass local URL validation, but be treated by Chrome and Firefox as external URLs: \n`http://localhost:4000/?redirect=/\\nexample.com`\nNot all browsers are affected, but latest Chrome and Firefox will issue a get request for `example.com` and successfully redirect externally",
  "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" : "Hex",
      "name" : "phoenix"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.0.6"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Hex",
      "name" : "phoenix"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.1.0"
      }, {
        "fixed" : "1.1.8"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Hex",
      "name" : "phoenix"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.2.0"
      }, {
        "fixed" : "1.2.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2017-1000163"
  }, {
    "type" : "WEB",
    "url" : "https://elixirforum.com/t/security-releases-for-phoenix/4143"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/phoenixframework/phoenix"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-601" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-04-12T21:16:09Z",
    "nvd_published_at" : null
  }
}