CVE-2020-5205: Pow Session Fixation Vulnerability

MODERATE
Advisory Identifier: GHSA-v2wf-c3j6-wpvw
CVSS 6.5
CWE-384
Published
Advisory Summary

CVE-2020-5205 is a MODERATE (CVSS 6.5) session fixation vulnerability (CWE-384: Session Fixation) affecting Pow libraries in the Hex ecosystem. The issue involves session fixation. Remediation is available by upgrading affected packages to version 1.0.16.

CVE-2020-5205 at a Glance

CVE Identifier CVE-2020-5205
GHSA Identifier GHSA-v2wf-c3j6-wpvw
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-384: Session Fixation
Affected Product Pow
Package Ecosystem Hex
Published Date
Last Updated

Security Impact

CVSS: 6.5

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

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

How to Fix CVE-2020-5205

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

pow fixed: 1.0.16
Upgrade pow to 1.0.16
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 pow

How to Check if You Are Affected

To determine whether your application is affected by CVE-2020-5205, inspect your project dependencies for Pow:

inspect dependencies for pow

Analyze the terminal output to locate any version of Pow in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.0.16), 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-384: Session Fixation, where authenticating a user, or otherwise establishing a new user session, without invalidating any existing session identifier gives an attacker the opportunity to steal authenticated sessions. In Pow, 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

### Impact The use of `Plug.Session` in `Pow.Plug.Session` is susceptible to session fixation attacks if a persistent session store is used for `Plug.Session`, such as Redis or a database. Cookie store, which is used in most Phoenix apps, doesn't have this vulnerability. ### Workarounds Call `Plug.Conn.configure_session(conn, renew: true)` periodically and after privilege change. A custom authorization plug can be written where the `create/3` method should return the `conn` only after `Plug.Conn.configure_session/2` have been called on it. ### References https://github.com/danschultzer/pow/commit/578ffd3d8bb8e8a26077b644222186b108da474f https://www.owasp.org/index.php/Session_fixation

CVE-2020-5205 Affected Pow Versions

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

References

Frequently Asked Questions

What is CVE-2020-5205?
CVE-2020-5205 is a security vulnerability in Pow involving Session fixation under CWE-384: Session Fixation.
Which Pow versions are affected?
Affected versions include releases prior to 1.0.16 across affected packages: pow.
What version fixes CVE-2020-5205?
Upgrading to 1.0.16 (or the latest patched release for your respective branch) resolves the vulnerability.
Is pow affected?
Yes, pow is affected in releases prior to 1.0.16. Upgrade your dependency to 1.0.16 or later.
What is the CVSS score of CVE-2020-5205?
CVE-2020-5205 has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:L/A:N.
What CWE is associated with CVE-2020-5205?
CVE-2020-5205 is classified under CWE-384: Session Fixation (Authenticating a user, or otherwise establishing a new user session, without invalidating any existing session identifier gives an attacker the opportunity to steal authenticated sessions.).
How can I check Hex dependencies for CVE-2020-5205?
Run the dependency tree command: 'inspect dependencies for pow'. 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-v2wf-c3j6-wpvw",
  "modified" : "2022-04-12T21:27:49Z",
  "published" : "2022-04-12T21:27:49Z",
  "aliases" : [ "CVE-2020-5205" ],
  "summary" : "Session fixation",
  "details" : "### Impact\n\nThe use of `Plug.Session` in `Pow.Plug.Session` is susceptible to session fixation attacks if a persistent session store is used for `Plug.Session`, such as Redis or a database. Cookie store, which is used in most Phoenix apps, doesn't have this vulnerability.\n\n### Workarounds\n\nCall `Plug.Conn.configure_session(conn, renew: true)` periodically and after privilege change. A custom authorization plug can be written where the `create/3` method should return the `conn` only after `Plug.Conn.configure_session/2` have been called on it.\n\n### References\nhttps://github.com/danschultzer/pow/commit/578ffd3d8bb8e8a26077b644222186b108da474f  \nhttps://www.owasp.org/index.php/Session_fixation",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Hex",
      "name" : "pow"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.0.16"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/danschultzer/pow/security/advisories/GHSA-v2wf-c3j6-wpvw"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-5205"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/danschultzer/pow/commit/578ffd3d8bb8e8a26077b644222186b108da474f"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/danschultzer/pow"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/danschultzer/pow/blob/master/CHANGELOG.md#v1016-2020-01-07"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-384" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-04-12T21:27:49Z",
    "nvd_published_at" : null
  }
}