CVE-2019-16764: Pow assent Denial of Service Vulnerability

MODERATE
Advisory Identifier: GHSA-5653-437f-5hmc
CVSS 6.5
CWE-400
Published
Advisory Summary

CVE-2019-16764 is a MODERATE (CVSS 6.5) denial of service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Pow assent libraries in the Hex ecosystem. The issue involves denial of service. Remediation is available by upgrading affected packages to version 0.4.4.

CVE-2019-16764 at a Glance

CVE Identifier CVE-2019-16764
GHSA Identifier GHSA-5653-437f-5hmc
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product Pow assent
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:L/PR:L/UI:N/S:U/C:N/I:N/A:H).

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

How to Fix CVE-2019-16764

To remediate this vulnerability, upgrade all affected Pow assent 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_assent fixed: 0.4.4
Upgrade pow_assent to 0.4.4
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_assent

How to Check if You Are Affected

To determine whether your application is affected by CVE-2019-16764, inspect your project dependencies for Pow assent:

inspect dependencies for pow_assent

Analyze the terminal output to locate any version of Pow assent in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.4.4), 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-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In Pow assent, 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 use of `String.to_atom/1` in PowAssent is susceptible to denial of service attacks. In `PowAssent.Phoenix.AuthorizationController` a value is fetched from the user provided params, and `String.to_atom/1` is used to convert the binary value to an atom so it can be used to fetch the provider configuration value. This is unsafe as it is user provided data, and can be used to fill up the whole atom table of ~1M which will cause the app to crash.

CVE-2019-16764 Affected Pow assent Versions

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

References

Frequently Asked Questions

What is CVE-2019-16764?
CVE-2019-16764 is a security vulnerability in Pow assent involving Denial of service under CWE-400: Uncontrolled Resource Consumption.
Which Pow assent versions are affected?
Affected versions include releases prior to 0.4.4 across affected packages: pow_assent.
What version fixes CVE-2019-16764?
Upgrading to 0.4.4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is pow_assent affected?
Yes, pow_assent is affected in releases prior to 0.4.4. Upgrade your dependency to 0.4.4 or later.
What is the CVSS score of CVE-2019-16764?
CVE-2019-16764 has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2019-16764?
CVE-2019-16764 is classified under CWE-400: Uncontrolled Resource Consumption (The product does not properly control the allocation and maintenance of a limited resource.).
How can I check Hex dependencies for CVE-2019-16764?
Run the dependency tree command: 'inspect dependencies for pow_assent'. 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-5653-437f-5hmc",
  "modified" : "2022-04-12T21:29:30Z",
  "published" : "2022-04-12T21:29:30Z",
  "aliases" : [ "CVE-2019-16764" ],
  "summary" : "Denial of service",
  "details" : "The use of `String.to_atom/1` in PowAssent is susceptible to denial of service attacks. In `PowAssent.Phoenix.AuthorizationController` a value is fetched from the user provided params, and `String.to_atom/1` is used to convert the binary value to an atom so it can be used to fetch the provider configuration value. This is unsafe as it is user provided data, and can be used to fill up the whole atom table of ~1M which will cause the app to crash.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Hex",
      "name" : "pow_assent"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.4.4"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/pow-auth/pow_assent/security/advisories/GHSA-368c-xvrv-x986"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2019-16764"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pow-auth/pow_assent/commit/026105eeecc0e3c2f807e7109e745ea93c0fd9cf"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/pow-auth/pow_assent"
  }, {
    "type" : "WEB",
    "url" : "https://hex.pm/packages/pow_assent"
  }, {
    "type" : "WEB",
    "url" : "http://erlang.org/doc/efficiency_guide/commoncaveats.html#list_to_atom-1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-400" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-04-12T21:29:30Z",
    "nvd_published_at" : null
  }
}