QID 983110
QID 983110: Nodejs (npm) Security Update for angular-expressions (GHSA-hxhm-96pp-2m43)
Security update has been released for angular-expressions to fix the vulnerability.
Note: The preceding description block is extracted directly from the security advisory. Using automation, we have attempted to clean and format it as much as possible without introducing additional issues.
The vulnerability, reported by GoSecure Inc, allows Remote Code Execution, if you call `expressions.compile(userControlledInput)` where `userControlledInput` is text that comes from user input.
* If running angular-expressions in the browser, an attacker could run any browser script when the application code calls expressions.compile(userControlledInput).
* If running angular-expressions on the server, an attacker could run any Javascript expression, thus gaining Remote Code Execution.
A temporary workaround might be either to :
* disable user-controlled input that will be fed into angular-expressions in your application
OR
* allow only following characters in the userControlledInput :
```js
if (/^[|a-zA-Z.0-9 :"'+-?]+$/.test(userControlledInput)) {
var result = expressions.compile(userControlledInput);
}
else {
result = undefined;
}
```
- GHSA-hxhm-96pp-2m43 -
github.com/advisories/GHSA-hxhm-96pp-2m43
CVEs related to QID 983110
| Advisory ID | Software | Component | Link |
|---|---|---|---|
| GHSA-hxhm-96pp-2m43 | angular-expressions |
|