PT-2020-18315 · Angular · Angular-Expressions
Maxime Nadeau
·
Published
2020-01-24
·
Updated
2020-01-31
·
CVE-2020-5219
CVSS v3.1
8.8
High
| Vector | AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
Name of the Vulnerable Software and Affected Versions
Angular Expressions versions prior to 1.0.1
Description
The issue allows for remote code execution if
expressions.compile(userControlledInput) is called where userControlledInput is text from user input. In a browser environment, an attacker could run any browser script when the application code calls expressions.compile(userControlledInput). On a server, an attacker could run any Javascript expression, thus gaining remote code execution.Recommendations
For versions prior to 1.0.1, upgrade to version 1.0.1 of angular-expressions.
As a temporary workaround, consider disabling user-controlled input that will be fed into angular-expressions in your application.
Alternatively, restrict
userControlledInput to only allow specific characters by using a regular expression filter, such as if (/^[|a-zA-Z.0-9 :"+'-?]+$/.test(userControlledInput)).Fix
Special Elements Injection
Found an issue in the description? Have something to add? Feel free to write us 👾
Weakness Enumeration
Related Identifiers
Affected Products
Angular-Expressions