CVE-2022-42975: Phoenix Phoenix Before 1.6.14 Mishandles Check_origin Vulnerability

HIGH
Advisory Identifier: GHSA-p8f7-22gq-m7j9
CVSS 7.5
CWE-863 CWE-346
Published
Advisory Summary

CVE-2022-42975 is a HIGH (CVSS 7.5) phoenix before 1.6.14 mishandles check_origin vulnerability (CWE-863: Incorrect Authorization) affecting Phoenix libraries in the Hex ecosystem. The issue involves phoenix before 1.6.14 mishandles check_origin wildcarding. Remediation is available by upgrading affected packages to version 1.6.14.

CVE-2022-42975 at a Glance

CVE Identifier CVE-2022-42975
GHSA Identifier GHSA-p8f7-22gq-m7j9
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-863: Incorrect Authorization
Affected Product Phoenix
Package Ecosystem Hex
Published Date
Last Updated

Security Impact

CVSS: 7.5

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

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

How to Fix CVE-2022-42975

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.6.14
Upgrade phoenix to 1.6.14
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-2022-42975, 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.6.14), 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-863: Incorrect Authorization, where the product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. 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

socket/transport.ex in Phoenix before 1.6.14 mishandles check_origin wildcarding. NOTE: LiveView applications are unaffected by default because of the presence of a LiveView CSRF token.

CVE-2022-42975 Affected Phoenix Versions

1 component(s)
Fixed Versions:
1.6.14
Product / Package Ecosystem Affected Versions Fixed Version
phoenix
Hex
< 1.6.14
1.6.14

References

Frequently Asked Questions

What is CVE-2022-42975?
CVE-2022-42975 is a security vulnerability in Phoenix involving Phoenix before 1.6.14 mishandles check_origin wildcarding under CWE-863: Incorrect Authorization.
Which Phoenix versions are affected?
Affected versions include releases prior to 1.6.14 across affected packages: phoenix.
What version fixes CVE-2022-42975?
Upgrading to 1.6.14 (or the latest patched release for your respective branch) resolves the vulnerability.
Is phoenix affected?
Yes, phoenix is affected in releases prior to 1.6.14. Upgrade your dependency to 1.6.14 or later.
What is the CVSS score of CVE-2022-42975?
CVE-2022-42975 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N.
What CWE is associated with CVE-2022-42975?
CVE-2022-42975 is classified under CWE-863: Incorrect Authorization (The product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check.).
How can I check Hex dependencies for CVE-2022-42975?
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-p8f7-22gq-m7j9",
  "modified" : "2024-04-10T18:37:53Z",
  "published" : "2022-10-17T12:00:27Z",
  "aliases" : [ "CVE-2022-42975" ],
  "summary" : "Phoenix before 1.6.14 mishandles check_origin wildcarding",
  "details" : "socket/transport.ex in Phoenix before 1.6.14 mishandles check_origin wildcarding. NOTE: LiveView applications are unaffected by default because of the presence of a LiveView CSRF token.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Hex",
      "name" : "phoenix"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.6.14"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-42975"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/phoenixframework/phoenix/commit/6e7185b33a59e0b1d1c0b4223adf340a73e963ae"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/phoenixframework/phoenix"
  }, {
    "type" : "WEB",
    "url" : "https://hexdocs.pm/phoenix/1.6.14/changelog.html#1-6-14-2022-10-10"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-346", "CWE-863" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-10-18T18:01:44Z",
    "nvd_published_at" : "2022-10-17T06:15:00Z"
  }
}