{"id":"CVE-2021-21277","published":"2021-02-01T15:05:24Z","modified":"2024-08-03T18:09:15Z","title":"Angular Expressions - Remote Code Execution","vendor":"peerigon","product":"angular-expressions","tier":"tail","description":{"text":"angular-expressions is \"angular's nicest part extracted as a standalone module for the browser and node\". In angular-expressions before version 1.1.2 there is a vulnerability which allows Remote Code Execution if you call \"expressions.compile(userControlledInput)\" where \"userControlledInput\" is text that comes from user input. The security of the package could be bypassed by using a more complex payload, using a \".constructor.constructor\" technique. In terms of impact: 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. This is fixed in version 1.1.2 of angular-expressions 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.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.5,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:H/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.02848,"percentile":0.87039,"provenance":"source"},"cwes":[{"id":"CWE-74","name":"Improper Neutralization of Special Elements in Output Used by a Downstream Component"}],"references":[{"url":"https://github.com/peerigon/angular-expressions/security/advisories/GHSA-j6px-jwvv-vpwq","tags":["x_refsource_CONFIRM"]},{"url":"https://www.npmjs.com/package/angular-expressions","tags":["x_refsource_MISC"]},{"url":"http://blog.angularjs.org/2016/09/angular-16-expression-sandbox-removal.html","tags":["x_refsource_MISC"]},{"url":"https://github.com/peerigon/angular-expressions/commit/07edb62902b1f6127b3dcc013da61c6316dd0bf1","tags":["x_refsource_MISC"]}],"priority":{"score":23.4,"factors":[{"name":"EPSS percentile","points":17.41},{"name":"CVSS severity","points":5.95}]},"vendorSlug":"peerigon","affectedVersions":[{"vendor":"peerigon","product":"angular-expressions","versions":["< 1.1.2"]}],"affected":[{"ecosystem":"npm","package":"angular-expressions","vulnerableRanges":["<1.1.2"],"patched":["1.1.2"],"from":["GHSA-j6px-jwvv-vpwq"],"provenance":"source"}],"summary":{"text":"The angular-expressions npm module (from peerigon) contains an injection flaw in versions before 1.1.2 that arises when the application passes user-controlled text to expressions.compile(). An attacker who can supply that input can run arbitrary browser script when the module runs in the browser, or arbitrary JavaScript expressions and remote code execution when it runs on the server, with the more complex \".constructor.constructor\" payloads bypassing the package's existing protections and requiring only low-privilege access, network reach to the affected application, and no user interaction.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T06:39:46Z"},"euvd":{"id":"EUVD-2021-0555","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-peerigon-angular-expressions-cve-2020-5219","parents":[{"from":"CVE-2020-5219","to":"CVE-2021-21277","relation":"successor","confidence":"high","kind":"lineage","evidence":[{"kind":"version-step","provenance":"source","package":"npm:angular-expressions","fromFixed":"1.0.1","toFixed":"1.1.2","daysApart":374},{"kind":"same-code","provenance":"machine","files":["lib/parse.js"],"commits":["https://github.com/peerigon/angular-expressions/commit/061addfb9a9e932a970e5fcb913d020038e65667","https://github.com/peerigon/angular-expressions/commit/07edb62902b1f6127b3dcc013da61c6316dd0bf1"],"basis":"rarely changed file"},{"kind":"similar","provenance":"machine","score":0.83,"basis":"same product + CWE + description similarity"}]}],"children":[{"from":"CVE-2021-21277","to":"CVE-2024-54152","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["lib/parse.js"],"commits":["https://github.com/peerigon/angular-expressions/commit/07edb62902b1f6127b3dcc013da61c6316dd0bf1","https://github.com/peerigon/angular-expressions/commit/97f7ad94006156eeb97fc942332578b6cfbf8eef"],"basis":"rarely changed file"}]}],"packageHistory":[{"cve":"CVE-2020-5219","published":"2020-01-24","fixed":"1.0.1","kev":false},{"cve":"CVE-2021-21277","published":"2021-02-01","fixed":"1.1.2","kev":false},{"cve":"CVE-2024-54152","published":"2024-12-10","fixed":"1.4.3","kev":false},{"cve":"CVE-2026-44643","published":"2026-05-11","fixed":"1.5.2","kev":false}],"package":"npm:angular-expressions"}}