{"id":"GHSA-hxhm-96pp-2m43","summary":"Remote Code Execution in Angular Expressions","details":"### Impact\n\nThe vulnerability, reported by GoSecure Inc, allows Remote Code Execution, if you call `expressions.compile(userControlledInput)` where `userControlledInput` is text that comes from user input.\n\n* If running angular-expressions in the browser, an attacker could run any browser script when the application code calls expressions.compile(userControlledInput).\n* If running angular-expressions on the server, an attacker could run any Javascript expression, thus gaining Remote Code Execution.\n\n### Patches\n\nUsers should upgrade to version 1.0.1 of angular-expressions\n\n### Workarounds\n\nA temporary workaround might be either to : \n\n* disable user-controlled input that will be fed into angular-expressions in your application\n\nOR\n\n* allow only following characters in the userControlledInput : \n\n```js\nif (/^[|a-zA-Z.0-9 :\"'+-?]+$/.test(userControlledInput)) {\n      var result = expressions.compile(userControlledInput);\n}\nelse {\n     result = undefined;\n}\n```\n\n### References\n\n[Removal of angular-expression sandbox](http://blog.angularjs.org/2016/09/angular-16-expression-sandbox-removal.html)\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n* Open an issue in [angular-expressions](https://github.com/peerigon/angular-expressions/issues)\n* [Email us](mailto:contact@javascript-ninja.fr)\n\n### Credits \n\nThe issue was reported by Maxime Nadeau from GoSecure, Inc.","aliases":["CVE-2020-5219"],"modified":"2026-09-10T03:48:42.553593740Z","published":"2020-01-24T15:27:25Z","database_specific":{"cwe_ids":["CWE-74"],"severity":"HIGH","github_reviewed":true,"github_reviewed_at":"2020-01-24T15:27:04Z","nvd_published_at":null},"references":[{"type":"WEB","url":"https://github.com/peerigon/angular-expressions/security/advisories/GHSA-hxhm-96pp-2m43"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2020-5219"},{"type":"WEB","url":"https://github.com/peerigon/angular-expressions/commit/061addfb9a9e932a970e5fcb913d020038e65667"},{"type":"WEB","url":"http://blog.angularjs.org/2016/09/angular-16-expression-sandbox-removal.html"}],"affected":[{"package":{"name":"angular-expressions","ecosystem":"npm","purl":"pkg:npm/angular-expressions"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.0.1"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2020/01/GHSA-hxhm-96pp-2m43/GHSA-hxhm-96pp-2m43.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N"}]}