title: PowAssent is susceptible to denial of service attacks
description: 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.
problem types: CWE-400 Uncontrolled Resource Consumption
affected:
{
product: pow_assent
vendor: pow-auth
versions:
lessThan: 0.4.4, status: affected, version: < 0.4.4, versionType: custom
}
metrics:
cvssV3_1: [
attackComplexity: LOW
attackVector: NETWORK
availabilityImpact: HIGH
baseScore: 6.5
baseSeverity: MEDIUM
confidentialityImpact: NONE
integrityImpact: NONE
privilegesRequired: LOW
scope: UNCHANGED
userInteraction: NONE
vectorString: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
version: 3.1
]
workarounds: A plug can be used to validate conn.params[&quot;provider&quot;] before it reaches the PowAssent.Phoenix.AuthorizationController.