Skip to content

Denial of service

High
danschultzer published GHSA-368c-xvrv-x986 Nov 25, 2019

Package

pow_assent (hex)

Affected versions

< 0.4.4

Patched versions

>= 0.4.4

Description

Impact

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's user provided data, and can be used to fill up the whole atom table of ~1M which will cause the app to crash.

Workarounds

A plug can be used to validate conn.params["provider"] before it reaches the PowAssent.Phoenix.AuthorizationController.

References

http://erlang.org/doc/efficiency_guide/commoncaveats.html#list_to_atom-1

Severity

High

CVE ID

CVE-2019-16764

Weaknesses

No CWEs