CVE-2019-16764
6.5
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Summary
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.
Affected Software
| Vendor | Product | Version Range | Status |
|---|---|---|---|
| pow-auth | pow_assent | < 0.4.4 < 0.4.4 | affected |
Weaknesses
- CWE-400: CWE-400 Uncontrolled Resource Consumption
Workarounds
A plug can be used to validate conn.params["provider"] before it reaches the PowAssent.Phoenix.AuthorizationController.
ADP Enrichment
CVE Program Container
Additional References
- https://github.com/pow-auth/pow_assent/security/advisories/GHSA-368c-xvrv-x986
- https://hex.pm/packages/pow_assent
- http://erlang.org/doc/efficiency_guide/commoncaveats.html#list_to_atom-1
- https://github.com/pow-auth/pow_assent/commit/026105eeecc0e3c2f807e7109e745ea93c0fd9cf
References
- https://github.com/pow-auth/pow_assent/security/advisories/GHSA-368c-xvrv-x986
- https://hex.pm/packages/pow_assent
- http://erlang.org/doc/efficiency_guide/commoncaveats.html#list_to_atom-1
- https://github.com/pow-auth/pow_assent/commit/026105eeecc0e3c2f807e7109e745ea93c0fd9cf
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.