{ "schema_version": "1.4.0", "id": "GHSA-5462-4vcx-jh7j", "modified": "2024-12-10T20:59:46Z", "published": "2024-12-10T16:54:50Z", "aliases": [ "CVE-2024-54152" ], "summary": "Angular Expressions - Remote Code Execution when using locals", "details": "### Impact\n\nAn attacker can write a malicious expression that escapes the sandbox to execute arbitrary code on the system.\n\nExample of vulnerable code:\n\n```js\nconst expressions = require(\"angular-expressions\");\nconst result = expressions.compile(\"__proto__.constructor\")({}, {});\n// result should be undefined, however for versions <=1.4.2, it returns an object.\n```\n\nWith a more complex (undisclosed) payload, one can get full access to Arbitrary code execution on the system.\n\n### Patches\n\nThe problem has been patched in version 1.4.3 of angular-expressions.\n\n### Workarounds\n\nThere is one workaround if it not possible for you to update : \n\n* Make sure that you use the compiled function with just one argument : ie this is not vulnerable : \n `const result = expressions.compile(\"__proto__.constructor\")({});` : in this case you lose the feature of locals if you need it.\n\n### Credits\n\nCredits go to [JorianWoltjer](https://github.com/JorianWoltjer) who has found the issue and reported it to use. https://jorianwoltjer.com/", "severity": [ { "type": "CVSS_V4", "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N" } ], "affected": [ { "package": { "ecosystem": "npm", "name": "angular-expressions" }, "ranges": [ { "type": "ECOSYSTEM", "events": [ { "introduced": "0" }, { "fixed": "1.4.3" } ] } ] } ], "references": [ { "type": "WEB", "url": "https://github.com/peerigon/angular-expressions/security/advisories/GHSA-5462-4vcx-jh7j" }, { "type": "ADVISORY", "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-54152" }, { "type": "WEB", "url": "https://github.com/peerigon/angular-expressions/commit/97f7ad94006156eeb97fc942332578b6cfbf8eef" }, { "type": "PACKAGE", "url": "https://github.com/peerigon/angular-expressions" } ], "database_specific": { "cwe_ids": [ "CWE-94" ], "severity": "CRITICAL", "github_reviewed": true, "github_reviewed_at": "2024-12-10T16:54:50Z", "nvd_published_at": "2024-12-10T16:15:23Z" } }